# ullrai/cinegen-shortdrama architecture

> Architecture diagram of the GitHub repository ullrai/cinegen-shortdrama, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ullrai/cinegen-shortdrama
- Repository: https://github.com/ullrai/cinegen-shortdrama

## Overview

CineGen is a browser-based AI manga and short-drama production workbench. Users create or reopen a project, turn a story into structured script data and shots, generate character and scene references, design shot keyframes and generate clips, then review sequence status in the export workspace. App.tsx coordinates project state and stage navigation; local persistence and Gemini/Veo generation support the workflow. The export screen presents status and export options, but the sampled evidence does not establish implemented rendering or export actions.

Main entry points: [`App.tsx`](https://github.com/ullrai/cinegen-shortdrama/blob/main/App.tsx) (App coordinator), [`components/Dashboard.tsx`](https://github.com/ullrai/cinegen-shortdrama/blob/main/components/Dashboard.tsx) (Project dashboard), [`components/StageScript.tsx`](https://github.com/ullrai/cinegen-shortdrama/blob/main/components/StageScript.tsx) (Script and storyboard), [`components/StageDirector.tsx`](https://github.com/ullrai/cinegen-shortdrama/blob/main/components/StageDirector.tsx) (Director workbench)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workspace["Project workspace"]
  node_app["App coordinator<br/>[App.tsx]"]
  node_dashboard["Project dashboard<br/>[Dashboard.tsx]"]
  node_sidebar["Stage navigation<br/>[Sidebar.tsx]"]
end

subgraph group_planning["Story planning"]
  node_script["Script and storyboard<br/>[StageScript.tsx]"]
end

subgraph group_production["Visual production"]
  node_assets["Character and scene assets<br/>[StageAssets.tsx]"]
  node_director["Director workbench<br/>[StageDirector.tsx]"]
  node_export["Preview and status<br/>[StageExport.tsx]"]
end

subgraph group_services["Generation and storage"]
  node_script_ai["Script analysis<br/>[geminiService.ts]"]
  node_shot_ai["Shot planning<br/>[geminiService.ts]"]
  node_image_ai["Image generation<br/>[geminiService.ts]"]
  node_video_ai["Video generation<br/>[geminiService.ts]"]
  node_storage["Project persistence<br/>[storageService.ts]"]
  node_indexeddb[("Browser project store")]
end

node_creator(("Creator"))
node_google_ai["Google Gemini and Veo"]
node_browser[("Browser local storage")]

node_creator -->|"opens workbench"| node_app
node_app -->|"shows projects"| node_dashboard
node_dashboard -->|"loads and deletes"| node_storage
node_dashboard -->|"opens project"| node_app
node_app -->|"renders navigation"| node_sidebar
node_sidebar -->|"selects stage"| node_app
node_app -->|"routes script stage"| node_script
node_app -->|"routes assets stage"| node_assets
node_app -->|"routes director stage"| node_director
node_app -->|"routes export stage"| node_export
node_script -->|"parses story"| node_script_ai
node_script -->|"generates shot list"| node_shot_ai
node_assets -->|"generates references"| node_image_ai
node_director -->|"generates keyframes"| node_image_ai
node_director -->|"generates clips"| node_video_ai
node_script_ai -->|"requests Gemini"| node_google_ai
node_shot_ai -->|"requests Gemini"| node_google_ai
node_image_ai -->|"requests images"| node_google_ai
node_video_ai -->|"requests Veo"| node_google_ai
node_app -->|"autosaves projects"| node_storage
node_storage -->|"reads and writes"| node_indexeddb
node_creator -->|"enters API key"| node_browser
node_app -->|"stores API key"| node_browser

click node_app "https://github.com/ullrai/cinegen-shortdrama/blob/main/App.tsx"
click node_dashboard "https://github.com/ullrai/cinegen-shortdrama/blob/main/components/Dashboard.tsx"
click node_sidebar "https://github.com/ullrai/cinegen-shortdrama/blob/main/components/Sidebar.tsx"
click node_script "https://github.com/ullrai/cinegen-shortdrama/blob/main/components/StageScript.tsx"
click node_script_ai "https://github.com/ullrai/cinegen-shortdrama/blob/main/services/geminiService.ts"
click node_shot_ai "https://github.com/ullrai/cinegen-shortdrama/blob/main/services/geminiService.ts"
click node_assets "https://github.com/ullrai/cinegen-shortdrama/blob/main/components/StageAssets.tsx"
click node_director "https://github.com/ullrai/cinegen-shortdrama/blob/main/components/StageDirector.tsx"
click node_image_ai "https://github.com/ullrai/cinegen-shortdrama/blob/main/services/geminiService.ts"
click node_video_ai "https://github.com/ullrai/cinegen-shortdrama/blob/main/services/geminiService.ts"
click node_export "https://github.com/ullrai/cinegen-shortdrama/blob/main/components/StageExport.tsx"
click node_storage "https://github.com/ullrai/cinegen-shortdrama/blob/main/services/storageService.ts"

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_app,node_dashboard,node_sidebar toneBlue
class node_script,node_browser toneAmber
class node_assets,node_director,node_export toneMint
class node_script_ai,node_shot_ai,node_image_ai,node_video_ai,node_storage,node_indexeddb toneRose
class node_creator,node_google_ai toneIndigo
```

## Components

### Project workspace

- [App coordinator](https://github.com/ullrai/cinegen-shortdrama/blob/main/App.tsx): `App.tsx`
- [Project dashboard](https://github.com/ullrai/cinegen-shortdrama/blob/main/components/Dashboard.tsx): `components/Dashboard.tsx`
- [Stage navigation](https://github.com/ullrai/cinegen-shortdrama/blob/main/components/Sidebar.tsx): `components/Sidebar.tsx`

### Story planning

- [Script and storyboard](https://github.com/ullrai/cinegen-shortdrama/blob/main/components/StageScript.tsx): `components/StageScript.tsx`

### Visual production

- [Character and scene assets](https://github.com/ullrai/cinegen-shortdrama/blob/main/components/StageAssets.tsx): `components/StageAssets.tsx`
- [Director workbench](https://github.com/ullrai/cinegen-shortdrama/blob/main/components/StageDirector.tsx): `components/StageDirector.tsx`
- [Preview and status](https://github.com/ullrai/cinegen-shortdrama/blob/main/components/StageExport.tsx): `components/StageExport.tsx`

### Generation and storage

- [Script analysis](https://github.com/ullrai/cinegen-shortdrama/blob/main/services/geminiService.ts): `services/geminiService.ts`
- [Shot planning](https://github.com/ullrai/cinegen-shortdrama/blob/main/services/geminiService.ts): `services/geminiService.ts`
- [Image generation](https://github.com/ullrai/cinegen-shortdrama/blob/main/services/geminiService.ts): `services/geminiService.ts`
- [Video generation](https://github.com/ullrai/cinegen-shortdrama/blob/main/services/geminiService.ts): `services/geminiService.ts`
- [Project persistence](https://github.com/ullrai/cinegen-shortdrama/blob/main/services/storageService.ts): `services/storageService.ts`
- **Browser project store**

### Other components

- **Creator**
- **Google Gemini and Veo**
- **Browser local storage**

## Connections

- Creator → App coordinator: opens workbench (evidence: `README.md`)
- App coordinator → Project dashboard: shows projects (evidence: `App.tsx`)
- Project dashboard → Project persistence: loads and deletes (evidence: `components/Dashboard.tsx`)
- Project dashboard → App coordinator: opens project (evidence: `App.tsx`)
- App coordinator → Stage navigation: renders navigation (evidence: `App.tsx`)
- Stage navigation → App coordinator: selects stage (evidence: `App.tsx`)
- App coordinator → Script and storyboard: routes script stage (evidence: `App.tsx`)
- App coordinator → Character and scene assets: routes assets stage (evidence: `App.tsx`)
- App coordinator → Director workbench: routes director stage (evidence: `App.tsx`)
- App coordinator → Preview and status: routes export stage (evidence: `App.tsx`)
- Script and storyboard → Script analysis: parses story (evidence: `components/StageScript.tsx`)
- Script and storyboard → Shot planning: generates shot list (evidence: `components/StageScript.tsx`)
- Character and scene assets → Image generation: generates references (evidence: `components/StageAssets.tsx`)
- Director workbench → Image generation: generates keyframes (evidence: `components/StageDirector.tsx`)
- Director workbench → Video generation: generates clips (evidence: `components/StageDirector.tsx`)
- Script analysis → Google Gemini and Veo: requests Gemini (evidence: `services/geminiService.ts`)
- Shot planning → Google Gemini and Veo: requests Gemini (evidence: `services/geminiService.ts`)
- Image generation → Google Gemini and Veo: requests images (evidence: `services/geminiService.ts`)
- Video generation → Google Gemini and Veo: requests Veo (evidence: `services/geminiService.ts`)
- App coordinator → Project persistence: autosaves projects (evidence: `App.tsx`)
- Project persistence → Browser project store: reads and writes (evidence: `services/storageService.ts`)
- Creator → Browser local storage: enters API key (evidence: `README.md`)
- App coordinator → Browser local storage: stores API key (evidence: `README.md`)
