# nheoshikuyanhemo/moneyprinterturbo architecture

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

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

## Overview

MoneyPrinterTurbo turns a topic or keywords into one or more short videos through a web UI or API. The generation workflow covers script and material preparation, voice/audio, subtitles, video composition, and optional social publishing; users can also supply custom scripts and local media. The graph combines sampled calls and indexed references with README-documented capabilities. Some service wiring is not shown in the excerpts, so uncertain links are omitted.

Main entry points: [`app/services/task.py`](https://github.com/nheoshikuyanhemo/moneyprinterturbo/blob/main/app/services/task.py) (Generation workflow), [`app/controllers/v1/video.py`](https://github.com/nheoshikuyanhemo/moneyprinterturbo/blob/main/app/controllers/v1/video.py) (Video API), [`webui/Main.py`](https://github.com/nheoshikuyanhemo/moneyprinterturbo/blob/main/webui/Main.py) (Web interface), [`app/controllers/manager/base_manager.py`](https://github.com/nheoshikuyanhemo/moneyprinterturbo/blob/main/app/controllers/manager/base_manager.py) (Task manager)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["User entry points"]
  node_webui["Web interface<br/>[Main.py]"]
end

subgraph group_control["API and task control"]
  node_api["Video API<br/>[video.py]"]
  node_llm_api["LLM API<br/>[llm.py]"]
  node_task_manager["Task manager<br/>[base_manager.py]"]
  node_redis_manager["Redis queue<br/>[redis_manager.py]"]
end

subgraph group_generation["Video generation"]
  node_task["Generation workflow<br/>[task.py]"]
  node_llm["Script and metadata<br/>[llm.py]"]
  node_material["Video materials<br/>[material.py]"]
  node_voice["Speech synthesis<br/>[voice.py]"]
  node_subtitle["Subtitle processing<br/>[subtitle.py]"]
  node_video["Video composition<br/>[video.py]"]
  node_upload["Social publishing<br/>[upload_post.py]"]
end

subgraph group_support["Configuration and state"]
  node_config["Application settings<br/>[config.py]"]
  node_schemas["Request schemas<br/>[schema.py]"]
  node_state["Task state<br/>[state.py]"]
  node_security["Path validation<br/>[file_security.py]"]
end

subgraph group_integrations["External services"]
  node_llm_providers["LLM providers"]
  node_media_sources["Media sources"]
  node_speech_providers["Speech providers"]
  node_redis[("Redis")]
  node_platforms["Social platforms"]
end

node_user(("Video creator"))

node_user -->|"configures"| node_webui
node_user -->|"submits request"| node_api
node_webui -.->|"starts generation"| node_task
node_api -->|"dispatches task"| node_task_manager
node_api -->|"validates input"| node_schemas
node_api -->|"queries status"| node_state
node_task_manager -->|"runs task"| node_task
node_task_manager -.->|"uses queue implementation"| node_redis_manager
node_redis_manager -->|"stores queued tasks"| node_redis
node_task -.->|"generates script"| node_llm
node_task -.->|"finds footage"| node_material
node_task -->|"creates audio"| node_voice
node_task -->|"creates subtitles"| node_subtitle
node_task -->|"composes video"| node_video
node_task -->|"publishes result"| node_upload
node_task -.->|"updates progress"| node_state
node_llm_api -->|"requests generation"| node_llm
node_llm -->|"calls provider"| node_llm_providers
node_material -.->|"searches footage"| node_media_sources
node_voice -->|"synthesizes speech"| node_speech_providers
node_upload -->|"cross-posts video"| node_platforms
node_task -.->|"validates paths"| node_security
node_webui -->|"edits settings"| node_config
node_task -->|"reads settings"| node_config

click node_webui "https://github.com/nheoshikuyanhemo/moneyprinterturbo/blob/main/webui/Main.py"
click node_api "https://github.com/nheoshikuyanhemo/moneyprinterturbo/blob/main/app/controllers/v1/video.py"
click node_llm_api "https://github.com/nheoshikuyanhemo/moneyprinterturbo/blob/main/app/controllers/v1/llm.py"
click node_task_manager "https://github.com/nheoshikuyanhemo/moneyprinterturbo/blob/main/app/controllers/manager/base_manager.py"
click node_redis_manager "https://github.com/nheoshikuyanhemo/moneyprinterturbo/blob/main/app/controllers/manager/redis_manager.py"
click node_task "https://github.com/nheoshikuyanhemo/moneyprinterturbo/blob/main/app/services/task.py"
click node_llm "https://github.com/nheoshikuyanhemo/moneyprinterturbo/blob/main/app/services/llm.py"
click node_material "https://github.com/nheoshikuyanhemo/moneyprinterturbo/blob/main/app/services/material.py"
click node_voice "https://github.com/nheoshikuyanhemo/moneyprinterturbo/blob/main/app/services/voice.py"
click node_subtitle "https://github.com/nheoshikuyanhemo/moneyprinterturbo/blob/main/app/services/subtitle.py"
click node_video "https://github.com/nheoshikuyanhemo/moneyprinterturbo/blob/main/app/services/video.py"
click node_upload "https://github.com/nheoshikuyanhemo/moneyprinterturbo/blob/main/app/services/upload_post.py"
click node_config "https://github.com/nheoshikuyanhemo/moneyprinterturbo/blob/main/app/config/config.py"
click node_schemas "https://github.com/nheoshikuyanhemo/moneyprinterturbo/blob/main/app/models/schema.py"
click node_state "https://github.com/nheoshikuyanhemo/moneyprinterturbo/blob/main/app/services/state.py"
click node_security "https://github.com/nheoshikuyanhemo/moneyprinterturbo/blob/main/app/utils/file_security.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 toneBlue
class node_api,node_llm_api,node_task_manager,node_redis_manager toneAmber
class node_task,node_llm,node_material,node_voice,node_subtitle,node_video,node_upload toneMint
class node_config,node_schemas,node_state,node_security toneRose
class node_llm_providers,node_media_sources,node_speech_providers,node_redis,node_platforms,node_user toneIndigo
```

## Components

### User entry points

- [Web interface](https://github.com/nheoshikuyanhemo/moneyprinterturbo/blob/main/webui/Main.py): `webui/Main.py`

### API and task control

- [Video API](https://github.com/nheoshikuyanhemo/moneyprinterturbo/blob/main/app/controllers/v1/video.py): `app/controllers/v1/video.py`
- [LLM API](https://github.com/nheoshikuyanhemo/moneyprinterturbo/blob/main/app/controllers/v1/llm.py): `app/controllers/v1/llm.py`
- [Task manager](https://github.com/nheoshikuyanhemo/moneyprinterturbo/blob/main/app/controllers/manager/base_manager.py): `app/controllers/manager/base_manager.py`
- [Redis queue](https://github.com/nheoshikuyanhemo/moneyprinterturbo/blob/main/app/controllers/manager/redis_manager.py): `app/controllers/manager/redis_manager.py`

### Video generation

- [Generation workflow](https://github.com/nheoshikuyanhemo/moneyprinterturbo/blob/main/app/services/task.py): `app/services/task.py`
- [Script and metadata](https://github.com/nheoshikuyanhemo/moneyprinterturbo/blob/main/app/services/llm.py): `app/services/llm.py`
- [Video materials](https://github.com/nheoshikuyanhemo/moneyprinterturbo/blob/main/app/services/material.py): `app/services/material.py`
- [Speech synthesis](https://github.com/nheoshikuyanhemo/moneyprinterturbo/blob/main/app/services/voice.py): `app/services/voice.py`
- [Subtitle processing](https://github.com/nheoshikuyanhemo/moneyprinterturbo/blob/main/app/services/subtitle.py): `app/services/subtitle.py`
- [Video composition](https://github.com/nheoshikuyanhemo/moneyprinterturbo/blob/main/app/services/video.py): `app/services/video.py`
- [Social publishing](https://github.com/nheoshikuyanhemo/moneyprinterturbo/blob/main/app/services/upload_post.py): `app/services/upload_post.py`

### Configuration and state

- [Application settings](https://github.com/nheoshikuyanhemo/moneyprinterturbo/blob/main/app/config/config.py): `app/config/config.py`
- [Request schemas](https://github.com/nheoshikuyanhemo/moneyprinterturbo/blob/main/app/models/schema.py): `app/models/schema.py`
- [Task state](https://github.com/nheoshikuyanhemo/moneyprinterturbo/blob/main/app/services/state.py): `app/services/state.py`
- [Path validation](https://github.com/nheoshikuyanhemo/moneyprinterturbo/blob/main/app/utils/file_security.py): `app/utils/file_security.py`

### External services

- **LLM providers**
- **Media sources**
- **Speech providers**
- **Redis**
- **Social platforms**

### Other components

- **Video creator**

## Connections

- Video creator → Web interface: configures (evidence: `README.md`)
- Video creator → Video API: submits request (evidence: `README.md`)
- Web interface → Generation workflow: starts generation (evidence: `webui/Main.py`)
- Video API → Task manager: dispatches task (evidence: `app/controllers/v1/video.py`)
- Video API → Request schemas: validates input (evidence: `app/controllers/v1/video.py`)
- Video API → Task state: queries status (evidence: `app/controllers/v1/video.py`)
- Task manager → Generation workflow: runs task (evidence: `app/controllers/manager/redis_manager.py`)
- Task manager → Redis queue: uses queue implementation (evidence: `app/controllers/manager/redis_manager.py`)
- Redis queue → Redis: stores queued tasks (evidence: `app/controllers/manager/redis_manager.py`)
- Generation workflow → Script and metadata: generates script (evidence: `app/services/task.py`)
- Generation workflow → Video materials: finds footage (evidence: `app/services/task.py`)
- Generation workflow → Speech synthesis: creates audio (evidence: `app/services/task.py`)
- Generation workflow → Subtitle processing: creates subtitles (evidence: `app/services/task.py`)
- Generation workflow → Video composition: composes video (evidence: `app/services/task.py`)
- Generation workflow → Social publishing: publishes result (evidence: `app/services/task.py`)
- Generation workflow → Task state: updates progress (evidence: `app/services/task.py`)
- LLM API → Script and metadata: requests generation (evidence: `app/controllers/v1/llm.py`)
- Script and metadata → LLM providers: calls provider (evidence: `app/services/llm.py`)
- Video materials → Media sources: searches footage
- Speech synthesis → Speech providers: synthesizes speech (evidence: `app/services/voice.py`)
- Social publishing → Social platforms: cross-posts video
- Generation workflow → Path validation: validates paths (evidence: `app/services/task.py`)
- Web interface → Application settings: edits settings (evidence: `webui/Main.py`)
- Generation workflow → Application settings: reads settings (evidence: `app/services/task.py`)
