# nandofmike/moneyprinterturbo architecture

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

- Interactive diagram: https://gitdiagram.com/nandofmike/moneyprinterturbo
- Repository: https://github.com/nandofmike/moneyprinterturbo

## Overview

MoneyPrinterTurbo turns a topic or script into one or more short videos, with WebUI, API, CLI, and agent entry points. Video requests are validated and dispatched through task management; the task service coordinates script generation, media sourcing, voice, subtitles, music, rendering, and optional social publishing. The README documents capabilities not fully visible in the excerpts, so those branches are included with README evidence; internal service links use the task.py reference index. Some implementation details remain unsampled.

Main entry points: [`app/services/task.py`](https://github.com/nandofmike/moneyprinterturbo/blob/main/app/services/task.py) (Task orchestration), [`app/controllers/v1/video.py`](https://github.com/nandofmike/moneyprinterturbo/blob/main/app/controllers/v1/video.py) (Video API), [`app/controllers/manager/base_manager.py`](https://github.com/nandofmike/moneyprinterturbo/blob/main/app/controllers/manager/base_manager.py) (Task manager), [`webui/Main.py`](https://github.com/nandofmike/moneyprinterturbo/blob/main/webui/Main.py) (WebUI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["User entry points"]
  node_webui["WebUI<br/>[Main.py]"]
  node_api["Video API<br/>[video.py]"]
  node_cli["CLI<br/>[cli.py]"]
end

subgraph group_workflow["Video production"]
  node_request["Video request<br/>[schema.py]"]
  node_task["Task orchestration<br/>[task.py]"]
  node_llm["Script generation<br/>[llm.py]"]
  node_material["Material sourcing<br/>[material.py]"]
  node_voice["Voice synthesis<br/>[voice.py]"]
  node_subtitle["Subtitle generation<br/>[subtitle.py]"]
  node_bgm["Background music<br/>[bgm.py]"]
  node_render["Video rendering<br/>[video.py]"]
  node_post["Cross-posting<br/>[upload_post.py]"]
end

subgraph group_runtime["Task runtime"]
  node_manager["Task manager<br/>[base_manager.py]"]
  node_redis_manager["Redis queue<br/>[redis_manager.py]"]
  node_state[("Task state<br/>[state.py]")]
  node_config["Runtime config<br/>[config.py]"]
end

subgraph group_integrations["External integrations"]
  node_media["Media providers<br/>[material.py]"]
  node_speech["Speech providers<br/>[voice.py]"]
  node_models["LLM providers<br/>[llm_provider.py]"]
  node_platforms["Social platforms<br/>[upload_post.py]"]
end

node_creator(("Creator"))

node_creator -->|"uses"| node_webui
node_creator -->|"uses"| node_api
node_creator -->|"uses"| node_cli
node_webui -->|"starts tasks"| node_task
node_api -->|"validates"| node_request
node_api -->|"dispatches"| node_manager
node_cli -->|"starts tasks"| node_task
node_manager -->|"executes"| node_task
node_manager -->|"uses queue"| node_redis_manager
node_redis_manager -->|"patches failures"| node_state
node_task -->|"records progress"| node_state
node_task -->|"reads settings"| node_config
node_task -->|"generates scripts"| node_llm
node_task -->|"gets footage"| node_material
node_task -->|"synthesizes narration"| node_voice
node_task -->|"generates subtitles"| node_subtitle
node_task -->|"adds music"| node_bgm
node_task -->|"assembles video"| node_render
node_task -->|"publishes video"| node_post
node_material -.->|"fetches media"| node_media
node_voice -.->|"uses providers"| node_speech
node_llm -->|"selects provider"| node_models
node_post -.->|"uploads to"| node_platforms

click node_webui "https://github.com/nandofmike/moneyprinterturbo/blob/main/webui/Main.py"
click node_api "https://github.com/nandofmike/moneyprinterturbo/blob/main/app/controllers/v1/video.py"
click node_cli "https://github.com/nandofmike/moneyprinterturbo/blob/main/cli.py"
click node_request "https://github.com/nandofmike/moneyprinterturbo/blob/main/app/models/schema.py"
click node_task "https://github.com/nandofmike/moneyprinterturbo/blob/main/app/services/task.py"
click node_llm "https://github.com/nandofmike/moneyprinterturbo/blob/main/app/services/llm.py"
click node_material "https://github.com/nandofmike/moneyprinterturbo/blob/main/app/services/material.py"
click node_voice "https://github.com/nandofmike/moneyprinterturbo/blob/main/app/services/voice.py"
click node_subtitle "https://github.com/nandofmike/moneyprinterturbo/blob/main/app/services/subtitle.py"
click node_bgm "https://github.com/nandofmike/moneyprinterturbo/blob/main/app/services/bgm.py"
click node_render "https://github.com/nandofmike/moneyprinterturbo/blob/main/app/services/video.py"
click node_post "https://github.com/nandofmike/moneyprinterturbo/blob/main/app/services/upload_post.py"
click node_manager "https://github.com/nandofmike/moneyprinterturbo/blob/main/app/controllers/manager/base_manager.py"
click node_redis_manager "https://github.com/nandofmike/moneyprinterturbo/blob/main/app/controllers/manager/redis_manager.py"
click node_state "https://github.com/nandofmike/moneyprinterturbo/blob/main/app/services/state.py"
click node_config "https://github.com/nandofmike/moneyprinterturbo/blob/main/app/config/config.py"
click node_media "https://github.com/nandofmike/moneyprinterturbo/blob/main/app/services/material.py"
click node_speech "https://github.com/nandofmike/moneyprinterturbo/blob/main/app/services/voice.py"
click node_models "https://github.com/nandofmike/moneyprinterturbo/blob/main/app/models/llm_provider.py"
click node_platforms "https://github.com/nandofmike/moneyprinterturbo/blob/main/app/services/upload_post.py"

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_webui,node_api,node_cli toneBlue
class node_request,node_task,node_llm,node_material,node_voice,node_subtitle,node_bgm,node_render,node_post toneAmber
class node_manager,node_redis_manager,node_state,node_config toneMint
class node_media,node_speech,node_models,node_platforms toneRose
class node_creator toneIndigo
```

## Components

### User entry points

- [WebUI](https://github.com/nandofmike/moneyprinterturbo/blob/main/webui/Main.py): `webui/Main.py`
- [Video API](https://github.com/nandofmike/moneyprinterturbo/blob/main/app/controllers/v1/video.py): `app/controllers/v1/video.py`
- [CLI](https://github.com/nandofmike/moneyprinterturbo/blob/main/cli.py): `cli.py`

### Video production

- [Video request](https://github.com/nandofmike/moneyprinterturbo/blob/main/app/models/schema.py): `app/models/schema.py`
- [Task orchestration](https://github.com/nandofmike/moneyprinterturbo/blob/main/app/services/task.py): `app/services/task.py`
- [Script generation](https://github.com/nandofmike/moneyprinterturbo/blob/main/app/services/llm.py): `app/services/llm.py`
- [Material sourcing](https://github.com/nandofmike/moneyprinterturbo/blob/main/app/services/material.py): `app/services/material.py`
- [Voice synthesis](https://github.com/nandofmike/moneyprinterturbo/blob/main/app/services/voice.py): `app/services/voice.py`
- [Subtitle generation](https://github.com/nandofmike/moneyprinterturbo/blob/main/app/services/subtitle.py): `app/services/subtitle.py`
- [Background music](https://github.com/nandofmike/moneyprinterturbo/blob/main/app/services/bgm.py): `app/services/bgm.py`
- [Video rendering](https://github.com/nandofmike/moneyprinterturbo/blob/main/app/services/video.py): `app/services/video.py`
- [Cross-posting](https://github.com/nandofmike/moneyprinterturbo/blob/main/app/services/upload_post.py): `app/services/upload_post.py`

### Task runtime

- [Task manager](https://github.com/nandofmike/moneyprinterturbo/blob/main/app/controllers/manager/base_manager.py): `app/controllers/manager/base_manager.py`
- [Redis queue](https://github.com/nandofmike/moneyprinterturbo/blob/main/app/controllers/manager/redis_manager.py): `app/controllers/manager/redis_manager.py`
- [Task state](https://github.com/nandofmike/moneyprinterturbo/blob/main/app/services/state.py): `app/services/state.py`
- [Runtime config](https://github.com/nandofmike/moneyprinterturbo/blob/main/app/config/config.py): `app/config/config.py`

### External integrations

- [Media providers](https://github.com/nandofmike/moneyprinterturbo/blob/main/app/services/material.py): `app/services/material.py`
- [Speech providers](https://github.com/nandofmike/moneyprinterturbo/blob/main/app/services/voice.py): `app/services/voice.py`
- [LLM providers](https://github.com/nandofmike/moneyprinterturbo/blob/main/app/models/llm_provider.py): `app/models/llm_provider.py`
- [Social platforms](https://github.com/nandofmike/moneyprinterturbo/blob/main/app/services/upload_post.py): `app/services/upload_post.py`

### Other components

- **Creator**

## Connections

- Creator → WebUI: uses (evidence: `README.md`)
- Creator → Video API: uses (evidence: `README.md`)
- Creator → CLI: uses (evidence: `README.md`)
- WebUI → Task orchestration: starts tasks (evidence: `webui/Main.py`)
- Video API → Video request: validates (evidence: `app/controllers/v1/video.py`)
- Video API → Task manager: dispatches (evidence: `app/controllers/v1/video.py`)
- CLI → Task orchestration: starts tasks (evidence: `cli.py`)
- Task manager → Task orchestration: executes (evidence: `app/controllers/manager/base_manager.py`)
- Task manager → Redis queue: uses queue (evidence: `app/controllers/manager/redis_manager.py`)
- Redis queue → Task state: patches failures (evidence: `app/controllers/manager/redis_manager.py`)
- Task orchestration → Task state: records progress (evidence: `app/services/task.py`)
- Task orchestration → Runtime config: reads settings (evidence: `app/services/task.py`)
- Task orchestration → Script generation: generates scripts (evidence: `app/services/task.py`)
- Task orchestration → Material sourcing: gets footage (evidence: `app/services/task.py`)
- Task orchestration → Voice synthesis: synthesizes narration (evidence: `app/services/task.py`)
- Task orchestration → Subtitle generation: generates subtitles (evidence: `app/services/task.py`)
- Task orchestration → Background music: adds music (evidence: `app/services/task.py`)
- Task orchestration → Video rendering: assembles video (evidence: `app/services/task.py`)
- Task orchestration → Cross-posting: publishes video (evidence: `app/services/task.py`)
- Material sourcing → Media providers: fetches media (evidence: `README.md`)
- Voice synthesis → Speech providers: uses providers (evidence: `README.md`)
- Script generation → LLM providers: selects provider (evidence: `app/services/llm.py`)
- Cross-posting → Social platforms: uploads to (evidence: `README.md`)
