# aethelos/-reel-genius architecture

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

- Interactive diagram: https://gitdiagram.com/aethelos/-reel-genius
- Repository: https://github.com/aethelos/-reel-genius

## Overview

Reel Genius is a local content-to-knowledge application: users configure a vault and local model, run content pipelines, and receive Obsidian notes. The main documented workflow fetches Watch Later videos, downloads and transcribes audio, then generates linked Markdown reports. Separate synthesis and auto-definition workflows build on vault notes. The web app manages settings and runs pipelines; its excerpt shows subprocess streaming and scheduling, but not the complete script-dispatch mapping. README statements support the high-level workflow; source excerpts support the detailed processing and vault relationships.

Main entry points: [`app/main.py`](https://github.com/aethelos/-reel-genius/blob/main/app/main.py) (API and runner), [`yt_genius.py`](https://github.com/aethelos/-reel-genius/blob/main/yt_genius.py) (Watch Later pipeline), [`reel_genius.py`](https://github.com/aethelos/-reel-genius/blob/main/reel_genius.py) (Reels pipeline), [`synthesize.py`](https://github.com/aethelos/-reel-genius/blob/main/synthesize.py) (Master synthesis)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Local app"]
  node_web["Web interface<br/>[index.html]"]
  node_api["API and runner<br/>[main.py]"]
  node_settings["Settings<br/>[config.py]"]
end

subgraph group_content["Content pipelines"]
  node_yt["Watch Later pipeline<br/>[yt_genius.py]"]
  node_reels["Reels pipeline<br/>[reel_genius.py]"]
  node_discovery["Collection discovery<br/>[discovery.py]"]
end

subgraph group_knowledge["Knowledge workflows"]
  node_synthesis["Master synthesis<br/>[synthesize.py]"]
  node_definitions["Auto-definer<br/>[definer_agent.py]"]
end

subgraph group_local["Local resources"]
  node_vault[("Obsidian vault")]
  node_configfile["Settings file"]
end

node_user(("User"))
node_youtube["YouTube"]
node_instagram["Instagram"]
node_ollama["Ollama model"]
node_whisper["Whisper"]

node_user -->|"uses"| node_web
node_web -.->|"requests"| node_api
node_api -->|"loads and saves"| node_settings
node_settings -->|"reads and writes"| node_configfile
node_api -.->|"launches pipeline"| node_yt
node_api -.->|"launches pipeline"| node_synthesis
node_api -.->|"launches pipeline"| node_definitions
node_yt -->|"fetches videos"| node_youtube
node_yt -->|"transcribes audio"| node_whisper
node_yt -->|"analyzes content"| node_ollama
node_yt -->|"writes reports"| node_vault
node_reels -->|"fetches collection"| node_instagram
node_reels -->|"transcribes video"| node_whisper
node_reels -->|"generates analysis"| node_ollama
node_reels -->|"writes reports"| node_vault
node_discovery -->|"lists collections"| node_instagram
node_synthesis -->|"reads reports"| node_vault
node_synthesis -->|"requests synthesis"| node_ollama
node_synthesis -->|"writes strategy"| node_vault
node_definitions -->|"scans terms and writes definitions"| node_vault
node_definitions -->|"requests definitions"| node_ollama

click node_web "https://github.com/aethelos/-reel-genius/blob/main/app/static/index.html"
click node_api "https://github.com/aethelos/-reel-genius/blob/main/app/main.py"
click node_settings "https://github.com/aethelos/-reel-genius/blob/main/app/config.py"
click node_yt "https://github.com/aethelos/-reel-genius/blob/main/yt_genius.py"
click node_reels "https://github.com/aethelos/-reel-genius/blob/main/reel_genius.py"
click node_synthesis "https://github.com/aethelos/-reel-genius/blob/main/synthesize.py"
click node_definitions "https://github.com/aethelos/-reel-genius/blob/main/definer_agent.py"
click node_discovery "https://github.com/aethelos/-reel-genius/blob/main/discovery.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_web,node_api,node_settings,node_user toneBlue
class node_yt,node_reels,node_discovery toneAmber
class node_synthesis,node_definitions toneMint
class node_vault,node_configfile toneRose
class node_youtube,node_instagram,node_ollama,node_whisper toneIndigo
```

## Components

### Local app

- [Web interface](https://github.com/aethelos/-reel-genius/blob/main/app/static/index.html): `app/static/index.html`
- [API and runner](https://github.com/aethelos/-reel-genius/blob/main/app/main.py): `app/main.py`
- [Settings](https://github.com/aethelos/-reel-genius/blob/main/app/config.py): `app/config.py`

### Content pipelines

- [Watch Later pipeline](https://github.com/aethelos/-reel-genius/blob/main/yt_genius.py): `yt_genius.py`
- [Reels pipeline](https://github.com/aethelos/-reel-genius/blob/main/reel_genius.py): `reel_genius.py`
- [Collection discovery](https://github.com/aethelos/-reel-genius/blob/main/discovery.py): `discovery.py`

### Knowledge workflows

- [Master synthesis](https://github.com/aethelos/-reel-genius/blob/main/synthesize.py): `synthesize.py`
- [Auto-definer](https://github.com/aethelos/-reel-genius/blob/main/definer_agent.py): `definer_agent.py`

### Local resources

- **Obsidian vault**
- **Settings file**

### Other components

- **User**
- **YouTube**
- **Instagram**
- **Ollama model**
- **Whisper**

## Connections

- User → Web interface: uses (evidence: `README.md`)
- Web interface → API and runner: requests
- API and runner → Settings: loads and saves (evidence: `app/main.py`)
- Settings → Settings file: reads and writes (evidence: `app/config.py`)
- API and runner → Watch Later pipeline: launches pipeline
- API and runner → Master synthesis: launches pipeline
- API and runner → Auto-definer: launches pipeline
- Watch Later pipeline → YouTube: fetches videos (evidence: `yt_genius.py`)
- Watch Later pipeline → Whisper: transcribes audio (evidence: `yt_genius.py`)
- Watch Later pipeline → Ollama model: analyzes content (evidence: `yt_genius.py`)
- Watch Later pipeline → Obsidian vault: writes reports (evidence: `yt_genius.py`)
- Reels pipeline → Instagram: fetches collection (evidence: `reel_genius.py`)
- Reels pipeline → Whisper: transcribes video (evidence: `reel_genius.py`)
- Reels pipeline → Ollama model: generates analysis (evidence: `reel_genius.py`)
- Reels pipeline → Obsidian vault: writes reports (evidence: `reel_genius.py`)
- Collection discovery → Instagram: lists collections (evidence: `discovery.py`)
- Master synthesis → Obsidian vault: reads reports (evidence: `synthesize.py`)
- Master synthesis → Ollama model: requests synthesis (evidence: `synthesize.py`)
- Master synthesis → Obsidian vault: writes strategy (evidence: `synthesize.py`)
- Auto-definer → Obsidian vault: scans terms and writes definitions (evidence: `definer_agent.py`)
- Auto-definer → Ollama model: requests definitions (evidence: `definer_agent.py`)
