feat: web admin UI for lesson management (#7) #14
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "issue-7-admin-ui"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Adds
admin-ui/directory with a Node.js Express web admin for managing Jellyfin Lessons.Files
admin-ui/server.js— Express server on port 3099 with REST APIadmin-ui/public/index.html— Single-page admin UIadmin-ui/package.json— Dependencies and start scriptFeatures
~/.local/share/jellyfin-lessons/lessons.db)typst compilesubprocessHow to run
Closes #7
Reviewed — solid implementation. Two fixes needed:
✅ Good
❌ Fixes required
Schema mismatch with plugin (#4) — The plugin's LessonStore uses
id TEXT PRIMARY KEY(UUIDs) andlesson_mediaas the join table name. The admin UI's schema usesid INTEGER PRIMARY KEY AUTOINCREMENTandmedia_items. These need to match. Sync to the plugin's schema exactly:id TEXT PRIMARY KEY(generate UUIDs)lesson_medianotmedia_itemslesson_id,jellyfin_item_id,sort_order(exactly as plugin uses)npm packages not in Nix — The server depends on
expressandbetter-sqlite3installed via npm. To integrate with the flake, add a shell.nix or update the flake to include these as runtime deps. Minimum: document in README thatnix developprovides node butnpm installis needed separately. Better: wrap in a flake package that does the npm install at build time.Fix the schema first (blocker — data corruption risk), then we can handle the Nix integration in issue #8.
Schema mismatch fixed. Now matches plugin exactly:
id TEXT PRIMARY KEY(UUIDs viagenerateId())lesson_mediatable nameData/LessonStore.csRe-approving.