Architecture
Slate system map

System purpose
Scene input to verified production pack
Slate turns a script scene into a versioned production pack with storyboards, an animatic, shot lists, temp audio, captions, provenance, and optional Backblaze B2 archive storage.
Product flow
- Script scene
- Project record
- Version record
- Pipeline events
- Generated assets
- Local or B2 storage
- Provenance manifest
- Hash verification
- Version comparison
- Approved production pack
Runtime architecture
- Next.js UI
- FastAPI backend
- SQLite database
- Mock or Genblaze pipeline runner
- Local storage or Backblaze B2
- Manifest and hash verifier
Frontend screens
- /
- /projects/new
- /projects/[id]
- /projects/[id]/versions/[versionId]
- /projects/[id]/compare
- /public/packs/[slug]
- /architecture
Backend responsibilities
- Create projects and versions
- Run the generation pipeline
- Emit Server-Sent Events for live progress
- Generate or upload assets
- Store asset metadata in SQLite
- Write provenance manifests
- Verify SHA-256 hashes
- Approve and publish production packs
Database
SQLite stores metadata in `projects`, `versions`, `assets`, `pipeline_events`, and `approvals`. Files live in local storage during development or Backblaze B2 when credentials exist.
Storage
Local mode writes to .local-storage/slate/projects/{project_id}/versions/{version_id}/.B2 mode keeps the same local files for verification and stores B2 object keys on each asset row.
Mock output contract
Generated files
scene.txtbrief.jsonscene-breakdown.jsonstyle-bible.jsonshot-list.jsonmood-01.pngmood-02.pngmood-03.pngcharacter-mara.pngframe-01.pngframe-02.pngframe-03.pngframe-04.pngframe-05.pngcaptions.srttemp-audio.mp3animatic.mp4production-pack.zipprovenance-manifest.jsonevents.ndjsonProvider handoff
Genblaze plan
`MockPipelineRunner` owns the working contract. Real Genblaze calls belong in `GenblazePipelineRunner.run`, while preserving event names, asset filenames, manifest fields, and asset table writes.