# natalia-3nitilab/vita-myth-studio architecture

> Architecture diagram of the GitHub repository natalia-3nitilab/vita-myth-studio, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/natalia-3nitilab/vita-myth-studio
- Repository: https://github.com/natalia-3nitilab/vita-myth-studio

## Overview

vita-myth-studio produces narrated, long-form folklore videos with a persistent 3D VRM performer rather than AI-generated frames. The main workflow runs from a story script through narration and timing, story-beat backdrops, sentence-aware shot planning, and deterministic scene rendering. Supporting branches cover hook and episode packaging, character motion and appearance, and the production dashboard for reviewing episodes, renders, and backgrounds. The README documents several capabilities whose source was not sampled; those are represented at their documented module or directory level, without inferring internal wiring beyond the described workflow.

Main entry points: [`episode/build/render.mjs`](https://github.com/natalia-3nitilab/vita-myth-studio/blob/main/episode/build/render.mjs) (Episode renderer), [`content/orpheus.txt`](https://github.com/natalia-3nitilab/vita-myth-studio/blob/main/content/orpheus.txt) (Story script), [`dashboard/index.html`](https://github.com/natalia-3nitilab/vita-myth-studio/blob/main/dashboard/index.html) (Review dashboard), [`episode/build/tts.py`](https://github.com/natalia-3nitilab/vita-myth-studio/blob/main/episode/build/tts.py) (Speech synthesis)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_writing["Story preparation"]
  node_story["Story script<br/>[orpheus.txt]"]
  node_scriptgen["Script generation<br/>[script.py]"]
  node_hookgen["Hook variations<br/>[hooks.py]"]
  node_packaging["Episode packaging<br/>[package.py]"]
end

subgraph group_audio["Narration and settings"]
  node_tts["Speech synthesis<br/>[tts.py]"]
  node_envelope["Mouth timing<br/>[envelope.py]"]
end

subgraph group_visuals["Scene and character"]
  node_backdrops["Backdrop generation<br/>[backdrops.py]"]
  node_motion["Motion retargeting<br/>[retarget.mjs]"]
  node_looks["Character looks<br/>[looks.mjs]"]
  node_props["Scene dressing<br/>[props.mjs]"]
  node_scene["3D stage<br/>[scene.html]"]
end

subgraph group_rendering["Episode rendering"]
  node_planner["Shot planning<br/>[plan.mjs]"]
  node_renderer["Episode renderer<br/>[render.mjs]"]
  node_episodevideo["Rendered episode<br/>[render.mjs]"]
end

subgraph group_desk["Production desk"]
  node_dashboard["Review dashboard<br/>[index.html]"]
  node_artifactstore[("Dashboard storage<br/>[index.html]")]
end

node_creator(("Episode creator"))
node_vertex{{"Vertex AI"}}
node_kokoro{{"Kokoro TTS"}}
node_ffmpeg{{"FFmpeg"}}

node_creator -->|"writes"| node_story
node_creator -->|"requests script"| node_scriptgen
node_scriptgen -.->|"generates with"| node_vertex
node_scriptgen -->|"writes script"| node_story
node_hookgen -->|"reads script"| node_story
node_packaging -->|"packages metadata"| node_story
node_creator -->|"requests hooks"| node_hookgen
node_creator -->|"requests options"| node_packaging
node_tts -->|"reads script"| node_story
node_tts -->|"synthesizes with"| node_kokoro
node_tts -->|"provides narration"| node_envelope
node_backdrops -->|"reads story beats"| node_story
node_backdrops -.->|"generates locations"| node_vertex
node_motion -->|"provides animation"| node_scene
node_looks -->|"provides appearance"| node_scene
node_props -->|"provides set pieces"| node_scene
node_planner -->|"reads sentences"| node_story
node_planner -->|"uses locations"| node_backdrops
node_renderer -->|"gets shot plan"| node_planner
node_renderer -->|"uses narration"| node_tts
node_renderer -->|"uses mouth timing"| node_envelope
node_renderer -->|"drives frames"| node_scene
node_renderer -->|"assembles video"| node_ffmpeg
node_renderer -->|"writes output"| node_episodevideo
node_dashboard -->|"reads and writes"| node_artifactstore
node_creator -->|"reviews episodes"| node_dashboard
node_dashboard -->|"reviews render"| node_episodevideo
node_dashboard -->|"reviews locations"| node_backdrops

click node_story "https://github.com/natalia-3nitilab/vita-myth-studio/blob/main/content/orpheus.txt"
click node_scriptgen "https://github.com/natalia-3nitilab/vita-myth-studio/blob/main/episode/build/script.py"
click node_hookgen "https://github.com/natalia-3nitilab/vita-myth-studio/blob/main/episode/build/hooks.py"
click node_packaging "https://github.com/natalia-3nitilab/vita-myth-studio/blob/main/episode/build/package.py"
click node_tts "https://github.com/natalia-3nitilab/vita-myth-studio/blob/main/episode/build/tts.py"
click node_envelope "https://github.com/natalia-3nitilab/vita-myth-studio/blob/main/episode/build/envelope.py"
click node_backdrops "https://github.com/natalia-3nitilab/vita-myth-studio/blob/main/episode/build/backdrops.py"
click node_motion "https://github.com/natalia-3nitilab/vita-myth-studio/blob/main/stage/retarget.mjs"
click node_looks "https://github.com/natalia-3nitilab/vita-myth-studio/blob/main/stage/looks.mjs"
click node_props "https://github.com/natalia-3nitilab/vita-myth-studio/blob/main/stage/props.mjs"
click node_scene "https://github.com/natalia-3nitilab/vita-myth-studio/blob/main/stage/scene.html"
click node_planner "https://github.com/natalia-3nitilab/vita-myth-studio/blob/main/episode/build/plan.mjs"
click node_renderer "https://github.com/natalia-3nitilab/vita-myth-studio/blob/main/episode/build/render.mjs"
click node_episodevideo "https://github.com/natalia-3nitilab/vita-myth-studio/blob/main/episode/build/render.mjs"
click node_dashboard "https://github.com/natalia-3nitilab/vita-myth-studio/blob/main/dashboard/index.html"
click node_artifactstore "https://github.com/natalia-3nitilab/vita-myth-studio/blob/main/dashboard/index.html"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_story,node_scriptgen,node_hookgen,node_packaging toneBlue
class node_tts,node_envelope toneAmber
class node_backdrops,node_motion,node_looks,node_props,node_scene toneMint
class node_planner,node_renderer,node_episodevideo toneRose
class node_dashboard,node_artifactstore,node_creator,node_vertex,node_kokoro,node_ffmpeg toneIndigo
```

## Components

### Story preparation

- [Story script](https://github.com/natalia-3nitilab/vita-myth-studio/blob/main/content/orpheus.txt): `content/orpheus.txt`
- [Script generation](https://github.com/natalia-3nitilab/vita-myth-studio/blob/main/episode/build/script.py): `episode/build/script.py`
- [Hook variations](https://github.com/natalia-3nitilab/vita-myth-studio/blob/main/episode/build/hooks.py): `episode/build/hooks.py`
- [Episode packaging](https://github.com/natalia-3nitilab/vita-myth-studio/blob/main/episode/build/package.py): `episode/build/package.py`

### Narration and settings

- [Speech synthesis](https://github.com/natalia-3nitilab/vita-myth-studio/blob/main/episode/build/tts.py): `episode/build/tts.py`
- [Mouth timing](https://github.com/natalia-3nitilab/vita-myth-studio/blob/main/episode/build/envelope.py): `episode/build/envelope.py`

### Scene and character

- [Backdrop generation](https://github.com/natalia-3nitilab/vita-myth-studio/blob/main/episode/build/backdrops.py): `episode/build/backdrops.py`
- [Motion retargeting](https://github.com/natalia-3nitilab/vita-myth-studio/blob/main/stage/retarget.mjs): `stage/retarget.mjs`
- [Character looks](https://github.com/natalia-3nitilab/vita-myth-studio/blob/main/stage/looks.mjs): `stage/looks.mjs`
- [Scene dressing](https://github.com/natalia-3nitilab/vita-myth-studio/blob/main/stage/props.mjs): `stage/props.mjs`
- [3D stage](https://github.com/natalia-3nitilab/vita-myth-studio/blob/main/stage/scene.html): `stage/scene.html`

### Episode rendering

- [Shot planning](https://github.com/natalia-3nitilab/vita-myth-studio/blob/main/episode/build/plan.mjs): `episode/build/plan.mjs`
- [Episode renderer](https://github.com/natalia-3nitilab/vita-myth-studio/blob/main/episode/build/render.mjs): `episode/build/render.mjs`
- [Rendered episode](https://github.com/natalia-3nitilab/vita-myth-studio/blob/main/episode/build/render.mjs): `episode/build/render.mjs`

### Production desk

- [Review dashboard](https://github.com/natalia-3nitilab/vita-myth-studio/blob/main/dashboard/index.html): `dashboard/index.html`
- [Dashboard storage](https://github.com/natalia-3nitilab/vita-myth-studio/blob/main/dashboard/index.html): `dashboard/index.html`

### Other components

- **Episode creator**
- **Vertex AI**
- **Kokoro TTS**
- **FFmpeg**

## Connections

- Episode creator → Story script: writes
- Episode creator → Script generation: requests script
- Script generation → Vertex AI: generates with
- Script generation → Story script: writes script
- Hook variations → Story script: reads script
- Episode packaging → Story script: packages metadata
- Episode creator → Hook variations: requests hooks
- Episode creator → Episode packaging: requests options
- Speech synthesis → Story script: reads script
- Speech synthesis → Kokoro TTS: synthesizes with
- Speech synthesis → Mouth timing: provides narration
- Backdrop generation → Story script: reads story beats
- Backdrop generation → Vertex AI: generates locations
- Motion retargeting → 3D stage: provides animation
- Character looks → 3D stage: provides appearance
- Scene dressing → 3D stage: provides set pieces
- Shot planning → Story script: reads sentences
- Shot planning → Backdrop generation: uses locations
- Episode renderer → Shot planning: gets shot plan
- Episode renderer → Speech synthesis: uses narration
- Episode renderer → Mouth timing: uses mouth timing
- Episode renderer → 3D stage: drives frames
- Episode renderer → FFmpeg: assembles video
- Episode renderer → Rendered episode: writes output
- Review dashboard → Dashboard storage: reads and writes
- Episode creator → Review dashboard: reviews episodes
- Review dashboard → Rendered episode: reviews render
- Review dashboard → Backdrop generation: reviews locations
