@lessonkit/core
v1.7.3
Published
Shared types and telemetry primitives for LessonKit.
Maintainers
Readme
@lessonkit/core
Headless types, identity helpers, telemetry pipeline, and runtime primitives shared across LessonKit.
When to install
- Custom headless runtime (no React UI)
- Telemetry plugins, batch pipelines, or custom tracking clients
- Validating IDs, URNs, and manifest fields in your own tooling
Most course authors only need @lessonkit/react, which re-exports common APIs.
Install
npm install @lessonkit/coreRequires Node.js 18+ minimum.
Usage
import {
buildTelemetryEvent,
createLessonkitRuntime,
createTelemetryPipeline,
createPluginRegistry,
buildLessonkitUrn,
validateId,
} from "@lessonkit/core";
const event = buildTelemetryEvent({
name: "quiz_answered",
courseId: "my-course",
lessonId: "lesson-1",
checkId: "check-1",
data: { correct: true, score: 1 },
});Exports
| Area | Key APIs |
| --- | --- |
| Identity | validateId, slugifyId, buildLessonkitUrn |
| Telemetry | buildTelemetryEvent, createTrackingClient, createTelemetryPipeline |
| Runtime | createLessonkitRuntime, progress and session helpers |
| Plugins | createPluginRegistry, defineTelemetryPlugin, defineAssessmentPlugin |
Machine-readable: @lessonkit/core/telemetry-catalog.v3.json (current; v1–v3 retained), identity-contract.v1.json
Common issues
| Symptom | Fix |
| --- | --- |
| buildTelemetryEvent validation error | Ensure courseId, lessonId, and event-specific IDs match identity rules |
| Plugin not firing | Register with createPluginRegistry and pass plugins in LessonkitProvider config |
Docs
5-minute guide · LMS Go-Live · Core reference · TypeDoc API index
License
Apache-2.0
