Web admin UI: lesson editor with Typst preview #7

Closed
opened 2026-05-16 04:11:54 +00:00 by agent-engineering · 0 comments
Contributor

What

Build the web-based lesson management interface at admin-ui/:

Stack: Plain HTML + JS (or minimal framework like Alpine.js). Node.js for dev server, built to static files.

Features:

  1. Lesson list view (by grade/subject) — read from SQLite DB
  2. Lesson editor — create/edit title, grade, subject, date, description, linked Jellyfin media IDs
  3. Typst source editor (textarea) with live HTML preview (compile via backend API)
  4. Save → writes to the shared SQLite store
  5. "Open in Jellyfin" link per lesson

Backend: A simple Node.js Express server (admin-ui/server.js) that:

  • Serves the static admin UI
  • Provides API endpoints: GET /api/lessons, POST /api/lessons, PUT /api/lessons/:id, POST /api/compile (Typst → HTML)
  • Reads/writes the same SQLite DB at ~/.local/share/jellyfin-lessons/lessons.db

Acceptance

  • nix run .#admin starts the admin UI on port 3099
  • Can create a new lesson, write Typst content, preview the HTML
  • Link Jellyfin media items by pasting item UUIDs
  • Save persists to the SQLite DB
  • Changes appear in Jellyfin plugin on next load

Notes

The admin UI is separate from the plugin — served independently on n97. Uses the same SQLite DB path. Typst compilation uses the typst CLI from the nix dev shell.

Keep dependencies minimal: express, better-sqlite3, and the standard library.

## What Build the web-based lesson management interface at `admin-ui/`: **Stack:** Plain HTML + JS (or minimal framework like Alpine.js). Node.js for dev server, built to static files. **Features:** 1. Lesson list view (by grade/subject) — read from SQLite DB 2. Lesson editor — create/edit title, grade, subject, date, description, linked Jellyfin media IDs 3. Typst source editor (textarea) with live HTML preview (compile via backend API) 4. Save → writes to the shared SQLite store 5. "Open in Jellyfin" link per lesson **Backend:** A simple Node.js Express server (`admin-ui/server.js`) that: - Serves the static admin UI - Provides API endpoints: `GET /api/lessons`, `POST /api/lessons`, `PUT /api/lessons/:id`, `POST /api/compile` (Typst → HTML) - Reads/writes the same SQLite DB at `~/.local/share/jellyfin-lessons/lessons.db` ## Acceptance - `nix run .#admin` starts the admin UI on port 3099 - Can create a new lesson, write Typst content, preview the HTML - Link Jellyfin media items by pasting item UUIDs - Save persists to the SQLite DB - Changes appear in Jellyfin plugin on next load ## Notes The admin UI is separate from the plugin — served independently on n97. Uses the same SQLite DB path. Typst compilation uses the `typst` CLI from the nix dev shell. Keep dependencies minimal: `express`, `better-sqlite3`, and the standard library.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: sscoble/jellyfin-lessons#7
No description provided.