A local-first production dashboard for building AI music videos with a structured pipeline.
The app is designed to keep creative output consistent by treating prompts and references as production assets, not ad-hoc text. It combines:
- A step-based workflow UI (theme -> music -> canon -> references -> shots -> storyboard).
- A Node.js API server (no framework) for project/file operations.
- SeedDream shot generation with continuity-aware reference assembly.
- Optional in-app GitHub-authenticated prompt agents for scoped prompt edits.
Use this project when you want to:
- Keep a repeatable, auditable workflow for AI music video production.
- Generate and review shot prompts per variation (A/B/C/D).
- Manage character/location reference libraries and shot frame references.
- Generate shot previews through Replicate (SeedDream) and decide what to save.
- Track storyboard readiness and selected variation continuity across shots.
- Structured context first: prompts are compiled from canon + shot intent.
- Continuity first: shot generation prefers previous-shot continuity and validated refs.
- Human-in-the-loop: generated previews are reviewed before final save.
- Local ownership: project files remain local and immediately editable.
- Additive architecture: new APIs/features are added without breaking older clients.
- Entry point:
scripts/serve_ui.js - Router:
scripts/router.js - Route modules:
scripts/routes/*.js - Domain services:
scripts/services/*.js - Shared utilities:
scripts/shared.js
The server uses vanilla http with explicit route registration and a shared route context.
- Main shot page:
ui/index.html+ui/app.js - Storyboard:
ui/storyboard.html+ui/storyboard.js - Shared UI layer:
ui/ui-layer.js - State module:
ui/modules/state.js - Service/domain/feature slices under
ui/services,ui/domain,ui/features
Projects are isolated under projects/<projectId>/.
Key folders:
projects/<id>/prompts/projects/<id>/reference/projects/<id>/rendered/shots/projects/<id>/rendered/storyboard/projects/<id>/music/
- Step 1 (
/step1.html): theme, concept, inspiration, mood, genre. - Step 2 (
/step2.html): music context and analysis artifacts. - Step 3 (
/step3.html): canon/bible files (characters, locations, style, script). - Step 4 (
/step4.html): reference libraries and uploads. - Step 5 (
/index.html): shot prompts, generation, continuity, frame saves. - Step 6 (
/storyboard.html): visual review, sequence, readiness.
Current default flow is hybrid:
- Select shot + variation.
- Readiness preflight loads (Replicate, prompt, continuity, refs).
- Click
Generate First + Last Frame. - Review generated previews.
- Use
Quick Accept(batch save first+last) or advanced per-image save. - Optionally
Quick Accept + Next Shotto continue rapidly.
Advanced controls are available behind an expandable panel:
- Generate single ref-based image.
- Auto-upload 14-shot reference set.
- Continuity toggle per shot.
- Replicate key management.
- Agent prompt generation.
- Generation readiness:
GET /api/shot-generation/preflight
- Generation jobs:
POST /api/generation-jobsGET /api/generation-jobs/:jobId/events(SSE)
- Shot previews and saves:
POST /api/save-shot-previewPOST /api/save-shot-previews(batch quick-accept)
- Install dependencies:
npm install- Start server:
npm run serve- Open:
http://localhost:8000
- Validate pipeline health:
npm run health
npm run test:unit- Compile prompts:
npm run compile - Lint prompts:
npm run lint - Rebuild index:
npm run index
The UI also exposes pipeline controls (run-all, status).
You can configure Replicate token in three ways:
- Local-only default token (auto-used when running locally).
.envkey (REPLICATE_API_TOKEN) for persistent default outside local fallback.- Session key in the Step 5 modal (
Replicate Key) for current server session.
See docs/README.md for full architecture and module docs.
Recommended first reads:
docs/workflows/SHOT_FLOW.mddocs/architecture/SERVER.mddocs/architecture/FRONTEND.mddocs/troubleshooting/SHOT_GENERATION.md
- Vanilla Node.js server (
httpmodule). - File-based JSON/text storage.
- No server framework dependency.
- Browser-side JavaScript without build tooling.
MIT