# fujiwarachoki/moneyprinterv2 architecture

> Architecture diagram of the GitHub repository fujiwarachoki/moneyprinterv2, 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/fujiwarachoki/moneyprinterv2
- Repository: https://github.com/fujiwarachoki/moneyprinterv2

## Overview

MoneyPrinter V2 is a Python application for automating several online marketing workflows. Users enter through the interactive application to manage YouTube Shorts and Twitter activity, run affiliate promotions, or find and contact local businesses; scheduled posting is also a documented capability. YouTube generation includes speech synthesis and optional Post Bridge cross-posting, while account and product data use local cache files. Edges reflect the shown excerpts, SOURCE INDEX references, and README; unsampled details are not inferred beyond those references.

Main entry points: [`src/main.py`](https://github.com/fujiwarachoki/moneyprinterv2/blob/main/src/main.py) (Interactive app), [`src/classes/YouTube.py`](https://github.com/fujiwarachoki/moneyprinterv2/blob/main/src/classes/YouTube.py) (YouTube Shorts), [`src/classes/Twitter.py`](https://github.com/fujiwarachoki/moneyprinterv2/blob/main/src/classes/Twitter.py) (Twitter bot), [`src/classes/AFM.py`](https://github.com/fujiwarachoki/moneyprinterv2/blob/main/src/classes/AFM.py) (Affiliate marketing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application and scheduling"]
  node_main["Interactive app<br/>[main.py]"]
  node_scheduler["Cron scheduler<br/>[cron.py]"]
end

subgraph group_social["Social publishing"]
  node_youtube["YouTube Shorts<br/>[YouTube.py]"]
  node_twitter["Twitter bot<br/>[Twitter.py]"]
  node_postbridge["Post Bridge integration"]
  node_postbridgeclient["Post Bridge client<br/>[PostBridge.py]"]
end

subgraph group_marketing["Marketing workflows"]
  node_affiliate["Affiliate marketing<br/>[AFM.py]"]
  node_outreach["Business outreach<br/>[Outreach.py]"]
end

subgraph group_shared["Shared services"]
  node_llm["Text generation<br/>[llm_provider.py]"]
  node_tts["Speech synthesis<br/>[Tts.py]"]
  node_cache[("Local cache<br/>[cache.py]")]
  node_config["Configuration<br/>[config.py]"]
  node_status["Status messages<br/>[status.py]"]
end

node_user(("Operator"))
node_ollama["Ollama service"]
node_youtube_service["YouTube platform"]
node_twitter_service["Twitter platform"]
node_postbridge_service["Post Bridge service"]
node_google_maps["Maps scraper"]
node_email["Email service"]

node_user -->|"uses"| node_main
node_main -->|"runs workflow"| node_youtube
node_main -->|"runs workflow"| node_twitter
node_main -->|"starts promotion"| node_affiliate
node_main -->|"offers outreach"| node_outreach
node_scheduler -->|"schedules"| node_youtube
node_scheduler -->|"schedules"| node_twitter
node_youtube -->|"generates text"| node_llm
node_youtube -->|"synthesizes speech"| node_tts
node_youtube -->|"stores videos"| node_cache
node_youtube -->|"uploads video"| node_youtube_service
node_youtube -->|"requests cross-post"| node_postbridge
node_postbridge -->|"calls client"| node_postbridgeclient
node_postbridgeclient -.->|"publishes post"| node_postbridge_service
node_twitter -->|"generates posts"| node_llm
node_twitter -->|"stores posts"| node_cache
node_twitter -->|"publishes posts"| node_twitter_service
node_affiliate -->|"generates pitch"| node_llm
node_affiliate -->|"posts pitch"| node_twitter
node_affiliate -->|"uses products"| node_cache
node_outreach -->|"runs scraper"| node_google_maps
node_outreach -->|"sends outreach"| node_email
node_llm -->|"requests generation"| node_ollama
node_main -->|"manages records"| node_cache
node_main -->|"reads settings"| node_config
node_postbridge -->|"reads settings"| node_config
node_main -->|"reports status"| node_status

click node_main "https://github.com/fujiwarachoki/moneyprinterv2/blob/main/src/main.py"
click node_scheduler "https://github.com/fujiwarachoki/moneyprinterv2/blob/main/src/cron.py"
click node_youtube "https://github.com/fujiwarachoki/moneyprinterv2/blob/main/src/classes/YouTube.py"
click node_twitter "https://github.com/fujiwarachoki/moneyprinterv2/blob/main/src/classes/Twitter.py"
click node_postbridge "https://github.com/fujiwarachoki/moneyprinterv2/blob/main/src/post_bridge_integration.py"
click node_postbridgeclient "https://github.com/fujiwarachoki/moneyprinterv2/blob/main/src/classes/PostBridge.py"
click node_affiliate "https://github.com/fujiwarachoki/moneyprinterv2/blob/main/src/classes/AFM.py"
click node_outreach "https://github.com/fujiwarachoki/moneyprinterv2/blob/main/src/classes/Outreach.py"
click node_llm "https://github.com/fujiwarachoki/moneyprinterv2/blob/main/src/llm_provider.py"
click node_tts "https://github.com/fujiwarachoki/moneyprinterv2/blob/main/src/classes/Tts.py"
click node_cache "https://github.com/fujiwarachoki/moneyprinterv2/blob/main/src/cache.py"
click node_config "https://github.com/fujiwarachoki/moneyprinterv2/blob/main/src/config.py"
click node_status "https://github.com/fujiwarachoki/moneyprinterv2/blob/main/src/status.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_main,node_scheduler toneBlue
class node_youtube,node_twitter,node_postbridge,node_postbridgeclient toneAmber
class node_affiliate,node_outreach toneMint
class node_llm,node_tts,node_cache,node_config,node_status toneRose
class node_user,node_ollama,node_youtube_service,node_twitter_service,node_postbridge_service,node_google_maps,node_email toneIndigo
```

## Components

### Application and scheduling

- [Interactive app](https://github.com/fujiwarachoki/moneyprinterv2/blob/main/src/main.py): `src/main.py`
- [Cron scheduler](https://github.com/fujiwarachoki/moneyprinterv2/blob/main/src/cron.py): `src/cron.py`

### Social publishing

- [YouTube Shorts](https://github.com/fujiwarachoki/moneyprinterv2/blob/main/src/classes/YouTube.py): `src/classes/YouTube.py`
- [Twitter bot](https://github.com/fujiwarachoki/moneyprinterv2/blob/main/src/classes/Twitter.py): `src/classes/Twitter.py`
- [Post Bridge integration](https://github.com/fujiwarachoki/moneyprinterv2/blob/main/src/post_bridge_integration.py): `src/post_bridge_integration.py`
- [Post Bridge client](https://github.com/fujiwarachoki/moneyprinterv2/blob/main/src/classes/PostBridge.py): `src/classes/PostBridge.py`

### Marketing workflows

- [Affiliate marketing](https://github.com/fujiwarachoki/moneyprinterv2/blob/main/src/classes/AFM.py): `src/classes/AFM.py`
- [Business outreach](https://github.com/fujiwarachoki/moneyprinterv2/blob/main/src/classes/Outreach.py): `src/classes/Outreach.py`

### Shared services

- [Text generation](https://github.com/fujiwarachoki/moneyprinterv2/blob/main/src/llm_provider.py): `src/llm_provider.py`
- [Speech synthesis](https://github.com/fujiwarachoki/moneyprinterv2/blob/main/src/classes/Tts.py): `src/classes/Tts.py`
- [Local cache](https://github.com/fujiwarachoki/moneyprinterv2/blob/main/src/cache.py): `src/cache.py`
- [Configuration](https://github.com/fujiwarachoki/moneyprinterv2/blob/main/src/config.py): `src/config.py`
- [Status messages](https://github.com/fujiwarachoki/moneyprinterv2/blob/main/src/status.py): `src/status.py`

### Other components

- **Operator**
- **Ollama service**
- **YouTube platform**
- **Twitter platform**
- **Post Bridge service**
- **Maps scraper**
- **Email service**

## Connections

- Operator → Interactive app: uses (evidence: `README.md`)
- Interactive app → YouTube Shorts: runs workflow (evidence: `src/main.py`)
- Interactive app → Twitter bot: runs workflow (evidence: `src/main.py`)
- Interactive app → Affiliate marketing: starts promotion (evidence: `src/main.py`)
- Interactive app → Business outreach: offers outreach (evidence: `README.md`)
- Cron scheduler → YouTube Shorts: schedules (evidence: `src/cron.py`)
- Cron scheduler → Twitter bot: schedules (evidence: `src/cron.py`)
- YouTube Shorts → Text generation: generates text (evidence: `src/classes/YouTube.py`)
- YouTube Shorts → Speech synthesis: synthesizes speech (evidence: `src/classes/YouTube.py`)
- YouTube Shorts → Local cache: stores videos (evidence: `src/classes/YouTube.py`)
- YouTube Shorts → YouTube platform: uploads video (evidence: `src/classes/YouTube.py`)
- YouTube Shorts → Post Bridge integration: requests cross-post (evidence: `src/cron.py`)
- Post Bridge integration → Post Bridge client: calls client (evidence: `src/post_bridge_integration.py`)
- Post Bridge client → Post Bridge service: publishes post
- Twitter bot → Text generation: generates posts (evidence: `src/classes/Twitter.py`)
- Twitter bot → Local cache: stores posts (evidence: `src/classes/Twitter.py`)
- Twitter bot → Twitter platform: publishes posts (evidence: `src/classes/Twitter.py`)
- Affiliate marketing → Text generation: generates pitch (evidence: `src/classes/AFM.py`)
- Affiliate marketing → Twitter bot: posts pitch (evidence: `src/classes/AFM.py`)
- Affiliate marketing → Local cache: uses products (evidence: `src/main.py`)
- Business outreach → Maps scraper: runs scraper (evidence: `src/classes/Outreach.py`)
- Business outreach → Email service: sends outreach (evidence: `src/classes/Outreach.py`)
- Text generation → Ollama service: requests generation (evidence: `src/llm_provider.py`)
- Interactive app → Local cache: manages records (evidence: `src/main.py`)
- Interactive app → Configuration: reads settings (evidence: `src/main.py`)
- Post Bridge integration → Configuration: reads settings (evidence: `src/post_bridge_integration.py`)
- Interactive app → Status messages: reports status (evidence: `src/main.py`)
