Practitionist / Practitionist/elluminar_web
🎓 Complete Fermion integration: DRM video upload wiring + code-lab embed (currently placeholder even when configured)
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1
- Forks
- 0
- Avg merge
- 17h 2m
- Merged PRs (30d)
- 18
Description
Context
Fermion (codedamn backend) is isolated in src/lib/fermion/* but three capabilities are dead-ended:
- DRM video upload never wired:
createVideoUpload/markUploadedAndProcess(src/lib/fermion/video.ts:20-56) have zero callers. The studio curriculum form promises "DRM uploads via Fermion appear here once FERMION_API_KEY is set" (curriculum-builder.tsx:380-383) but only external-URL lessons function today. - Code labs are a permanent placeholder: CODE_LAB lessons render a static card ("launches embedded once Fermion is configured") unconditionally — even WITH a key.
requestDsaRun,getDsaRunResult,recordSandboxSession(labs.ts) plusensureFermionUser/getFermionLoginLink(users.ts) are dead exports; no iframe/embed/SSO launch path exists. CSP already whitelists .fermion.app/.codedamn.com frames (next.config.ts). - Webhook reconciliation gap: fermion webhook marks VideoAsset READY/FAILED but a missed delivery strands assets PROCESSING forever — the referenced "reconciliation job (M13)" does not exist.
Proposed implementation
Phase A (labs): implement learner lab launch — ensure Fermion user → fetch login/embed link → sandboxed iframe per labConfig.labRef; persist SandboxSession rows via recordSandboxSession on completion events; extend webhook handler for lab events.
Phase B (video): studio upload action calling createVideoUpload → direct browser upload to returned URL → markUploadedAndProcess → existing webhook flips READY; show transcode status on VideoAsset admin list.
Phase C (ops): M13 cron to reconcile stuck PROCESSING VideoAssets against Fermion API; alert via Sentry.
Acceptance
- CODE_LAB lesson launches an embedded lab for configured courses
- Creator can upload video → DRM playback works end-to-end
- Stuck transcodes self-heal or alert
Blocks #37 content quality for technical tracks. Related epic #42, issue #39 (Fermion prod config).
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading src/lib/fermion/video.ts, labs.ts, and users.ts, then inspect curriculum-builder.tsx and next.config.ts to trace the existing integration points and placeholder behavior. Review the webhook handling described in the issue before choosing an implementation sequence. Done means configured code labs launch, video uploads reach DRM playback, and stuck transcodes reconcile or alert.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nextjs, typescript
- Domain
- backend-api-design, full-stack
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100