# jaspher19/open-clip-editor architecture

> Architecture diagram of the GitHub repository jaspher19/open-clip-editor, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-22). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jaspher19/open-clip-editor
- Repository: https://github.com/jaspher19/open-clip-editor

## Overview

OpenClip is a local video-to-clips editor: users provide a recording or supported stream link, then review and edit generated clips before exporting or posting them. The main server pipeline imports and coordinates ingest, selection, titles, rendering, and related processing; the README documents local transcription, templates, quality checks, optional AI, and publishing. Some connections are supported only by the README or source-index references, so unsampled implementation details are represented conservatively.

Main entry points: [`server/pipeline.mjs`](https://github.com/jaspher19/open-clip-editor/blob/master/server/pipeline.mjs) (Job pipeline), [`server/app.mjs`](https://github.com/jaspher19/open-clip-editor/blob/master/server/app.mjs) (HTTP application), [`web/src/App.tsx`](https://github.com/jaspher19/open-clip-editor/blob/master/web/src/App.tsx) (Editor app), [`server/render.mjs`](https://github.com/jaspher19/open-clip-editor/blob/master/server/render.mjs) (Clip rendering)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Review &amp; editing"]
  node_app["Editor app<br/>[App.tsx]"]
  node_clip_editor["Clip editor<br/>[LivePreview.tsx]"]
  node_effects["Effects &amp; cuts<br/>[EffectsLane.tsx]"]
  node_posting_ui["Posting calendar<br/>[Posting.tsx]"]
end

subgraph group_workflow["Clip production"]
  node_server["HTTP application<br/>[app.mjs]"]
  node_ingest["Source import<br/>[ingest.mjs]"]
  node_transcribe["Local transcription<br/>[transcribe.py]"]
  node_pipeline["Job pipeline<br/>[pipeline.mjs]"]
  node_render["Clip rendering<br/>[render.mjs]"]
  node_templates["Edit templates<br/>[templates.mjs]"]
end

subgraph group_analysis["Moment analysis"]
  node_selection["Moment picker<br/>[selection.mjs]"]
  node_signals["Action signals<br/>[signals.py]"]
  node_chat["Twitch chat signals<br/>[twitch-chat.mjs]"]
  node_ai_judge["AI moment choice<br/>[metadata-ai.mjs]"]
  node_titles["Hooks &amp; titles<br/>[titles.mjs]"]
  node_learning["Channel learning<br/>[learning.mjs]"]
end

subgraph group_delivery["Export &amp; publishing"]
  node_qc["Export checks<br/>[qc.mjs]"]
  node_posting["Upload scheduling<br/>[posting.mjs]"]
  node_autopost["Automatic posting<br/>[autopost.mjs]"]
  node_youtube{{"YouTube"}}
end

subgraph group_state["Local state"]
  node_job_store[("Job records<br/>[jobs.mjs]")]
  node_local_files[("Local media &amp; cache<br/>[config.mjs]")]
end

node_user(("Creator"))

node_user -->|"starts project"| node_app
node_app -.->|"sends requests"| node_server
node_app -->|"opens clip"| node_clip_editor
node_app -->|"opens posting"| node_posting_ui
node_clip_editor -->|"uses effects"| node_effects
node_server -->|"runs jobs"| node_pipeline
node_server -->|"loads jobs"| node_job_store
node_pipeline -->|"imports sources"| node_ingest
node_ingest -->|"downloads media"| node_local_files
node_pipeline -.->|"transcribes locally"| node_transcribe
node_pipeline -->|"picks moments"| node_selection
node_selection -.->|"uses action signals"| node_signals
node_selection -->|"uses chat signals"| node_chat
node_pipeline -->|"chooses candidates"| node_ai_judge
node_pipeline -->|"writes titles"| node_titles
node_pipeline -->|"renders clips"| node_render
node_render -.->|"applies templates"| node_templates
node_render -.->|"exports MP4"| node_local_files
node_render -.->|"checks exports"| node_qc
node_server -->|"creates posts"| node_posting
node_posting -.->|"uploads &amp; schedules"| node_youtube
node_server -.->|"supports auto-post"| node_autopost
node_pipeline -->|"uses channel lessons"| node_learning
node_learning -.->|"persists lessons"| node_job_store

click node_app "https://github.com/jaspher19/open-clip-editor/blob/master/web/src/App.tsx"
click node_clip_editor "https://github.com/jaspher19/open-clip-editor/blob/master/web/src/LivePreview.tsx"
click node_effects "https://github.com/jaspher19/open-clip-editor/blob/master/web/src/EffectsLane.tsx"
click node_posting_ui "https://github.com/jaspher19/open-clip-editor/blob/master/web/src/Posting.tsx"
click node_server "https://github.com/jaspher19/open-clip-editor/blob/master/server/app.mjs"
click node_ingest "https://github.com/jaspher19/open-clip-editor/blob/master/server/ingest.mjs"
click node_transcribe "https://github.com/jaspher19/open-clip-editor/blob/master/workers/transcribe.py"
click node_pipeline "https://github.com/jaspher19/open-clip-editor/blob/master/server/pipeline.mjs"
click node_render "https://github.com/jaspher19/open-clip-editor/blob/master/server/render.mjs"
click node_templates "https://github.com/jaspher19/open-clip-editor/blob/master/server/templates.mjs"
click node_selection "https://github.com/jaspher19/open-clip-editor/blob/master/server/selection.mjs"
click node_signals "https://github.com/jaspher19/open-clip-editor/blob/master/workers/signals.py"
click node_chat "https://github.com/jaspher19/open-clip-editor/blob/master/server/twitch-chat.mjs"
click node_ai_judge "https://github.com/jaspher19/open-clip-editor/blob/master/server/metadata-ai.mjs"
click node_titles "https://github.com/jaspher19/open-clip-editor/blob/master/server/titles.mjs"
click node_qc "https://github.com/jaspher19/open-clip-editor/blob/master/server/qc.mjs"
click node_posting "https://github.com/jaspher19/open-clip-editor/blob/master/server/posting.mjs"
click node_autopost "https://github.com/jaspher19/open-clip-editor/blob/master/server/autopost.mjs"
click node_learning "https://github.com/jaspher19/open-clip-editor/blob/master/server/learning.mjs"
click node_job_store "https://github.com/jaspher19/open-clip-editor/blob/master/server/jobs.mjs"
click node_local_files "https://github.com/jaspher19/open-clip-editor/blob/master/server/config.mjs"

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_app,node_clip_editor,node_effects,node_posting_ui toneBlue
class node_server,node_ingest,node_transcribe,node_pipeline,node_render,node_templates toneAmber
class node_selection,node_signals,node_chat,node_ai_judge,node_titles,node_learning toneMint
class node_qc,node_posting,node_autopost,node_youtube toneRose
class node_job_store,node_local_files,node_user toneIndigo
```

## Components

### Review & editing

- [Editor app](https://github.com/jaspher19/open-clip-editor/blob/master/web/src/App.tsx): `web/src/App.tsx`
- [Clip editor](https://github.com/jaspher19/open-clip-editor/blob/master/web/src/LivePreview.tsx): `web/src/LivePreview.tsx`
- [Effects & cuts](https://github.com/jaspher19/open-clip-editor/blob/master/web/src/EffectsLane.tsx): `web/src/EffectsLane.tsx`
- [Posting calendar](https://github.com/jaspher19/open-clip-editor/blob/master/web/src/Posting.tsx): `web/src/Posting.tsx`

### Clip production

- [HTTP application](https://github.com/jaspher19/open-clip-editor/blob/master/server/app.mjs): `server/app.mjs`
- [Source import](https://github.com/jaspher19/open-clip-editor/blob/master/server/ingest.mjs): `server/ingest.mjs`
- [Local transcription](https://github.com/jaspher19/open-clip-editor/blob/master/workers/transcribe.py): `workers/transcribe.py`
- [Job pipeline](https://github.com/jaspher19/open-clip-editor/blob/master/server/pipeline.mjs): `server/pipeline.mjs`
- [Clip rendering](https://github.com/jaspher19/open-clip-editor/blob/master/server/render.mjs): `server/render.mjs`
- [Edit templates](https://github.com/jaspher19/open-clip-editor/blob/master/server/templates.mjs): `server/templates.mjs`

### Moment analysis

- [Moment picker](https://github.com/jaspher19/open-clip-editor/blob/master/server/selection.mjs): `server/selection.mjs`
- [Action signals](https://github.com/jaspher19/open-clip-editor/blob/master/workers/signals.py): `workers/signals.py`
- [Twitch chat signals](https://github.com/jaspher19/open-clip-editor/blob/master/server/twitch-chat.mjs): `server/twitch-chat.mjs`
- [AI moment choice](https://github.com/jaspher19/open-clip-editor/blob/master/server/metadata-ai.mjs): `server/metadata-ai.mjs`
- [Hooks & titles](https://github.com/jaspher19/open-clip-editor/blob/master/server/titles.mjs): `server/titles.mjs`
- [Channel learning](https://github.com/jaspher19/open-clip-editor/blob/master/server/learning.mjs): `server/learning.mjs`

### Export & publishing

- [Export checks](https://github.com/jaspher19/open-clip-editor/blob/master/server/qc.mjs): `server/qc.mjs`
- [Upload scheduling](https://github.com/jaspher19/open-clip-editor/blob/master/server/posting.mjs): `server/posting.mjs`
- [Automatic posting](https://github.com/jaspher19/open-clip-editor/blob/master/server/autopost.mjs): `server/autopost.mjs`
- **YouTube**

### Local state

- [Job records](https://github.com/jaspher19/open-clip-editor/blob/master/server/jobs.mjs): `server/jobs.mjs`
- [Local media & cache](https://github.com/jaspher19/open-clip-editor/blob/master/server/config.mjs): `server/config.mjs`

### Other components

- **Creator**

## Connections

- Creator → Editor app: starts project (evidence: `README.md`)
- Editor app → HTTP application: sends requests
- Editor app → Clip editor: opens clip (evidence: `web/src/App.tsx`)
- Editor app → Posting calendar: opens posting (evidence: `web/src/App.tsx`)
- Clip editor → Effects & cuts: uses effects (evidence: `web/src/LivePreview.tsx`)
- HTTP application → Job pipeline: runs jobs (evidence: `server/app.mjs`)
- HTTP application → Job records: loads jobs (evidence: `server/app.mjs`)
- Job pipeline → Source import: imports sources (evidence: `server/pipeline.mjs`)
- Source import → Local media & cache: downloads media (evidence: `server/ingest.mjs`)
- Job pipeline → Local transcription: transcribes locally (evidence: `README.md`)
- Job pipeline → Moment picker: picks moments (evidence: `server/pipeline.mjs`)
- Moment picker → Action signals: uses action signals (evidence: `README.md`)
- Moment picker → Twitch chat signals: uses chat signals (evidence: `server/selection.mjs`)
- Job pipeline → AI moment choice: chooses candidates (evidence: `server/pipeline.mjs`)
- Job pipeline → Hooks & titles: writes titles (evidence: `server/pipeline.mjs`)
- Job pipeline → Clip rendering: renders clips (evidence: `server/pipeline.mjs`)
- Clip rendering → Edit templates: applies templates (evidence: `README.md`)
- Clip rendering → Local media & cache: exports MP4 (evidence: `README.md`)
- Clip rendering → Export checks: checks exports (evidence: `README.md`)
- HTTP application → Upload scheduling: creates posts (evidence: `server/app.mjs`)
- Upload scheduling → YouTube: uploads & schedules (evidence: `README.md`)
- HTTP application → Automatic posting: supports auto-post (evidence: `README.md`)
- Job pipeline → Channel learning: uses channel lessons (evidence: `server/pipeline.mjs`)
- Channel learning → Job records: persists lessons (evidence: `server/learning.mjs`)
