1.2 KiB
1.2 KiB
Speaking Lab Material Edit v1 Implementation Plan
For agentic workers: REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (
- [ ]) syntax for tracking.
Goal: Add backend and admin-page support for editing existing materials, including replacing video and subtitle files.
Architecture: Extend the existing FastAPI/SQLite content-library path with an update helper and PATCH /api/videos/{video_id} endpoint. Reuse the existing admin form as an add/edit form, keeping add mode as the default and switching to edit mode from the material list.
Tech Stack: FastAPI multipart forms, SQLite, vanilla JS, existing CSS.
Tasks
- Backend update helper in
backend/db.py. - PATCH endpoint and safe replacement cleanup in
backend/main.py. - Admin form edit mode in
admin.htmlandadmin.js. - Admin list edit action styling in
styles.css. - Static and API smoke verification.
Verification Commands
python -m py_compile backend\main.py backend\db.py
node --check admin.js
node --check app.js
node tests\admin-file-input.test.mjs
node tests\progress-helpers.test.mjs