# lcy362/free-short-video-studio architecture

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

- Interactive diagram: https://gitdiagram.com/lcy362/free-short-video-studio
- Repository: https://github.com/lcy362/free-short-video-studio

## Overview

FreeShortVideoStudio is a browser-based AI short-video maker. Users configure an idea, generate and edit scenes, request per-scene videos, then stitch and download the result locally. The README also describes project recovery, model selection, multiple Agnes domains, and language support. Source excerpts show the main client-to-rendering, orchestration, API, persistence, and FFmpeg paths; some UI wiring and the scene-splitting call are not shown, so those links are marked unverified.

Main entry points: [`studio-core/StudioClient.tsx`](https://github.com/lcy362/free-short-video-studio/blob/main/studio-core/StudioClient.tsx) (Studio client), [`studio-core/lib/orchestrator.ts`](https://github.com/lcy362/free-short-video-studio/blob/main/studio-core/lib/orchestrator.ts) (Generation orchestrator), [`studio-core/lib/video-api.ts`](https://github.com/lcy362/free-short-video-studio/blob/main/studio-core/lib/video-api.ts) (Video API client), [`app/page.tsx`](https://github.com/lcy362/free-short-video-studio/blob/main/app/page.tsx) (Localized page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Studio entry"]
  node_page["Localized page<br/>[page.tsx]"]
  node_landing["Studio landing<br/>[StudioLanding.tsx]"]
  node_client["Studio client<br/>[StudioClient.tsx]"]
end

subgraph group_creation["Scene creation"]
  node_idea["Idea and options<br/>[IdeaInput.tsx]"]
  node_chat["Scene splitting<br/>[chat-api.ts]"]
  node_prompts["Prompt templates"]
  node_scenes["Scene editing<br/>[SceneList.tsx]"]
end

subgraph group_generation["Video generation"]
  node_orchestrator["Generation orchestrator<br/>[orchestrator.ts]"]
  node_video_api["Video API client<br/>[video-api.ts]"]
  node_agnes{{"Agnes AI API"}}
  node_domains["Domain failover<br/>[api-domains.ts]"]
  node_models["Video model config<br/>[video-models.ts]"]
  node_limiter["Submit rate limiter<br/>[rate-limiter.ts]"]
end

subgraph group_rendering["Local rendering"]
  node_ffmpeg_loader["FFmpeg loading UI<br/>[FFmpegLoader.tsx]"]
  node_ffmpeg["FFmpeg service<br/>[ffmpeg-service.ts]"]
  node_preview["Video preview and download<br/>[VideoPreview.tsx]"]
  node_proxy["Video download proxy<br/>[&#91;&#91;path&#93;&#93;.ts]"]
end

subgraph group_support["State and settings"]
  node_api_key["API key panel<br/>[ApiKeyPanel.tsx]"]
  node_task_store[("Project persistence<br/>[task-store.ts]")]
  node_tasks["Task list<br/>[TaskList.tsx]"]
  node_logger["Studio logger<br/>[logger.ts]"]
  node_log_panel["Log panel<br/>[LogPanel.tsx]"]
end

node_creator(("Studio user"))

node_creator -->|"opens"| node_page
node_page -->|"renders"| node_landing
node_landing -->|"renders"| node_client
node_client -->|"creates"| node_orchestrator
node_orchestrator -->|"submits and polls"| node_video_api
node_video_api -->|"requests videos"| node_agnes
node_video_api -->|"uses failover"| node_domains
node_orchestrator -->|"waits between submits"| node_limiter
node_orchestrator -->|"records progress"| node_logger
node_client -->|"loads and saves projects"| node_task_store
node_tasks -->|"reads tasks"| node_task_store
node_log_panel -->|"reads logs"| node_logger
node_client -->|"loads and processes clips"| node_ffmpeg
node_client -->|"renders during processing"| node_ffmpeg_loader
node_client -->|"renders completed video"| node_preview
node_video_api -->|"downloads via proxy"| node_proxy
node_client -.->|"uses key panel"| node_api_key
node_client -.->|"collects settings"| node_idea
node_client -.->|"requests scene split"| node_chat
node_chat -.->|"uses templates"| node_prompts
node_client -.->|"edits scene list"| node_scenes
node_client -->|"loads model choice"| node_models
node_ffmpeg -->|"loads engine from CDN"| node_agnes

click node_page "https://github.com/lcy362/free-short-video-studio/blob/main/app/page.tsx"
click node_landing "https://github.com/lcy362/free-short-video-studio/blob/main/components/StudioLanding.tsx"
click node_client "https://github.com/lcy362/free-short-video-studio/blob/main/studio-core/StudioClient.tsx"
click node_api_key "https://github.com/lcy362/free-short-video-studio/blob/main/studio-core/ApiKeyPanel.tsx"
click node_idea "https://github.com/lcy362/free-short-video-studio/blob/main/studio-core/components/IdeaInput.tsx"
click node_chat "https://github.com/lcy362/free-short-video-studio/blob/main/studio-core/lib/chat-api.ts"
click node_prompts "https://github.com/lcy362/free-short-video-studio/blob/main/studio-core/lib/prompt-templates.ts"
click node_scenes "https://github.com/lcy362/free-short-video-studio/blob/main/studio-core/components/SceneList.tsx"
click node_orchestrator "https://github.com/lcy362/free-short-video-studio/blob/main/studio-core/lib/orchestrator.ts"
click node_video_api "https://github.com/lcy362/free-short-video-studio/blob/main/studio-core/lib/video-api.ts"
click node_domains "https://github.com/lcy362/free-short-video-studio/blob/main/studio-core/lib/api-domains.ts"
click node_models "https://github.com/lcy362/free-short-video-studio/blob/main/studio-core/lib/video-models.ts"
click node_limiter "https://github.com/lcy362/free-short-video-studio/blob/main/studio-core/lib/rate-limiter.ts"
click node_task_store "https://github.com/lcy362/free-short-video-studio/blob/main/studio-core/lib/task-store.ts"
click node_tasks "https://github.com/lcy362/free-short-video-studio/blob/main/studio-core/components/TaskList.tsx"
click node_logger "https://github.com/lcy362/free-short-video-studio/blob/main/studio-core/lib/logger.ts"
click node_log_panel "https://github.com/lcy362/free-short-video-studio/blob/main/studio-core/components/LogPanel.tsx"
click node_ffmpeg_loader "https://github.com/lcy362/free-short-video-studio/blob/main/studio-core/components/FFmpegLoader.tsx"
click node_ffmpeg "https://github.com/lcy362/free-short-video-studio/blob/main/studio-core/lib/ffmpeg-service.ts"
click node_preview "https://github.com/lcy362/free-short-video-studio/blob/main/studio-core/components/VideoPreview.tsx"
click node_proxy "https://github.com/lcy362/free-short-video-studio/blob/main/functions/api/video-download/%5B%5Bpath%5D%5D.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_page,node_landing,node_client,node_creator toneBlue
class node_idea,node_chat,node_prompts,node_scenes toneAmber
class node_orchestrator,node_video_api,node_agnes,node_domains,node_models,node_limiter toneMint
class node_ffmpeg_loader,node_ffmpeg,node_preview,node_proxy toneRose
class node_api_key,node_task_store,node_tasks,node_logger,node_log_panel toneIndigo
```

## Components

### Studio entry

- [Localized page](https://github.com/lcy362/free-short-video-studio/blob/main/app/page.tsx): `app/page.tsx`
- [Studio landing](https://github.com/lcy362/free-short-video-studio/blob/main/components/StudioLanding.tsx): `components/StudioLanding.tsx`
- [Studio client](https://github.com/lcy362/free-short-video-studio/blob/main/studio-core/StudioClient.tsx): `studio-core/StudioClient.tsx`

### Scene creation

- [Idea and options](https://github.com/lcy362/free-short-video-studio/blob/main/studio-core/components/IdeaInput.tsx): `studio-core/components/IdeaInput.tsx`
- [Scene splitting](https://github.com/lcy362/free-short-video-studio/blob/main/studio-core/lib/chat-api.ts): `studio-core/lib/chat-api.ts`
- [Prompt templates](https://github.com/lcy362/free-short-video-studio/blob/main/studio-core/lib/prompt-templates.ts): `studio-core/lib/prompt-templates.ts`
- [Scene editing](https://github.com/lcy362/free-short-video-studio/blob/main/studio-core/components/SceneList.tsx): `studio-core/components/SceneList.tsx`

### Video generation

- [Generation orchestrator](https://github.com/lcy362/free-short-video-studio/blob/main/studio-core/lib/orchestrator.ts): `studio-core/lib/orchestrator.ts`
- [Video API client](https://github.com/lcy362/free-short-video-studio/blob/main/studio-core/lib/video-api.ts): `studio-core/lib/video-api.ts`
- **Agnes AI API**
- [Domain failover](https://github.com/lcy362/free-short-video-studio/blob/main/studio-core/lib/api-domains.ts): `studio-core/lib/api-domains.ts`
- [Video model config](https://github.com/lcy362/free-short-video-studio/blob/main/studio-core/lib/video-models.ts): `studio-core/lib/video-models.ts`
- [Submit rate limiter](https://github.com/lcy362/free-short-video-studio/blob/main/studio-core/lib/rate-limiter.ts): `studio-core/lib/rate-limiter.ts`

### Local rendering

- [FFmpeg loading UI](https://github.com/lcy362/free-short-video-studio/blob/main/studio-core/components/FFmpegLoader.tsx): `studio-core/components/FFmpegLoader.tsx`
- [FFmpeg service](https://github.com/lcy362/free-short-video-studio/blob/main/studio-core/lib/ffmpeg-service.ts): `studio-core/lib/ffmpeg-service.ts`
- [Video preview and download](https://github.com/lcy362/free-short-video-studio/blob/main/studio-core/components/VideoPreview.tsx): `studio-core/components/VideoPreview.tsx`
- [Video download proxy](https://github.com/lcy362/free-short-video-studio/blob/main/functions/api/video-download/%5B%5Bpath%5D%5D.ts): `functions/api/video-download/[[path]].ts`

### State and settings

- [API key panel](https://github.com/lcy362/free-short-video-studio/blob/main/studio-core/ApiKeyPanel.tsx): `studio-core/ApiKeyPanel.tsx`
- [Project persistence](https://github.com/lcy362/free-short-video-studio/blob/main/studio-core/lib/task-store.ts): `studio-core/lib/task-store.ts`
- [Task list](https://github.com/lcy362/free-short-video-studio/blob/main/studio-core/components/TaskList.tsx): `studio-core/components/TaskList.tsx`
- [Studio logger](https://github.com/lcy362/free-short-video-studio/blob/main/studio-core/lib/logger.ts): `studio-core/lib/logger.ts`
- [Log panel](https://github.com/lcy362/free-short-video-studio/blob/main/studio-core/components/LogPanel.tsx): `studio-core/components/LogPanel.tsx`

### Other components

- **Studio user**

## Connections

- Studio user → Localized page: opens (evidence: `README.md`)
- Localized page → Studio landing: renders (evidence: `app/page.tsx`)
- Studio landing → Studio client: renders (evidence: `components/StudioLanding.tsx`)
- Studio client → Generation orchestrator: creates (evidence: `studio-core/StudioClient.tsx`)
- Generation orchestrator → Video API client: submits and polls (evidence: `studio-core/lib/orchestrator.ts`)
- Video API client → Agnes AI API: requests videos (evidence: `studio-core/lib/video-api.ts`)
- Video API client → Domain failover: uses failover (evidence: `studio-core/lib/video-api.ts`)
- Generation orchestrator → Submit rate limiter: waits between submits (evidence: `studio-core/lib/orchestrator.ts`)
- Generation orchestrator → Studio logger: records progress (evidence: `studio-core/lib/orchestrator.ts`)
- Studio client → Project persistence: loads and saves projects (evidence: `studio-core/StudioClient.tsx`)
- Task list → Project persistence: reads tasks (evidence: `studio-core/components/TaskList.tsx`)
- Log panel → Studio logger: reads logs (evidence: `studio-core/components/LogPanel.tsx`)
- Studio client → FFmpeg service: loads and processes clips (evidence: `studio-core/StudioClient.tsx`)
- Studio client → FFmpeg loading UI: renders during processing (evidence: `studio-core/StudioClient.tsx`)
- Studio client → Video preview and download: renders completed video (evidence: `studio-core/StudioClient.tsx`)
- Video API client → Video download proxy: downloads via proxy (evidence: `studio-core/lib/video-api.ts`)
- Studio client → API key panel: uses key panel (evidence: `studio-core/StudioClient.tsx`)
- Studio client → Idea and options: collects settings (evidence: `studio-core/StudioClient.tsx`)
- Studio client → Scene splitting: requests scene split (evidence: `studio-core/StudioClient.tsx`)
- Scene splitting → Prompt templates: uses templates (evidence: `studio-core/lib/chat-api.ts`)
- Studio client → Scene editing: edits scene list (evidence: `studio-core/StudioClient.tsx`)
- Studio client → Video model config: loads model choice (evidence: `studio-core/StudioClient.tsx`)
- FFmpeg service → Agnes AI API: loads engine from CDN (evidence: `studio-core/lib/ffmpeg-service.ts`)
