# ashifhusainoo7/moneyprinterturbo architecture

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

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

## Overview

MoneyPrinterTurbo is an AI short-video creation application exposed through a WebUI and HTTP API. A user submits a topic or keywords and video settings; task processing coordinates script generation, material selection, voice/subtitles/music, and video assembly, then tracks the task and exposes the result. The graph also retains provider configuration and the documented media-generation integrations. The task module is sampled only in excerpts, so some stage links rely on its SOURCE INDEX references and README workflow rather than inspected call sites.

Main entry points: [`app/services/task.py`](https://github.com/ashifhusainoo7/moneyprinterturbo/blob/main/app/services/task.py) (Generation workflow), [`app/controllers/v1/video.py`](https://github.com/ashifhusainoo7/moneyprinterturbo/blob/main/app/controllers/v1/video.py) (Video API), [`webui/Main.py`](https://github.com/ashifhusainoo7/moneyprinterturbo/blob/main/webui/Main.py) (WebUI), [`app/services/llm.py`](https://github.com/ashifhusainoo7/moneyprinterturbo/blob/main/app/services/llm.py) (Script generation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["User interfaces"]
  node_webui["WebUI<br/>[Main.py]"]
  node_api["Video API<br/>[video.py]"]
  node_llmapi["LLM API<br/>[llm.py]"]
  node_router["HTTP router<br/>[router.py]"]
end

subgraph group_control["Task control"]
  node_taskmgr["Task manager<br/>[base_manager.py]"]
  node_redis[("Redis queue<br/>[redis_manager.py]")]
  node_task["Generation workflow<br/>[task.py]"]
  node_state["Task state<br/>[state.py]"]
  node_schema["Request schemas<br/>[schema.py]"]
end

subgraph group_creation["Content creation"]
  node_llm["Script generation<br/>[llm.py]"]
  node_providers["LLM providers<br/>[llm_provider.py]"]
  node_material["Stock materials<br/>[material.py]"]
  node_voice["Voice generation<br/>[voice.py]"]
  node_subtitle["Subtitles<br/>[subtitle.py]"]
end

subgraph group_media["Media and providers"]
  node_bgm["Background music<br/>[bgm.py]"]
  node_video["Video assembly<br/>[video.py]"]
  node_project["Video projects<br/>[video_project.py]"]
  node_seedance["Seedance integration"]
  node_ofox["Ofox integration<br/>[ofox.py]"]
  node_loomloom["Loomloom integration<br/>[loomloom.py]"]
end

subgraph group_platform["Runtime services"]
  node_config["Runtime configuration<br/>[config.py]"]
  node_paths["File paths<br/>[paths.py]"]
end

node_user(("Creator"))

node_user -->|"submits request"| node_webui
node_user -->|"submits request"| node_api
node_webui -->|"starts generation"| node_task
node_webui -->|"requests LLM"| node_llm
node_api -->|"validates input"| node_schema
node_api -->|"queues task"| node_taskmgr
node_api -->|"starts generation"| node_task
node_router -->|"routes requests"| node_api
node_router -->|"routes requests"| node_llmapi
node_llmapi -->|"invokes generation"| node_llm
node_taskmgr -->|"executes task"| node_task
node_redis -->|"implements queue"| node_taskmgr
node_task -->|"updates status"| node_state
node_task -->|"generates script"| node_llm
node_task -->|"selects footage"| node_material
node_task -->|"generates narration"| node_voice
node_task -.->|"creates subtitles"| node_subtitle
node_task -->|"adds music"| node_bgm
node_task -.->|"assembles video"| node_video
node_task -.->|"uses project pipeline"| node_project
node_task -->|"dispatches generation"| node_seedance
node_task -->|"dispatches generation"| node_ofox
node_task -->|"dispatches generation"| node_loomloom
node_llm -->|"resolves provider"| node_providers
node_webui -->|"reads settings"| node_config
node_task -->|"reads settings"| node_config
node_task -.->|"uses storage paths"| node_paths

click node_webui "https://github.com/ashifhusainoo7/moneyprinterturbo/blob/main/webui/Main.py"
click node_api "https://github.com/ashifhusainoo7/moneyprinterturbo/blob/main/app/controllers/v1/video.py"
click node_llmapi "https://github.com/ashifhusainoo7/moneyprinterturbo/blob/main/app/controllers/v1/llm.py"
click node_router "https://github.com/ashifhusainoo7/moneyprinterturbo/blob/main/app/router.py"
click node_taskmgr "https://github.com/ashifhusainoo7/moneyprinterturbo/blob/main/app/controllers/manager/base_manager.py"
click node_redis "https://github.com/ashifhusainoo7/moneyprinterturbo/blob/main/app/controllers/manager/redis_manager.py"
click node_task "https://github.com/ashifhusainoo7/moneyprinterturbo/blob/main/app/services/task.py"
click node_state "https://github.com/ashifhusainoo7/moneyprinterturbo/blob/main/app/services/state.py"
click node_schema "https://github.com/ashifhusainoo7/moneyprinterturbo/blob/main/app/models/schema.py"
click node_llm "https://github.com/ashifhusainoo7/moneyprinterturbo/blob/main/app/services/llm.py"
click node_providers "https://github.com/ashifhusainoo7/moneyprinterturbo/blob/main/app/models/llm_provider.py"
click node_material "https://github.com/ashifhusainoo7/moneyprinterturbo/blob/main/app/services/material.py"
click node_voice "https://github.com/ashifhusainoo7/moneyprinterturbo/blob/main/app/services/voice.py"
click node_subtitle "https://github.com/ashifhusainoo7/moneyprinterturbo/blob/main/app/services/subtitle.py"
click node_bgm "https://github.com/ashifhusainoo7/moneyprinterturbo/blob/main/app/services/bgm.py"
click node_video "https://github.com/ashifhusainoo7/moneyprinterturbo/blob/main/app/services/video.py"
click node_project "https://github.com/ashifhusainoo7/moneyprinterturbo/blob/main/app/services/video_project.py"
click node_seedance "https://github.com/ashifhusainoo7/moneyprinterturbo/blob/main/app/services/volcengine_seedance.py"
click node_ofox "https://github.com/ashifhusainoo7/moneyprinterturbo/blob/main/app/services/ofox.py"
click node_loomloom "https://github.com/ashifhusainoo7/moneyprinterturbo/blob/main/app/services/loomloom.py"
click node_config "https://github.com/ashifhusainoo7/moneyprinterturbo/blob/main/app/config/config.py"
click node_paths "https://github.com/ashifhusainoo7/moneyprinterturbo/blob/main/app/paths.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_llmapi,node_router toneBlue
class node_taskmgr,node_redis,node_task,node_state,node_schema toneAmber
class node_llm,node_providers,node_material,node_voice,node_subtitle toneMint
class node_bgm,node_video,node_project,node_seedance,node_ofox,node_loomloom toneRose
class node_config,node_paths,node_user toneIndigo
```

## Components

### User interfaces

- [WebUI](https://github.com/ashifhusainoo7/moneyprinterturbo/blob/main/webui/Main.py): `webui/Main.py`
- [Video API](https://github.com/ashifhusainoo7/moneyprinterturbo/blob/main/app/controllers/v1/video.py): `app/controllers/v1/video.py`
- [LLM API](https://github.com/ashifhusainoo7/moneyprinterturbo/blob/main/app/controllers/v1/llm.py): `app/controllers/v1/llm.py`
- [HTTP router](https://github.com/ashifhusainoo7/moneyprinterturbo/blob/main/app/router.py): `app/router.py`

### Task control

- [Task manager](https://github.com/ashifhusainoo7/moneyprinterturbo/blob/main/app/controllers/manager/base_manager.py): `app/controllers/manager/base_manager.py`
- [Redis queue](https://github.com/ashifhusainoo7/moneyprinterturbo/blob/main/app/controllers/manager/redis_manager.py): `app/controllers/manager/redis_manager.py`
- [Generation workflow](https://github.com/ashifhusainoo7/moneyprinterturbo/blob/main/app/services/task.py): `app/services/task.py`
- [Task state](https://github.com/ashifhusainoo7/moneyprinterturbo/blob/main/app/services/state.py): `app/services/state.py`
- [Request schemas](https://github.com/ashifhusainoo7/moneyprinterturbo/blob/main/app/models/schema.py): `app/models/schema.py`

### Content creation

- [Script generation](https://github.com/ashifhusainoo7/moneyprinterturbo/blob/main/app/services/llm.py): `app/services/llm.py`
- [LLM providers](https://github.com/ashifhusainoo7/moneyprinterturbo/blob/main/app/models/llm_provider.py): `app/models/llm_provider.py`
- [Stock materials](https://github.com/ashifhusainoo7/moneyprinterturbo/blob/main/app/services/material.py): `app/services/material.py`
- [Voice generation](https://github.com/ashifhusainoo7/moneyprinterturbo/blob/main/app/services/voice.py): `app/services/voice.py`
- [Subtitles](https://github.com/ashifhusainoo7/moneyprinterturbo/blob/main/app/services/subtitle.py): `app/services/subtitle.py`

### Media and providers

- [Background music](https://github.com/ashifhusainoo7/moneyprinterturbo/blob/main/app/services/bgm.py): `app/services/bgm.py`
- [Video assembly](https://github.com/ashifhusainoo7/moneyprinterturbo/blob/main/app/services/video.py): `app/services/video.py`
- [Video projects](https://github.com/ashifhusainoo7/moneyprinterturbo/blob/main/app/services/video_project.py): `app/services/video_project.py`
- [Seedance integration](https://github.com/ashifhusainoo7/moneyprinterturbo/blob/main/app/services/volcengine_seedance.py): `app/services/volcengine_seedance.py`
- [Ofox integration](https://github.com/ashifhusainoo7/moneyprinterturbo/blob/main/app/services/ofox.py): `app/services/ofox.py`
- [Loomloom integration](https://github.com/ashifhusainoo7/moneyprinterturbo/blob/main/app/services/loomloom.py): `app/services/loomloom.py`

### Runtime services

- [Runtime configuration](https://github.com/ashifhusainoo7/moneyprinterturbo/blob/main/app/config/config.py): `app/config/config.py`
- [File paths](https://github.com/ashifhusainoo7/moneyprinterturbo/blob/main/app/paths.py): `app/paths.py`

### Other components

- **Creator**

## Connections

- Creator → WebUI: submits request
- Creator → Video API: submits request
- WebUI → Generation workflow: starts generation (evidence: `webui/Main.py`)
- WebUI → Script generation: requests LLM (evidence: `webui/Main.py`)
- Video API → Request schemas: validates input (evidence: `app/controllers/v1/video.py`)
- Video API → Task manager: queues task (evidence: `app/controllers/v1/video.py`)
- Video API → Generation workflow: starts generation (evidence: `app/controllers/v1/video.py`)
- HTTP router → Video API: routes requests (evidence: `app/router.py`)
- HTTP router → LLM API: routes requests (evidence: `app/router.py`)
- LLM API → Script generation: invokes generation (evidence: `app/controllers/v1/llm.py`)
- Task manager → Generation workflow: executes task (evidence: `app/controllers/manager/base_manager.py`)
- Redis queue → Task manager: implements queue (evidence: `app/controllers/manager/redis_manager.py`)
- Generation workflow → Task state: updates status (evidence: `app/services/task.py`)
- Generation workflow → Script generation: generates script (evidence: `app/services/task.py`)
- Generation workflow → Stock materials: selects footage (evidence: `app/services/task.py`)
- Generation workflow → Voice generation: generates narration (evidence: `app/services/task.py`)
- Generation workflow → Subtitles: creates subtitles (evidence: `app/services/task.py`)
- Generation workflow → Background music: adds music (evidence: `app/services/task.py`)
- Generation workflow → Video assembly: assembles video (evidence: `app/services/task.py`)
- Generation workflow → Video projects: uses project pipeline
- Generation workflow → Seedance integration: dispatches generation (evidence: `app/services/task.py`)
- Generation workflow → Ofox integration: dispatches generation (evidence: `app/services/task.py`)
- Generation workflow → Loomloom integration: dispatches generation (evidence: `app/services/task.py`)
- Script generation → LLM providers: resolves provider (evidence: `app/services/llm.py`)
- WebUI → Runtime configuration: reads settings (evidence: `webui/Main.py`)
- Generation workflow → Runtime configuration: reads settings (evidence: `app/services/task.py`)
- Generation workflow → File paths: uses storage paths
