# prometheus-ll/ai-news-render architecture

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

- Interactive diagram: https://gitdiagram.com/prometheus-ll/ai-news-render
- Repository: https://github.com/prometheus-ll/ai-news-render

## Overview

ai-news-render creates short-form AI news videos, then queues and publishes them. The primary workflow runs from RSS story selection and research through Gemini scripting and narration, scene rendering, video storage, and scheduled social posting. Rendering includes a timeline-driven HTML motion engine, optional HyperFrames scenes, generated soundtrack, and custom motion scenes. The README documents several integrations and capabilities beyond the sampled excerpts; links for those are cited to the README. The separate Remotion lab is represented, but its relationship to the daily pipeline is not established.

Main entry points: [`pipeline/run_pipeline.py`](https://github.com/prometheus-ll/ai-news-render/blob/main/pipeline/run_pipeline.py) (Daily orchestrator), [`pipeline/post_queue.py`](https://github.com/prometheus-ll/ai-news-render/blob/main/pipeline/post_queue.py) (Post queue), [`render/html_render.py`](https://github.com/prometheus-ll/ai-news-render/blob/main/render/html_render.py) (HTML renderer), [`pipeline/research.py`](https://github.com/prometheus-ll/ai-news-render/blob/main/pipeline/research.py) (Story research)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_pipeline["Story pipeline"]
  node_daily["Daily orchestrator<br/>[run_pipeline.py]"]
  node_research["Story research<br/>[research.py]"]
  node_explainer["Explainer scripts<br/>[explainer.py]"]
  node_custommotion["Custom motion scenes<br/>[custom_motion.py]"]
  node_webimages["Web imagery<br/>[webimages.py]"]
  node_recent[("Recent videos<br/>[recent.json]")]
  node_scene_library[("Scene library")]
end

subgraph group_rendering["Video rendering"]
  node_renderer["HTML renderer<br/>[html_render.py]"]
  node_engine["Motion engine<br/>[engine.html]"]
  node_hf["HyperFrames scenes<br/>[hf_scenes.py]"]
  node_soundtrack["Soundtrack mixer<br/>[soundtrack.py]"]
  node_video["Rendered video"]
end

subgraph group_publishing["Publishing"]
  node_queue["Post queue<br/>[post_queue.py]"]
  node_video_store[("Video asset store<br/>[store.py]")]
  node_facebook["Facebook publisher<br/>[facebook.py]"]
  node_instagram["Instagram publisher<br/>[instagram.py]"]
  node_youtube["YouTube publisher<br/>[youtube.py]"]
  node_queue_state[("Queue state<br/>[post_queue.json]")]
  node_content_log[("Content log<br/>[content_log.json]")]
end

subgraph group_lab["Motion lab"]
  node_remotion_root["Remotion composition<br/>[Root.tsx]"]
  node_remotion_main["Remotion scenes<br/>[Main.tsx]"]
end

node_operator(("Scheduled workflow"))
node_rss["RSS feed"]
node_gemini["Gemini services"]
node_articles["News sources"]
node_social["Social platforms"]
node_sheets[("Google Sheets")]

node_operator -->|"starts"| node_daily
node_daily -->|"reads stories"| node_rss
node_daily -->|"enriches stories"| node_research
node_research -->|"fetches article"| node_articles
node_research -->|"grounds facts"| node_gemini
node_daily -->|"selects and scripts"| node_gemini
node_daily -->|"builds explainer"| node_explainer
node_daily -->|"creates scenes"| node_custommotion
node_custommotion -->|"saves examples"| node_scene_library
node_daily -->|"uses imagery"| node_webimages
node_daily -->|"renders video"| node_renderer
node_renderer -->|"drives frames"| node_engine
node_renderer -.->|"renders scenes"| node_hf
node_renderer -->|"mixes audio"| node_soundtrack
node_renderer -->|"writes video"| node_video
node_daily -->|"checks variety"| node_recent
node_daily -->|"enqueues video"| node_queue
node_daily -->|"stores asset"| node_video_store
node_queue -.->|"reads and writes"| node_queue_state
node_queue -.->|"updates log"| node_content_log
node_queue -->|"dispatches post"| node_facebook
node_queue -->|"dispatches post"| node_instagram
node_queue -->|"dispatches upload"| node_youtube
node_facebook -.->|"publishes reel"| node_social
node_instagram -.->|"publishes reel"| node_social
node_youtube -->|"uploads Short"| node_social
node_daily -->|"logs results"| node_sheets
node_remotion_root -->|"registers composition"| node_remotion_main

click node_daily "https://github.com/prometheus-ll/ai-news-render/blob/main/pipeline/run_pipeline.py"
click node_research "https://github.com/prometheus-ll/ai-news-render/blob/main/pipeline/research.py"
click node_explainer "https://github.com/prometheus-ll/ai-news-render/blob/main/pipeline/explainer.py"
click node_custommotion "https://github.com/prometheus-ll/ai-news-render/blob/main/pipeline/custom_motion.py"
click node_webimages "https://github.com/prometheus-ll/ai-news-render/blob/main/pipeline/webimages.py"
click node_renderer "https://github.com/prometheus-ll/ai-news-render/blob/main/render/html_render.py"
click node_engine "https://github.com/prometheus-ll/ai-news-render/blob/main/render/html/engine.html"
click node_hf "https://github.com/prometheus-ll/ai-news-render/blob/main/render/hf_scenes.py"
click node_soundtrack "https://github.com/prometheus-ll/ai-news-render/blob/main/render/soundtrack.py"
click node_video "https://github.com/prometheus-ll/ai-news-render/tree/main/renders/output"
click node_queue "https://github.com/prometheus-ll/ai-news-render/blob/main/pipeline/post_queue.py"
click node_video_store "https://github.com/prometheus-ll/ai-news-render/blob/main/pipeline/store.py"
click node_facebook "https://github.com/prometheus-ll/ai-news-render/blob/main/pipeline/facebook.py"
click node_instagram "https://github.com/prometheus-ll/ai-news-render/blob/main/pipeline/instagram.py"
click node_youtube "https://github.com/prometheus-ll/ai-news-render/blob/main/pipeline/youtube.py"
click node_queue_state "https://github.com/prometheus-ll/ai-news-render/blob/main/state/post_queue.json"
click node_content_log "https://github.com/prometheus-ll/ai-news-render/blob/main/state/content_log.json"
click node_recent "https://github.com/prometheus-ll/ai-news-render/blob/main/state/recent.json"
click node_scene_library "https://github.com/prometheus-ll/ai-news-render/tree/main/state/scene_library"
click node_remotion_root "https://github.com/prometheus-ll/ai-news-render/blob/main/lab/remotion/src/Root.tsx"
click node_remotion_main "https://github.com/prometheus-ll/ai-news-render/blob/main/lab/remotion/src/Main.tsx"

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_daily,node_research,node_explainer,node_custommotion,node_webimages,node_recent,node_scene_library toneBlue
class node_renderer,node_engine,node_hf,node_soundtrack,node_video,node_sheets toneAmber
class node_queue,node_video_store,node_facebook,node_instagram,node_youtube,node_queue_state,node_content_log toneMint
class node_remotion_root,node_remotion_main toneRose
class node_operator,node_rss,node_gemini,node_articles,node_social toneIndigo
```

## Components

### Story pipeline

- [Daily orchestrator](https://github.com/prometheus-ll/ai-news-render/blob/main/pipeline/run_pipeline.py): `pipeline/run_pipeline.py`
- [Story research](https://github.com/prometheus-ll/ai-news-render/blob/main/pipeline/research.py): `pipeline/research.py`
- [Explainer scripts](https://github.com/prometheus-ll/ai-news-render/blob/main/pipeline/explainer.py): `pipeline/explainer.py`
- [Custom motion scenes](https://github.com/prometheus-ll/ai-news-render/blob/main/pipeline/custom_motion.py): `pipeline/custom_motion.py`
- [Web imagery](https://github.com/prometheus-ll/ai-news-render/blob/main/pipeline/webimages.py): `pipeline/webimages.py`
- [Recent videos](https://github.com/prometheus-ll/ai-news-render/blob/main/state/recent.json): `state/recent.json`
- [Scene library](https://github.com/prometheus-ll/ai-news-render/tree/main/state/scene_library): `state/scene_library`

### Video rendering

- [HTML renderer](https://github.com/prometheus-ll/ai-news-render/blob/main/render/html_render.py): `render/html_render.py`
- [Motion engine](https://github.com/prometheus-ll/ai-news-render/blob/main/render/html/engine.html): `render/html/engine.html`
- [HyperFrames scenes](https://github.com/prometheus-ll/ai-news-render/blob/main/render/hf_scenes.py): `render/hf_scenes.py`
- [Soundtrack mixer](https://github.com/prometheus-ll/ai-news-render/blob/main/render/soundtrack.py): `render/soundtrack.py`
- [Rendered video](https://github.com/prometheus-ll/ai-news-render/tree/main/renders/output): `renders/output`

### Publishing

- [Post queue](https://github.com/prometheus-ll/ai-news-render/blob/main/pipeline/post_queue.py): `pipeline/post_queue.py`
- [Video asset store](https://github.com/prometheus-ll/ai-news-render/blob/main/pipeline/store.py): `pipeline/store.py`
- [Facebook publisher](https://github.com/prometheus-ll/ai-news-render/blob/main/pipeline/facebook.py): `pipeline/facebook.py`
- [Instagram publisher](https://github.com/prometheus-ll/ai-news-render/blob/main/pipeline/instagram.py): `pipeline/instagram.py`
- [YouTube publisher](https://github.com/prometheus-ll/ai-news-render/blob/main/pipeline/youtube.py): `pipeline/youtube.py`
- [Queue state](https://github.com/prometheus-ll/ai-news-render/blob/main/state/post_queue.json): `state/post_queue.json`
- [Content log](https://github.com/prometheus-ll/ai-news-render/blob/main/state/content_log.json): `state/content_log.json`

### Motion lab

- [Remotion composition](https://github.com/prometheus-ll/ai-news-render/blob/main/lab/remotion/src/Root.tsx): `lab/remotion/src/Root.tsx`
- [Remotion scenes](https://github.com/prometheus-ll/ai-news-render/blob/main/lab/remotion/src/Main.tsx): `lab/remotion/src/Main.tsx`

### Other components

- **Scheduled workflow**
- **RSS feed**
- **Gemini services**
- **News sources**
- **Social platforms**
- **Google Sheets**

## Connections

- Scheduled workflow → Daily orchestrator: starts (evidence: `README.md`)
- Daily orchestrator → RSS feed: reads stories (evidence: `README.md`)
- Daily orchestrator → Story research: enriches stories (evidence: `pipeline/run_pipeline.py`)
- Story research → News sources: fetches article (evidence: `pipeline/research.py`)
- Story research → Gemini services: grounds facts (evidence: `pipeline/research.py`)
- Daily orchestrator → Gemini services: selects and scripts (evidence: `README.md`)
- Daily orchestrator → Explainer scripts: builds explainer (evidence: `pipeline/run_pipeline.py`)
- Daily orchestrator → Custom motion scenes: creates scenes (evidence: `pipeline/run_pipeline.py`)
- Custom motion scenes → Scene library: saves examples (evidence: `pipeline/custom_motion.py`)
- Daily orchestrator → Web imagery: uses imagery (evidence: `pipeline/run_pipeline.py`)
- Daily orchestrator → HTML renderer: renders video (evidence: `pipeline/run_pipeline.py`)
- HTML renderer → Motion engine: drives frames (evidence: `README.md`)
- HTML renderer → HyperFrames scenes: renders scenes (evidence: `render/html_render.py`)
- HTML renderer → Soundtrack mixer: mixes audio (evidence: `render/html_render.py`)
- HTML renderer → Rendered video: writes video (evidence: `README.md`)
- Daily orchestrator → Recent videos: checks variety (evidence: `README.md`)
- Daily orchestrator → Post queue: enqueues video (evidence: `pipeline/run_pipeline.py`)
- Daily orchestrator → Video asset store: stores asset (evidence: `pipeline/run_pipeline.py`)
- Post queue → Queue state: reads and writes
- Post queue → Content log: updates log
- Post queue → Facebook publisher: dispatches post (evidence: `pipeline/post_queue.py`)
- Post queue → Instagram publisher: dispatches post (evidence: `pipeline/post_queue.py`)
- Post queue → YouTube publisher: dispatches upload (evidence: `pipeline/post_queue.py`)
- Facebook publisher → Social platforms: publishes reel
- Instagram publisher → Social platforms: publishes reel
- YouTube publisher → Social platforms: uploads Short (evidence: `pipeline/youtube.py`)
- Daily orchestrator → Google Sheets: logs results (evidence: `README.md`)
- Remotion composition → Remotion scenes: registers composition (evidence: `lab/remotion/src/Root.tsx`)
