New features: - HLS video encoding/streaming (hls routes, hls-encoder) and a media transcripts pipeline (transcripts route + media-transcript queries) - AI assistant chat vs. run model: agent-course-generation worker/queue, run-monitor pane, chat-changes card, content ask-ai bar - Per-theme course-page previews across org landing-page themes (bold, classic, corporate, editorial, etc.) with a shared course token/component set - View-as-student mode and login-link / link-invite invite flows Refactor: - Extract packages/core consolidating config (env, storage, dashboard-url), services and utils previously duplicated under apps/api/src/config - Remove legacy agent service modules (chat-tools, chat-context, context-window, document, fetch-url, lesson-content) - Relax Cross-Origin-Resource-Policy to allow cross-origin media embedding - Add format script to tenant-router so turbo run format covers it
3.7 KiB
3.7 KiB
SCORM Support Implementation Plan
Purpose
Translate the SCORM Support PRD into an engineering-first execution order that fits current ClassroomIO conventions.
Delivery Order
- Data model and package storage
- Manifest parser and package ingestion
- Lesson linkage model
- Learner runtime shell
- Runtime persistence APIs
- Progress/certification integration
- Reporting and diagnostics
1. Data Model
Schema work
Add SCORM-focused tables and relations in packages/db/src/schema.ts:
scorm_packagescorm_package_itemscorm_registrationscorm_attemptscorm_runtime_event
Add lesson linkage for SCORM-backed content.
Query layer
Add pure query modules under:
packages/db/src/queries/scorm/package.tspackages/db/src/queries/scorm/registration.tspackages/db/src/queries/scorm/attempt.tspackages/db/src/queries/scorm/runtime-event.ts
2. Validation and Contracts
Add validation modules under:
packages/utils/src/validation/scorm/package.tspackages/utils/src/validation/scorm/runtime.tspackages/utils/src/validation/scorm/report.ts
Include:
- package upload metadata
- lesson attachment payloads
- runtime commit payload
- reporting query params
3. Package Ingestion Service
Add services under:
apps/api/src/services/scorm/package.tsapps/api/src/services/scorm/manifest.tsapps/api/src/services/scorm/storage.ts
Responsibilities:
- upload intake
- safe unzip
- manifest parse
- package metadata persistence
- warning generation
4. Runtime Service
Add services under:
apps/api/src/services/scorm/runtime.tsapps/api/src/services/scorm/registration.ts
Responsibilities:
- create/resume learner registration
- commit runtime writes
- finalize attempts
- map SCORM state to ClassroomIO lesson completion
5. Routes
Add routes under:
apps/api/src/routes/scorm/package.tsapps/api/src/routes/scorm/runtime.tsapps/api/src/routes/scorm/report.tsapps/api/src/routes/scorm/index.ts
Mount under a single root segment in apps/api/src/app.ts:
.route('/scorm', scormRouter)
6. Dashboard
Add feature areas under:
apps/dashboard/src/lib/features/scorm/api/apps/dashboard/src/lib/features/scorm/components/apps/dashboard/src/lib/features/scorm/utils/
UI work:
- package upload modal
- package detail view
- lesson editor integration
- reporting table and learner detail drawer
7. Learner Shell
Add a SCORM player surface in dashboard lesson rendering.
Potential locations:
apps/dashboard/src/lib/features/scorm/components/scorm-player.svelteapps/dashboard/src/lib/features/scorm/components/scorm-shell.svelte
Responsibilities:
- load launch target
- expose
APIandAPI_1484_11 - buffer/set runtime values
- commit and terminate on lifecycle boundaries
8. Progress Integration
Update existing course completion and reporting logic to include SCORM-backed lessons.
Primary touchpoints:
apps/api/src/services/course/completion.tspackages/db/src/queries/course/content.tspackages/db/src/queries/course/course.ts
9. Testing
Unit
- manifest parser
- runtime data model mapping
- completion mapping
Integration
- upload and parse endpoints
- runtime commit endpoint
- registration resume behavior
Compatibility
Store representative fixture packages and run regression checks against:
- SCORM 1.2 export
- SCORM 2004 export
- relaunch/resume flow
Build and Verification
pnpm --filter @cio/utils buildpnpm --filter @cio/db buildpnpm --filter @cio/api buildpnpm --filter @cio/dashboard build
Suggested First Sprint Slice
- schema + queries
- package upload + parser
- lesson linkage
- narrow runtime proof of concept for one SCORM 1.2 package