Current Implementation Map
Last refreshed: 2026-05-26
Start Here
- Product architecture:
docs/core/SystemArchitecture.md. - Presentation flow:
docs/core/PresentationVideoWorkflow.md. - Routes:
docs/state/RouteMap.md. - Server actions:
docs/state/ServerActionsMap.md. - Payload collections:
docs/state/CollectionMap.md. - Commands and scripts:
docs/state/ScriptsAndCommands.md.
flowchart TD
start["Start here"] --> architecture["ποΈ SystemArchitecture.md"]
start --> workflow["π¬ PresentationVideoWorkflow.md"]
start --> routes["πΊοΈ RouteMap.md"]
start --> actions["π§± ServerActionsMap.md"]
start --> collections["π¦ CollectionMap.md"]
start --> commands["β¨οΈ ScriptsAndCommands.md"]
Canonical Code Paths
- App routes:
src/app. - Payload config:
src/payload.config.ts. - Anuva collections:
src/collections/anuvax/index.ts. - Anuva v1 collections:
src/collections/anuvax/anuva-v1.ts. - Auth:
src/lib/authandsrc/lib/server-actions.ts. - Presentation actions:
src/app/(frontend)/app/presentation/actions.ts. - Presentation config schema:
src/lib/presentation-config/schema.ts. - Anuva v1 contracts:
src/lib/anuva/contracts-v1.ts. - Mastra runtime and workflows:
src/mastra. - RAG ingestion/retrieval:
src/lib/rag. - Billing and coins:
src/lib/billingandsrc/lib/coins.
Generated Files
- Payload types:
src/payload-types.ts. - Payload import map:
src/app/(payload)/admin/importMap.js.
Regenerate these after relevant schema/admin component changes.
Historical Docs
Existing pre-rebuild docs were moved under docs/_stale. Treat them as background only. Prefer current code, this new docs/core set, and this new docs/state set for implementation orientation.
Upgrade Context
The Anuva upgrade target is represented in current code by:
src/lib/anuva/**src/collections/anuvax/anuva-v1.tssrc/mastra/workflows/**- unit tests under
tests/unit/anuva-*
Do not assume every target agent, workflow, source adapter, or persistence entity is fully wired into the product UI.
Current Presentation Create Boundary
The create UI now treats VO script review as a setup-stage boundary before scene details. The UI
generates a narrative preview through generatePresentationNarrativePreview, shows one sentence per
line, then resumes with continuePresentationFromNarrative when the user selects Set/Bot and clicks
Go To Scene Details. The setup Visuals panel was removed; scene-level visual replacement remains in
the Scene Editor.
flowchart LR
setup["Video setup"] --> description["AI-assisted description"]
description --> vo["VO Script Description"]
vo --> preview["Narrative preview"]
preview --> identity["Set, Bot, disabled Brand Kit"]
identity --> resume["Go To Scene Details"]
resume --> editor["Scene Editor visual replacement"]
Current Step 3 Boundary
The active Step 3 implementation now has these constraints:
pauseSecondsis editable per scene and feeds preview timing plus scene-to-scene playback delay.- Voiceover popup edits are draft-only until the user clicks
Done. - Popup
Generate Audiocreates temporary ElevenLabs clips and does not mutate the scene directly. Generate Slides Previewis the compilation boundary for scene edits.Generate VO Audioremains the dirty-or-missing scene audio recovery path.- Mobile Step 3 now uses a vertical editor flow with a sticky preview visual at the top of the scrolling form.
flowchart TD
select["Select scene"] --> pause["Edit pauseSeconds"]
select --> popup["Edit Voiceover popup"]
popup --> temp["Temporary audio draft"]
temp --> cancel["Cancel keeps committed scene"]
temp --> done["Done commits scene text/audio"]
done --> preview["Generate Slides Preview"]
preview --> compiled["Compiled PresentationConfig snapshot"]
External Render Boundary
The final render handoff now flows through a dedicated worker API instead of the older
/api/render-jobs surface.
- Job creation still happens in
src/app/(frontend)/app/presentation/actions.ts. - Worker-facing lifecycle logic now lives under
src/lib/render-worker/**. - Route handlers under
src/app/api/worker/v1/**expose claim, package, status, heartbeat, upload, completion, failure, and cancellation operations. configSnapshot.publicConfigis the canonical source forRenderJobPackage.config.
flowchart LR
action["generatePresentationVideo"] --> jobs["video_generation_jobs"]
jobs --> api["/api/worker/v1"]
api --> package["RenderJobPackage"]
api --> workers["render_workers"]
api --> reports["render_worker_reports"]
package --> python["Anuva Python Server"]