# jesiahjohansson-netizen/abrande-video-generator- architecture

> Architecture diagram of the GitHub repository jesiahjohansson-netizen/abrande-video-generator-, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jesiahjohansson-netizen/abrande-video-generator-
- Repository: https://github.com/jesiahjohansson-netizen/abrande-video-generator-

## Overview

Abrande Video Generator turns a blog-post URL into a checked, illustrated, narrated explainer and a ready-to-upload package. The CLI owns the workflow and uses a per-post workspace to cache intermediate results for resumable runs. The README documents the major stages; relationships below are limited to those shown in the CLI, sampled implementations, or README. The video template and some export capabilities are documented, but their detailed implementation was not sampled.

Main entry points: [`src/cli.ts`](https://github.com/jesiahjohansson-netizen/abrande-video-generator-/blob/main/src/cli.ts) (Pipeline CLI), [`src/pipeline/writeScript.ts`](https://github.com/jesiahjohansson-netizen/abrande-video-generator-/blob/main/src/pipeline/writeScript.ts) (Script writing), [`src/videoProps.ts`](https://github.com/jesiahjohansson-netizen/abrande-video-generator-/blob/main/src/videoProps.ts) (Video properties), [`src/pipeline/checkScript.ts`](https://github.com/jesiahjohansson-netizen/abrande-video-generator-/blob/main/src/pipeline/checkScript.ts) (Script review)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Content workflow"]
  node_cli["Pipeline CLI<br/>[cli.ts]"]
  node_fetch["Post extraction<br/>[fetchPost.ts]"]
  node_script["Script writing<br/>[writeScript.ts]"]
  node_scriptcheck["Script review<br/>[checkScript.ts]"]
end

subgraph group_media["Media production"]
  node_style["Illustration style<br/>[illustrate.ts]"]
  node_illustrate["Scene illustration<br/>[illustrate.ts]"]
  node_scenecheck["Scene review<br/>[checkScenes.ts]"]
  node_voice["Scene voiceover<br/>[voiceover.ts]"]
end

subgraph group_rendering["Video and export"]
  node_props["Video properties<br/>[videoProps.ts]"]
  node_render["Video rendering<br/>[render.ts]"]
  node_template["Remotion template<br/>[Explainer.tsx]"]
  node_entry["Composition entry<br/>[index.tsx]"]
  node_export["Package export<br/>[exportPackage.ts]"]
end

subgraph group_shared["Shared data and state"]
  node_workspace[("Run workspace<br/>[workspace.ts]")]
  node_schemas["Content schemas<br/>[schemas.ts]"]
end

node_user(("Video creator"))
node_blog["Abrande blog"]
node_anthropic["Anthropic Claude"]
node_fal["Fal image service"]
node_eleven["ElevenLabs"]

node_user -->|"submits URL"| node_cli
node_cli -->|"opens workspace"| node_workspace
node_cli -->|"fetches post"| node_fetch
node_fetch -->|"downloads HTML"| node_blog
node_cli -->|"writes script"| node_script
node_script -->|"requests script"| node_anthropic
node_script -->|"validates output"| node_schemas
node_cli -->|"checks script"| node_scriptcheck
node_scriptcheck -->|"reviews draft"| node_anthropic
node_scriptcheck -->|"rewrites draft"| node_script
node_cli -->|"prepares style"| node_style
node_style -->|"creates style"| node_fal
node_cli -->|"draws scenes"| node_illustrate
node_illustrate -->|"generates images"| node_fal
node_cli -->|"checks illustrations"| node_scenecheck
node_scenecheck -->|"reviews images"| node_anthropic
node_scenecheck -->|"redraws failures"| node_illustrate
node_cli -->|"voices scenes"| node_voice
node_voice -->|"requests speech"| node_eleven
node_cli -->|"builds props"| node_props
node_props -->|"uses scenes"| node_schemas
node_props -->|"uses timings"| node_voice
node_cli -->|"renders video"| node_render
node_render -->|"loads composition"| node_entry
node_entry -->|"registers template"| node_template
node_cli -->|"exports package"| node_export
node_export -->|"renders Short and thumbnail"| node_render
node_export -->|"derives Short and thumbnail"| node_props
node_workspace -->|"caches step results"| node_cli

click node_cli "https://github.com/jesiahjohansson-netizen/abrande-video-generator-/blob/main/src/cli.ts"
click node_workspace "https://github.com/jesiahjohansson-netizen/abrande-video-generator-/blob/main/src/workspace.ts"
click node_fetch "https://github.com/jesiahjohansson-netizen/abrande-video-generator-/blob/main/src/pipeline/fetchPost.ts"
click node_script "https://github.com/jesiahjohansson-netizen/abrande-video-generator-/blob/main/src/pipeline/writeScript.ts"
click node_scriptcheck "https://github.com/jesiahjohansson-netizen/abrande-video-generator-/blob/main/src/pipeline/checkScript.ts"
click node_schemas "https://github.com/jesiahjohansson-netizen/abrande-video-generator-/blob/main/src/schemas.ts"
click node_style "https://github.com/jesiahjohansson-netizen/abrande-video-generator-/blob/main/src/pipeline/illustrate.ts"
click node_illustrate "https://github.com/jesiahjohansson-netizen/abrande-video-generator-/blob/main/src/pipeline/illustrate.ts"
click node_scenecheck "https://github.com/jesiahjohansson-netizen/abrande-video-generator-/blob/main/src/pipeline/checkScenes.ts"
click node_voice "https://github.com/jesiahjohansson-netizen/abrande-video-generator-/blob/main/src/pipeline/voiceover.ts"
click node_props "https://github.com/jesiahjohansson-netizen/abrande-video-generator-/blob/main/src/videoProps.ts"
click node_render "https://github.com/jesiahjohansson-netizen/abrande-video-generator-/blob/main/src/pipeline/render.ts"
click node_template "https://github.com/jesiahjohansson-netizen/abrande-video-generator-/blob/main/video/Explainer.tsx"
click node_entry "https://github.com/jesiahjohansson-netizen/abrande-video-generator-/blob/main/video/index.tsx"
click node_export "https://github.com/jesiahjohansson-netizen/abrande-video-generator-/blob/main/src/pipeline/exportPackage.ts"

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_cli,node_fetch,node_script,node_scriptcheck toneBlue
class node_style,node_illustrate,node_scenecheck,node_voice toneAmber
class node_props,node_render,node_template,node_entry,node_export toneMint
class node_workspace,node_schemas toneRose
class node_user,node_blog,node_anthropic,node_fal,node_eleven toneIndigo
```

## Components

### Content workflow

- [Pipeline CLI](https://github.com/jesiahjohansson-netizen/abrande-video-generator-/blob/main/src/cli.ts): `src/cli.ts`
- [Post extraction](https://github.com/jesiahjohansson-netizen/abrande-video-generator-/blob/main/src/pipeline/fetchPost.ts): `src/pipeline/fetchPost.ts`
- [Script writing](https://github.com/jesiahjohansson-netizen/abrande-video-generator-/blob/main/src/pipeline/writeScript.ts): `src/pipeline/writeScript.ts`
- [Script review](https://github.com/jesiahjohansson-netizen/abrande-video-generator-/blob/main/src/pipeline/checkScript.ts): `src/pipeline/checkScript.ts`

### Media production

- [Illustration style](https://github.com/jesiahjohansson-netizen/abrande-video-generator-/blob/main/src/pipeline/illustrate.ts): `src/pipeline/illustrate.ts`
- [Scene illustration](https://github.com/jesiahjohansson-netizen/abrande-video-generator-/blob/main/src/pipeline/illustrate.ts): `src/pipeline/illustrate.ts`
- [Scene review](https://github.com/jesiahjohansson-netizen/abrande-video-generator-/blob/main/src/pipeline/checkScenes.ts): `src/pipeline/checkScenes.ts`
- [Scene voiceover](https://github.com/jesiahjohansson-netizen/abrande-video-generator-/blob/main/src/pipeline/voiceover.ts): `src/pipeline/voiceover.ts`

### Video and export

- [Video properties](https://github.com/jesiahjohansson-netizen/abrande-video-generator-/blob/main/src/videoProps.ts): `src/videoProps.ts`
- [Video rendering](https://github.com/jesiahjohansson-netizen/abrande-video-generator-/blob/main/src/pipeline/render.ts): `src/pipeline/render.ts`
- [Remotion template](https://github.com/jesiahjohansson-netizen/abrande-video-generator-/blob/main/video/Explainer.tsx): `video/Explainer.tsx`
- [Composition entry](https://github.com/jesiahjohansson-netizen/abrande-video-generator-/blob/main/video/index.tsx): `video/index.tsx`
- [Package export](https://github.com/jesiahjohansson-netizen/abrande-video-generator-/blob/main/src/pipeline/exportPackage.ts): `src/pipeline/exportPackage.ts`

### Shared data and state

- [Run workspace](https://github.com/jesiahjohansson-netizen/abrande-video-generator-/blob/main/src/workspace.ts): `src/workspace.ts`
- [Content schemas](https://github.com/jesiahjohansson-netizen/abrande-video-generator-/blob/main/src/schemas.ts): `src/schemas.ts`

### Other components

- **Video creator**
- **Abrande blog**
- **Anthropic Claude**
- **Fal image service**
- **ElevenLabs**

## Connections

- Video creator → Pipeline CLI: submits URL (evidence: `README.md`)
- Pipeline CLI → Run workspace: opens workspace (evidence: `src/cli.ts`)
- Pipeline CLI → Post extraction: fetches post (evidence: `src/cli.ts`)
- Post extraction → Abrande blog: downloads HTML (evidence: `src/pipeline/fetchPost.ts`)
- Pipeline CLI → Script writing: writes script (evidence: `src/cli.ts`)
- Script writing → Anthropic Claude: requests script (evidence: `src/pipeline/writeScript.ts`)
- Script writing → Content schemas: validates output (evidence: `src/pipeline/writeScript.ts`)
- Pipeline CLI → Script review: checks script (evidence: `src/cli.ts`)
- Script review → Anthropic Claude: reviews draft (evidence: `src/pipeline/checkScript.ts`)
- Script review → Script writing: rewrites draft (evidence: `src/pipeline/checkScript.ts`)
- Pipeline CLI → Illustration style: prepares style (evidence: `src/cli.ts`)
- Illustration style → Fal image service: creates style (evidence: `src/pipeline/illustrate.ts`)
- Pipeline CLI → Scene illustration: draws scenes (evidence: `src/cli.ts`)
- Scene illustration → Fal image service: generates images (evidence: `src/pipeline/illustrate.ts`)
- Pipeline CLI → Scene review: checks illustrations (evidence: `src/cli.ts`)
- Scene review → Anthropic Claude: reviews images (evidence: `src/pipeline/checkScenes.ts`)
- Scene review → Scene illustration: redraws failures (evidence: `src/pipeline/checkScenes.ts`)
- Pipeline CLI → Scene voiceover: voices scenes (evidence: `src/cli.ts`)
- Scene voiceover → ElevenLabs: requests speech (evidence: `src/pipeline/voiceover.ts`)
- Pipeline CLI → Video properties: builds props (evidence: `src/cli.ts`)
- Video properties → Content schemas: uses scenes (evidence: `src/videoProps.ts`)
- Video properties → Scene voiceover: uses timings (evidence: `src/videoProps.ts`)
- Pipeline CLI → Video rendering: renders video (evidence: `src/cli.ts`)
- Video rendering → Composition entry: loads composition (evidence: `src/pipeline/render.ts`)
- Composition entry → Remotion template: registers template (evidence: `video/index.tsx`)
- Pipeline CLI → Package export: exports package (evidence: `src/cli.ts`)
- Package export → Video rendering: renders Short and thumbnail (evidence: `src/pipeline/exportPackage.ts`)
- Package export → Video properties: derives Short and thumbnail (evidence: `src/pipeline/exportPackage.ts`)
- Run workspace → Pipeline CLI: caches step results (evidence: `src/cli.ts`)
