# asad-ismail/moneyprinterturbo-extended architecture

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

- Interactive diagram: https://gitdiagram.com/asad-ismail/moneyprinterturbo-extended
- Repository: https://github.com/asad-ismail/moneyprinterturbo-extended

## Overview

MoneyPrinterTurbo is a web-backed video-generation application: users configure a topic or script, speech, visuals, and subtitle styling, then produce a finished video. The documented workflow includes LLM-assisted scripts and search terms, semantic matching of visuals, voice synthesis with word timing, and video composition. The tree and excerpts identify the API, services, and task managers; several service implementations and API wiring were not sampled, so those orchestration links are shown only at a high level.

Main entry points: [`app/services/task.py`](https://github.com/asad-ismail/moneyprinterturbo-extended/blob/main/app/services/task.py) (Generation workflow), [`app/services/video.py`](https://github.com/asad-ismail/moneyprinterturbo-extended/blob/main/app/services/video.py) (Video composition), [`app/router.py`](https://github.com/asad-ismail/moneyprinterturbo-extended/blob/main/app/router.py) (API router), [`app/controllers/manager/base_manager.py`](https://github.com/asad-ismail/moneyprinterturbo-extended/blob/main/app/controllers/manager/base_manager.py) (Task scheduler)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interfaces["User interfaces"]
  node_webui["Streamlit interface<br/>[Main.py]"]
end

subgraph group_api["API and tasks"]
  node_entry["ASGI application<br/>[asgi.py]"]
  node_router["API router<br/>[router.py]"]
  node_video_api["Video endpoints<br/>[video.py]"]
  node_llm_api["Script endpoints<br/>[llm.py]"]
  node_schema["Request schemas<br/>[schema.py]"]
  node_task["Generation workflow<br/>[task.py]"]
  node_manager["Task scheduler<br/>[base_manager.py]"]
  node_memory["Memory queue<br/>[memory_manager.py]"]
  node_redis_manager["Redis queue<br/>[redis_manager.py]"]
end

subgraph group_production["Media production"]
  node_llm["LLM generation<br/>[llm.py]"]
  node_material["Visual sourcing<br/>[material.py]"]
  node_semantic["Semantic matching<br/>[semantic_video.py]"]
  node_voice["Speech and timing<br/>[voice.py]"]
  node_subtitle["Subtitle rendering<br/>[subtitle.py]"]
  node_video["Video composition<br/>[video.py]"]
  node_effects["Video effects<br/>[video_effects.py]"]
  node_state["Task state<br/>[state.py]"]
end

subgraph group_integrations["Models and sources"]
  node_llm_provider{{"LLM providers"}}
  node_stock_sources{{"Stock video sources"}}
  node_chatterbox{{"Chatterbox and WhisperX"}}
  node_azure_speech{{"Azure speech"}}
  node_redis[("Redis service")]
end

node_user(("Video creator"))
node_finished_video["Generated video"]

node_user -->|"configures"| node_webui
node_user -->|"submits requests"| node_entry
node_entry -->|"serves routes"| node_router
node_router -->|"dispatches"| node_video_api
node_router -->|"dispatches"| node_llm_api
node_llm_api -->|"requests generation"| node_llm
node_llm -.->|"queries"| node_llm_provider
node_video_api -->|"starts generation"| node_task
node_task -->|"schedules"| node_manager
node_manager -->|"uses queue"| node_memory
node_manager -.->|"uses queue"| node_redis_manager
node_redis_manager -.->|"stores queued tasks"| node_redis
node_task -->|"generates content"| node_llm
node_task -->|"sources visuals"| node_material
node_material -->|"matches script meaning"| node_semantic
node_material -.->|"searches"| node_stock_sources
node_task -->|"synthesizes narration"| node_voice
node_voice -.->|"synthesizes and aligns"| node_chatterbox
node_voice -.->|"synthesizes"| node_azure_speech
node_task -->|"composes video"| node_video
node_video -->|"renders captions"| node_subtitle
node_video -->|"applies effects"| node_effects
node_task -->|"tracks progress"| node_state
node_video -->|"produces"| node_finished_video

click node_webui "https://github.com/asad-ismail/moneyprinterturbo-extended/blob/main/webui/Main.py"
click node_entry "https://github.com/asad-ismail/moneyprinterturbo-extended/blob/main/app/asgi.py"
click node_router "https://github.com/asad-ismail/moneyprinterturbo-extended/blob/main/app/router.py"
click node_video_api "https://github.com/asad-ismail/moneyprinterturbo-extended/blob/main/app/controllers/v1/video.py"
click node_llm_api "https://github.com/asad-ismail/moneyprinterturbo-extended/blob/main/app/controllers/v1/llm.py"
click node_schema "https://github.com/asad-ismail/moneyprinterturbo-extended/blob/main/app/models/schema.py"
click node_task "https://github.com/asad-ismail/moneyprinterturbo-extended/blob/main/app/services/task.py"
click node_manager "https://github.com/asad-ismail/moneyprinterturbo-extended/blob/main/app/controllers/manager/base_manager.py"
click node_memory "https://github.com/asad-ismail/moneyprinterturbo-extended/blob/main/app/controllers/manager/memory_manager.py"
click node_redis_manager "https://github.com/asad-ismail/moneyprinterturbo-extended/blob/main/app/controllers/manager/redis_manager.py"
click node_llm "https://github.com/asad-ismail/moneyprinterturbo-extended/blob/main/app/services/llm.py"
click node_material "https://github.com/asad-ismail/moneyprinterturbo-extended/blob/main/app/services/material.py"
click node_semantic "https://github.com/asad-ismail/moneyprinterturbo-extended/blob/main/app/services/semantic_video.py"
click node_voice "https://github.com/asad-ismail/moneyprinterturbo-extended/blob/main/app/services/voice.py"
click node_subtitle "https://github.com/asad-ismail/moneyprinterturbo-extended/blob/main/app/services/subtitle.py"
click node_video "https://github.com/asad-ismail/moneyprinterturbo-extended/blob/main/app/services/video.py"
click node_effects "https://github.com/asad-ismail/moneyprinterturbo-extended/blob/main/app/services/utils/video_effects.py"
click node_state "https://github.com/asad-ismail/moneyprinterturbo-extended/blob/main/app/services/state.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_entry,node_router,node_video_api,node_llm_api,node_schema,node_task,node_manager,node_memory,node_redis_manager toneAmber
class node_llm,node_material,node_semantic,node_voice,node_subtitle,node_video,node_effects,node_state toneMint
class node_llm_provider,node_stock_sources,node_chatterbox,node_azure_speech,node_redis toneRose
class node_user,node_finished_video toneIndigo
```

## Components

### User interfaces

- [Streamlit interface](https://github.com/asad-ismail/moneyprinterturbo-extended/blob/main/webui/Main.py): `webui/Main.py`

### API and tasks

- [ASGI application](https://github.com/asad-ismail/moneyprinterturbo-extended/blob/main/app/asgi.py): `app/asgi.py`
- [API router](https://github.com/asad-ismail/moneyprinterturbo-extended/blob/main/app/router.py): `app/router.py`
- [Video endpoints](https://github.com/asad-ismail/moneyprinterturbo-extended/blob/main/app/controllers/v1/video.py): `app/controllers/v1/video.py`
- [Script endpoints](https://github.com/asad-ismail/moneyprinterturbo-extended/blob/main/app/controllers/v1/llm.py): `app/controllers/v1/llm.py`
- [Request schemas](https://github.com/asad-ismail/moneyprinterturbo-extended/blob/main/app/models/schema.py): `app/models/schema.py`
- [Generation workflow](https://github.com/asad-ismail/moneyprinterturbo-extended/blob/main/app/services/task.py): `app/services/task.py`
- [Task scheduler](https://github.com/asad-ismail/moneyprinterturbo-extended/blob/main/app/controllers/manager/base_manager.py): `app/controllers/manager/base_manager.py`
- [Memory queue](https://github.com/asad-ismail/moneyprinterturbo-extended/blob/main/app/controllers/manager/memory_manager.py): `app/controllers/manager/memory_manager.py`
- [Redis queue](https://github.com/asad-ismail/moneyprinterturbo-extended/blob/main/app/controllers/manager/redis_manager.py): `app/controllers/manager/redis_manager.py`

### Media production

- [LLM generation](https://github.com/asad-ismail/moneyprinterturbo-extended/blob/main/app/services/llm.py): `app/services/llm.py`
- [Visual sourcing](https://github.com/asad-ismail/moneyprinterturbo-extended/blob/main/app/services/material.py): `app/services/material.py`
- [Semantic matching](https://github.com/asad-ismail/moneyprinterturbo-extended/blob/main/app/services/semantic_video.py): `app/services/semantic_video.py`
- [Speech and timing](https://github.com/asad-ismail/moneyprinterturbo-extended/blob/main/app/services/voice.py): `app/services/voice.py`
- [Subtitle rendering](https://github.com/asad-ismail/moneyprinterturbo-extended/blob/main/app/services/subtitle.py): `app/services/subtitle.py`
- [Video composition](https://github.com/asad-ismail/moneyprinterturbo-extended/blob/main/app/services/video.py): `app/services/video.py`
- [Video effects](https://github.com/asad-ismail/moneyprinterturbo-extended/blob/main/app/services/utils/video_effects.py): `app/services/utils/video_effects.py`
- [Task state](https://github.com/asad-ismail/moneyprinterturbo-extended/blob/main/app/services/state.py): `app/services/state.py`

### Models and sources

- **LLM providers**
- **Stock video sources**
- **Chatterbox and WhisperX**
- **Azure speech**
- **Redis service**

### Other components

- **Video creator**
- **Generated video**

## Connections

- Video creator → Streamlit interface: configures
- Video creator → ASGI application: submits requests
- ASGI application → API router: serves routes
- API router → Video endpoints: dispatches
- API router → Script endpoints: dispatches
- Script endpoints → LLM generation: requests generation
- LLM generation → LLM providers: queries
- Video endpoints → Generation workflow: starts generation
- Generation workflow → Task scheduler: schedules
- Task scheduler → Memory queue: uses queue
- Task scheduler → Redis queue: uses queue
- Redis queue → Redis service: stores queued tasks
- Generation workflow → LLM generation: generates content
- Generation workflow → Visual sourcing: sources visuals
- Visual sourcing → Semantic matching: matches script meaning
- Visual sourcing → Stock video sources: searches
- Generation workflow → Speech and timing: synthesizes narration
- Speech and timing → Chatterbox and WhisperX: synthesizes and aligns
- Speech and timing → Azure speech: synthesizes
- Generation workflow → Video composition: composes video
- Video composition → Subtitle rendering: renders captions
- Video composition → Video effects: applies effects
- Generation workflow → Task state: tracks progress
- Video composition → Generated video: produces
