lessonkit.json manifest reference (1.7.x)¶
Every LessonKit course includes a root lessonkit.json manifest (schemaVersion: 1). The CLI discovers it by walking up from --cwd. Packaging validates the manifest against your React props and Vite build output.
Minimal example¶
{
"schemaVersion": 1,
"name": "my-course",
"course": {
"courseId": "my-course",
"title": "My LessonKit Course",
"layout": "single-spa",
"lessons": [{ "id": "lesson-1", "title": "My first lesson" }],
"assessments": [
{
"checkId": "ready-to-build",
"question": "Ready to build?",
"choices": ["Not yet", "Yes"],
"answer": "Yes",
"passingScore": 1
}
],
"theme": { "preset": "default" },
"tracking": {
"xapi": {
"activityIri": "https://example.com/courses/my-course"
}
}
},
"paths": {
"spaDistDir": "dist",
"lxpackOutDir": ".lxpack/course",
"outputBaseDir": ".lxpack/out"
}
}
Top-level fields¶
Field |
Required |
Description |
|---|---|---|
|
Yes |
Must be |
|
Yes |
Project slug (directory name from |
|
Yes |
|
|
No |
Build and output directories (defaults below). |
When paths is omitted, the CLI uses spaDistDir: "dist", lxpackOutDir: ".lxpack/course", and outputBaseDir: ".lxpack/out". Partial paths objects merge with those defaults. Machine-readable schema: @lessonkit/lxpack/lessonkit-manifest.v1.json.
course object¶
Field |
Required |
Description |
|---|---|---|
|
Yes |
Stable course identifier. Must match |
|
Yes |
Human-readable course title (LMS shell and exports). |
|
Yes |
|
|
Yes |
Array of |
|
No |
Assessment descriptors mirrored from React |
|
No |
|
|
No |
Completion threshold and xAPI |
|
No |
Optional semver string for the course content (not the framework version). |
|
No |
Deprecated on |
|
No |
LXPack SPA lesson id for |
Assessment entries¶
Each course.assessments[] entry must match a React assessment checkId. MCQ-style entries (default when kind is omitted):
Field |
Required |
Description |
|---|---|---|
|
Yes |
Matches |
|
Yes |
Prompt text. |
|
Yes |
Array of choice strings (MCQ). |
|
Yes |
Correct choice string (MCQ). |
|
No |
Minimum score to pass (default packaging behavior uses assessment completion). |
|
No |
Omit for MCQ. Other kinds: |
Discriminated assessment types are validated at packaging time. See Block catalog for React block ↔ manifest mapping.
tracking object¶
Field |
Description |
|---|---|
|
Optional completion threshold for LMS scoring (0–1). |
|
Required for |
paths object¶
Field |
Default |
Description |
|---|---|---|
|
|
Vite production output. |
|
|
LXPack project root (descriptor staging). |
|
|
Resolved inside |
Default artifact layout (relative to project root):
my-course/
├── lessonkit.json
├── dist/ ← paths.spaDistDir
└── .lxpack/course/ ← paths.lxpackOutDir
└── .lxpack/out/ ← paths.outputBaseDir
├── course-scorm12.zip
├── course-xapi.zip
└── standalone/
Trust the path lessonkit package prints on stdout if you override paths.*.
React parity rules¶
Packaging fails when React and the manifest disagree:
course.courseId↔<Course courseId="…">Every
checkIdin React ↔course.assessments[].checkIdShell lesson ids ↔
course.lessons[].idwhen they represent the packaged SPA lesson
See Keep React IDs in sync and Identity reference.
Common validation errors¶
Error / symptom |
Fix |
|---|---|
|
Set |
|
Use |
Unknown |
Add or update |
Missing |
Set |
|
Run |
Three manifest layers¶
Layer |
File |
When |
|---|---|---|
Author manifest |
Root |
You edit this; CLI discovers it ( |
LXPack interchange |
|
Generated during |
Portable archive |
|
Created by |
See Portable interchange for .lkcourse layout and import scope.
See also¶
CLI reference — commands and flags
Packaging reference — targets and programmatic API
Project structure — generated folder layout
Portable interchange —
.lkcoursearchive