# yashvi-vekariya/ai-youtube-shorts-automation architecture

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

- Interactive diagram: https://gitdiagram.com/yashvi-vekariya/ai-youtube-shorts-automation
- Repository: https://github.com/yashvi-vekariya/ai-youtube-shorts-automation

## Overview

This is a local YouTube Shorts automation product. Its main workflow runs from scheduled or manual execution through trend discovery, AI idea/script/SEO generation, script checks, voice and footage preparation, video rendering, YouTube upload, and analytics recording. README documentation supplies the broader capability flow; source excerpts confirm key orchestration and module relationships. Several subsystems are represented from documentation or the source index rather than inspected implementation excerpts, so those edges cite the README where documented.

Main entry points: [`main.py`](https://github.com/yashvi-vekariya/ai-youtube-shorts-automation/blob/main/main.py) (Pipeline runner), [`modules/analytics_engine.py`](https://github.com/yashvi-vekariya/ai-youtube-shorts-automation/blob/main/modules/analytics_engine.py) (Performance analytics), [`modules/ai_engine.py`](https://github.com/yashvi-vekariya/ai-youtube-shorts-automation/blob/main/modules/ai_engine.py) (AI generation), [`modules/multi_channel.py`](https://github.com/yashvi-vekariya/ai-youtube-shorts-automation/blob/main/modules/multi_channel.py) (Multi-channel manager)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_orchestration["Run orchestration"]
  node_scheduler["Scheduler<br/>[scheduler.py]"]
  node_pipeline["Pipeline runner<br/>[main.py]"]
  node_channels["Multi-channel manager<br/>[multi_channel.py]"]
end

subgraph group_content["Content generation"]
  node_trend["Trend discovery<br/>[trend_scraper.py]"]
  node_ai["AI generation<br/>[ai_engine.py]"]
  node_quality["Script quality<br/>[script_quality.py]"]
end

subgraph group_production["Media production"]
  node_voice["Voice generation<br/>[voice_generator.py]"]
  node_footage["Stock footage<br/>[footage_fetcher.py]"]
  node_pixabay["Pixabay footage<br/>[pixabay_fetcher.py]"]
  node_music["Music manager<br/>[music_manager.py]"]
  node_builder["Video builder<br/>[video_builder.py]"]
end

subgraph group_publishing["Publishing and insights"]
  node_youtube["YouTube publishing<br/>[youtube_upload.py]"]
  node_analytics["Performance analytics"]
  node_dashboard["Status dashboard<br/>[dashboard.py]"]
end

subgraph group_shared["Configuration"]
  node_settings["Application settings<br/>[settings.py]"]
end

node_trending_sources(("Reddit, Hacker News, Google Trends"))
node_ollama{{"Ollama"}}
node_edge_tts{{"edge-tts"}}
node_stock_services{{"Pexels and Pixabay APIs"}}
node_ffmpeg{{"FFmpeg"}}
node_youtube_service{{"YouTube Data API"}}
node_analytics_store[("Local analytics JSON")]

node_scheduler -->|"runs"| node_pipeline
node_scheduler -->|"dispatches"| node_channels
node_channels -->|"runs per channel"| node_pipeline
node_pipeline -->|"requests trends"| node_trend
node_trend -->|"discovers topics"| node_trending_sources
node_pipeline -->|"generates content"| node_ai
node_ai -->|"generates text"| node_ollama
node_pipeline -->|"checks script"| node_quality
node_quality -->|"requests revisions"| node_ai
node_pipeline -->|"generates voiceover"| node_voice
node_voice -->|"synthesizes speech"| node_edge_tts
node_pipeline -->|"requests footage"| node_footage
node_footage -->|"downloads clips"| node_stock_services
node_footage -->|"uses backup source"| node_pixabay
node_pipeline -->|"selects music"| node_music
node_music -->|"downloads tracks"| node_stock_services
node_pipeline -->|"builds video"| node_builder
node_builder -->|"renders media"| node_ffmpeg
node_pipeline -->|"uploads video"| node_youtube
node_youtube -->|"publishes video"| node_youtube_service
node_pipeline -->|"records upload"| node_analytics
node_analytics -->|"reads and writes"| node_analytics_store
node_analytics -->|"fetches statistics"| node_youtube
node_analytics -->|"generates feedback"| node_ai
node_dashboard -->|"shows summary"| node_analytics
node_pipeline -->|"reads configuration"| node_settings
node_channels -->|"uses channel settings"| node_settings

click node_scheduler "https://github.com/yashvi-vekariya/ai-youtube-shorts-automation/blob/main/scheduler.py"
click node_pipeline "https://github.com/yashvi-vekariya/ai-youtube-shorts-automation/blob/main/main.py"
click node_channels "https://github.com/yashvi-vekariya/ai-youtube-shorts-automation/blob/main/modules/multi_channel.py"
click node_trend "https://github.com/yashvi-vekariya/ai-youtube-shorts-automation/blob/main/modules/trend_scraper.py"
click node_ai "https://github.com/yashvi-vekariya/ai-youtube-shorts-automation/blob/main/modules/ai_engine.py"
click node_quality "https://github.com/yashvi-vekariya/ai-youtube-shorts-automation/blob/main/modules/script_quality.py"
click node_voice "https://github.com/yashvi-vekariya/ai-youtube-shorts-automation/blob/main/modules/voice_generator.py"
click node_footage "https://github.com/yashvi-vekariya/ai-youtube-shorts-automation/blob/main/modules/footage_fetcher.py"
click node_pixabay "https://github.com/yashvi-vekariya/ai-youtube-shorts-automation/blob/main/modules/pixabay_fetcher.py"
click node_music "https://github.com/yashvi-vekariya/ai-youtube-shorts-automation/blob/main/modules/music_manager.py"
click node_builder "https://github.com/yashvi-vekariya/ai-youtube-shorts-automation/blob/main/modules/video_builder.py"
click node_youtube "https://github.com/yashvi-vekariya/ai-youtube-shorts-automation/blob/main/modules/youtube_upload.py"
click node_analytics "https://github.com/yashvi-vekariya/ai-youtube-shorts-automation/blob/main/modules/analytics_engine.py"
click node_dashboard "https://github.com/yashvi-vekariya/ai-youtube-shorts-automation/blob/main/dashboard.py"
click node_settings "https://github.com/yashvi-vekariya/ai-youtube-shorts-automation/blob/main/config/settings.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_scheduler,node_pipeline,node_channels toneBlue
class node_trend,node_ai,node_quality,node_analytics_store toneAmber
class node_voice,node_footage,node_pixabay,node_music,node_builder,node_stock_services,node_youtube_service toneMint
class node_youtube,node_analytics,node_dashboard toneRose
class node_settings,node_trending_sources,node_ollama,node_edge_tts,node_ffmpeg toneIndigo
```

## Components

### Run orchestration

- [Scheduler](https://github.com/yashvi-vekariya/ai-youtube-shorts-automation/blob/main/scheduler.py): `scheduler.py`
- [Pipeline runner](https://github.com/yashvi-vekariya/ai-youtube-shorts-automation/blob/main/main.py): `main.py`
- [Multi-channel manager](https://github.com/yashvi-vekariya/ai-youtube-shorts-automation/blob/main/modules/multi_channel.py): `modules/multi_channel.py`

### Content generation

- [Trend discovery](https://github.com/yashvi-vekariya/ai-youtube-shorts-automation/blob/main/modules/trend_scraper.py): `modules/trend_scraper.py`
- [AI generation](https://github.com/yashvi-vekariya/ai-youtube-shorts-automation/blob/main/modules/ai_engine.py): `modules/ai_engine.py`
- [Script quality](https://github.com/yashvi-vekariya/ai-youtube-shorts-automation/blob/main/modules/script_quality.py): `modules/script_quality.py`

### Media production

- [Voice generation](https://github.com/yashvi-vekariya/ai-youtube-shorts-automation/blob/main/modules/voice_generator.py): `modules/voice_generator.py`
- [Stock footage](https://github.com/yashvi-vekariya/ai-youtube-shorts-automation/blob/main/modules/footage_fetcher.py): `modules/footage_fetcher.py`
- [Pixabay footage](https://github.com/yashvi-vekariya/ai-youtube-shorts-automation/blob/main/modules/pixabay_fetcher.py): `modules/pixabay_fetcher.py`
- [Music manager](https://github.com/yashvi-vekariya/ai-youtube-shorts-automation/blob/main/modules/music_manager.py): `modules/music_manager.py`
- [Video builder](https://github.com/yashvi-vekariya/ai-youtube-shorts-automation/blob/main/modules/video_builder.py): `modules/video_builder.py`

### Publishing and insights

- [YouTube publishing](https://github.com/yashvi-vekariya/ai-youtube-shorts-automation/blob/main/modules/youtube_upload.py): `modules/youtube_upload.py`
- [Performance analytics](https://github.com/yashvi-vekariya/ai-youtube-shorts-automation/blob/main/modules/analytics_engine.py): `modules/analytics_engine.py`
- [Status dashboard](https://github.com/yashvi-vekariya/ai-youtube-shorts-automation/blob/main/dashboard.py): `dashboard.py`

### Configuration

- [Application settings](https://github.com/yashvi-vekariya/ai-youtube-shorts-automation/blob/main/config/settings.py): `config/settings.py`

### Other components

- **Reddit, Hacker News, Google Trends**
- **Ollama**
- **edge-tts**
- **Pexels and Pixabay APIs**
- **FFmpeg**
- **YouTube Data API**
- **Local analytics JSON**

## Connections

- Scheduler → Pipeline runner: runs (evidence: `scheduler.py`)
- Scheduler → Multi-channel manager: dispatches (evidence: `scheduler.py`)
- Multi-channel manager → Pipeline runner: runs per channel (evidence: `modules/multi_channel.py`)
- Pipeline runner → Trend discovery: requests trends (evidence: `main.py`)
- Trend discovery → Reddit, Hacker News, Google Trends: discovers topics (evidence: `README.md`)
- Pipeline runner → AI generation: generates content (evidence: `main.py`)
- AI generation → Ollama: generates text (evidence: `README.md`)
- Pipeline runner → Script quality: checks script (evidence: `main.py`)
- Script quality → AI generation: requests revisions (evidence: `modules/script_quality.py`)
- Pipeline runner → Voice generation: generates voiceover (evidence: `README.md`)
- Voice generation → edge-tts: synthesizes speech (evidence: `README.md`)
- Pipeline runner → Stock footage: requests footage (evidence: `README.md`)
- Stock footage → Pexels and Pixabay APIs: downloads clips (evidence: `README.md`)
- Stock footage → Pixabay footage: uses backup source (evidence: `modules/footage_fetcher.py`)
- Pipeline runner → Music manager: selects music (evidence: `README.md`)
- Music manager → Pexels and Pixabay APIs: downloads tracks (evidence: `modules/music_manager.py`)
- Pipeline runner → Video builder: builds video (evidence: `README.md`)
- Video builder → FFmpeg: renders media (evidence: `README.md`)
- Pipeline runner → YouTube publishing: uploads video (evidence: `main.py`)
- YouTube publishing → YouTube Data API: publishes video (evidence: `README.md`)
- Pipeline runner → Performance analytics: records upload (evidence: `main.py`)
- Performance analytics → Local analytics JSON: reads and writes (evidence: `modules/analytics_engine.py`)
- Performance analytics → YouTube publishing: fetches statistics (evidence: `modules/analytics_engine.py`)
- Performance analytics → AI generation: generates feedback (evidence: `modules/analytics_engine.py`)
- Status dashboard → Performance analytics: shows summary (evidence: `dashboard.py`)
- Pipeline runner → Application settings: reads configuration (evidence: `main.py`)
- Multi-channel manager → Application settings: uses channel settings (evidence: `modules/multi_channel.py`)
