# iamajmeena/neonclipping architecture

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

- Interactive diagram: https://gitdiagram.com/iamajmeena/neonclipping
- Repository: https://github.com/iamajmeena/neonclipping

## Overview

NeonClipping is a local video-to-short-clips application. A user imports a YouTube, Twitch, or Kick link (or an MP4), configures clip options, and starts a job in the browser. The server obtains source media and captions, discovers and curates moments, then renders vertical clips with captions and layouts for preview and download. Separate capabilities support live clipping, transcript exploration, saved-clip editing, and learned ranking preferences. The graph follows documented workflows and indexed imports; unsampled implementation details and some browser-to-server wiring are not asserted beyond README evidence.

Main entry points: [`standalone.py`](https://github.com/iamajmeena/neonclipping/blob/main/standalone.py) (Job runtime), [`app.js`](https://github.com/iamajmeena/neonclipping/blob/main/app.js) (Studio UI), [`ytdl.py`](https://github.com/iamajmeena/neonclipping/blob/main/ytdl.py) (Source fetching), [`app.py`](https://github.com/iamajmeena/neonclipping/blob/main/app.py) (Local API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["User interface"]
  node_browser["Studio UI<br/>[app.js]"]
  node_server["Local API<br/>[app.py]"]
  node_early_preview["Source previews<br/>[previews.py]"]
end

subgraph group_workflow["Clip workflow"]
  node_job_runtime["Job runtime<br/>[standalone.py]"]
  node_moment_scan["Moment signals<br/>[highlights.py]"]
  node_curation["Moment curation<br/>[smart.py]"]
  node_ranking["Ranking preferences<br/>[learn.py]"]
end

subgraph group_media["Media and captions"]
  node_source_fetch["Source fetching<br/>[ytdl.py]"]
  node_transcript_captions["Caption sources<br/>[captions_yt.py]"]
  node_speech["Local speech<br/>[captions.py]"]
  node_transcript_tools["Transcript tools<br/>[transcripts.py]"]
  node_language["Hinglish conversion<br/>[translit.py]"]
end

subgraph group_exports["Export and editing"]
  node_clip_render["Clip rendering<br/>[encoders.py]"]
  node_layout["Video layouts<br/>[layouts.py]"]
  node_caption_style["Caption styling<br/>[styling.py]"]
  node_subtitle_export["Subtitle export<br/>[subtitles.py]"]
  node_hook_headings["Opening headings<br/>[hooks.py]"]
  node_saved_edit["Saved-clip editing<br/>[reedit.py]"]
end

subgraph group_extensions["Additional features"]
  node_live_clip["Live clipping<br/>[live_clip.py]"]
  node_live_session["Live sessions<br/>[live_session.py]"]
  node_facecam["Facecam detection<br/>[facecam_detect.py]"]
  node_reporting["Problem reporting<br/>[report.py]"]
end

node_user(("Creator"))
node_ollama["Local Ollama"]
node_video_source(("Video sources"))

node_user -->|"configures and starts"| node_browser
node_browser -->|"requests clip jobs"| node_server
node_server -->|"delegates workflow"| node_job_runtime
node_job_runtime -->|"downloads media"| node_source_fetch
node_video_source -->|"provides video"| node_source_fetch
node_server -->|"prepares previews"| node_early_preview
node_job_runtime -->|"analyzes media"| node_moment_scan
node_job_runtime -->|"ranks candidates"| node_curation
node_curation -->|"uses signal scores"| node_moment_scan
node_curation -->|"applies learned weights"| node_ranking
node_job_runtime -->|"reads source captions"| node_transcript_captions
node_job_runtime -->|"transcribes when needed"| node_speech
node_speech -->|"converts Hindi words"| node_language
node_job_runtime -->|"exports selected clips"| node_clip_render
node_job_runtime -->|"applies framing"| node_layout
node_job_runtime -->|"styles output"| node_caption_style
node_job_runtime -->|"exports subtitle files"| node_subtitle_export
node_browser -->|"explores transcripts"| node_transcript_tools
node_transcript_tools -->|"reuses source retrieval"| node_source_fetch
node_browser -->|"edits saved clips"| node_saved_edit
node_browser -->|"requests heading suggestions"| node_hook_headings
node_hook_headings -->|"requests local suggestions"| node_ollama
node_browser -->|"starts live sessions"| node_live_session
node_live_session -->|"fetches stream media"| node_source_fetch
node_browser -->|"clips live video"| node_live_clip
node_browser -->|"configures facecam"| node_facecam
node_browser -->|"reports problems"| node_reporting

click node_browser "https://github.com/iamajmeena/neonclipping/blob/main/app.js"
click node_server "https://github.com/iamajmeena/neonclipping/blob/main/app.py"
click node_job_runtime "https://github.com/iamajmeena/neonclipping/blob/main/standalone.py"
click node_source_fetch "https://github.com/iamajmeena/neonclipping/blob/main/ytdl.py"
click node_early_preview "https://github.com/iamajmeena/neonclipping/blob/main/previews.py"
click node_moment_scan "https://github.com/iamajmeena/neonclipping/blob/main/highlights.py"
click node_curation "https://github.com/iamajmeena/neonclipping/blob/main/smart.py"
click node_ranking "https://github.com/iamajmeena/neonclipping/blob/main/learn.py"
click node_transcript_captions "https://github.com/iamajmeena/neonclipping/blob/main/captions_yt.py"
click node_speech "https://github.com/iamajmeena/neonclipping/blob/main/captions.py"
click node_transcript_tools "https://github.com/iamajmeena/neonclipping/blob/main/transcripts.py"
click node_language "https://github.com/iamajmeena/neonclipping/blob/main/translit.py"
click node_clip_render "https://github.com/iamajmeena/neonclipping/blob/main/encoders.py"
click node_layout "https://github.com/iamajmeena/neonclipping/blob/main/layouts.py"
click node_caption_style "https://github.com/iamajmeena/neonclipping/blob/main/styling.py"
click node_subtitle_export "https://github.com/iamajmeena/neonclipping/blob/main/subtitles.py"
click node_hook_headings "https://github.com/iamajmeena/neonclipping/blob/main/hooks.py"
click node_saved_edit "https://github.com/iamajmeena/neonclipping/blob/main/reedit.py"
click node_live_clip "https://github.com/iamajmeena/neonclipping/blob/main/live/live_clip.py"
click node_live_session "https://github.com/iamajmeena/neonclipping/blob/main/live_session.py"
click node_facecam "https://github.com/iamajmeena/neonclipping/blob/main/facecam_detect.py"
click node_reporting "https://github.com/iamajmeena/neonclipping/blob/main/report.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_browser,node_server,node_early_preview toneBlue
class node_job_runtime,node_moment_scan,node_curation,node_ranking toneAmber
class node_source_fetch,node_transcript_captions,node_speech,node_transcript_tools,node_language toneMint
class node_clip_render,node_layout,node_caption_style,node_subtitle_export,node_hook_headings,node_saved_edit toneRose
class node_live_clip,node_live_session,node_facecam,node_reporting,node_user,node_ollama,node_video_source toneIndigo
```

## Components

### User interface

- [Studio UI](https://github.com/iamajmeena/neonclipping/blob/main/app.js): `app.js`
- [Local API](https://github.com/iamajmeena/neonclipping/blob/main/app.py): `app.py`
- [Source previews](https://github.com/iamajmeena/neonclipping/blob/main/previews.py): `previews.py`

### Clip workflow

- [Job runtime](https://github.com/iamajmeena/neonclipping/blob/main/standalone.py): `standalone.py`
- [Moment signals](https://github.com/iamajmeena/neonclipping/blob/main/highlights.py): `highlights.py`
- [Moment curation](https://github.com/iamajmeena/neonclipping/blob/main/smart.py): `smart.py`
- [Ranking preferences](https://github.com/iamajmeena/neonclipping/blob/main/learn.py): `learn.py`

### Media and captions

- [Source fetching](https://github.com/iamajmeena/neonclipping/blob/main/ytdl.py): `ytdl.py`
- [Caption sources](https://github.com/iamajmeena/neonclipping/blob/main/captions_yt.py): `captions_yt.py`
- [Local speech](https://github.com/iamajmeena/neonclipping/blob/main/captions.py): `captions.py`
- [Transcript tools](https://github.com/iamajmeena/neonclipping/blob/main/transcripts.py): `transcripts.py`
- [Hinglish conversion](https://github.com/iamajmeena/neonclipping/blob/main/translit.py): `translit.py`

### Export and editing

- [Clip rendering](https://github.com/iamajmeena/neonclipping/blob/main/encoders.py): `encoders.py`
- [Video layouts](https://github.com/iamajmeena/neonclipping/blob/main/layouts.py): `layouts.py`
- [Caption styling](https://github.com/iamajmeena/neonclipping/blob/main/styling.py): `styling.py`
- [Subtitle export](https://github.com/iamajmeena/neonclipping/blob/main/subtitles.py): `subtitles.py`
- [Opening headings](https://github.com/iamajmeena/neonclipping/blob/main/hooks.py): `hooks.py`
- [Saved-clip editing](https://github.com/iamajmeena/neonclipping/blob/main/reedit.py): `reedit.py`

### Additional features

- [Live clipping](https://github.com/iamajmeena/neonclipping/blob/main/live/live_clip.py): `live/live_clip.py`
- [Live sessions](https://github.com/iamajmeena/neonclipping/blob/main/live_session.py): `live_session.py`
- [Facecam detection](https://github.com/iamajmeena/neonclipping/blob/main/facecam_detect.py): `facecam_detect.py`
- [Problem reporting](https://github.com/iamajmeena/neonclipping/blob/main/report.py): `report.py`

### Other components

- **Creator**
- **Local Ollama**
- **Video sources**

## Connections

- Creator → Studio UI: configures and starts (evidence: `README.md`)
- Studio UI → Local API: requests clip jobs (evidence: `README.md`)
- Local API → Job runtime: delegates workflow (evidence: `app.py`)
- Job runtime → Source fetching: downloads media (evidence: `standalone.py`)
- Video sources → Source fetching: provides video (evidence: `README.md`)
- Local API → Source previews: prepares previews (evidence: `app.py`)
- Job runtime → Moment signals: analyzes media (evidence: `standalone.py`)
- Job runtime → Moment curation: ranks candidates (evidence: `smart.py`)
- Moment curation → Moment signals: uses signal scores (evidence: `smart.py`)
- Moment curation → Ranking preferences: applies learned weights (evidence: `smart.py`)
- Job runtime → Caption sources: reads source captions (evidence: `app.py`)
- Job runtime → Local speech: transcribes when needed (evidence: `README.md`)
- Local speech → Hinglish conversion: converts Hindi words (evidence: `captions.py`)
- Job runtime → Clip rendering: exports selected clips (evidence: `README.md`)
- Job runtime → Video layouts: applies framing (evidence: `README.md`)
- Job runtime → Caption styling: styles output (evidence: `README.md`)
- Job runtime → Subtitle export: exports subtitle files (evidence: `README.md`)
- Studio UI → Transcript tools: explores transcripts (evidence: `README.md`)
- Transcript tools → Source fetching: reuses source retrieval (evidence: `transcripts.py`)
- Studio UI → Saved-clip editing: edits saved clips (evidence: `README.md`)
- Studio UI → Opening headings: requests heading suggestions (evidence: `hooks.py`)
- Opening headings → Local Ollama: requests local suggestions (evidence: `hooks.py`)
- Studio UI → Live sessions: starts live sessions (evidence: `README.md`)
- Live sessions → Source fetching: fetches stream media (evidence: `live_session.py`)
- Studio UI → Live clipping: clips live video (evidence: `README.md`)
- Studio UI → Facecam detection: configures facecam (evidence: `README.md`)
- Studio UI → Problem reporting: reports problems
