# dhruvshubh26-bit/qlipcraft architecture

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

- Interactive diagram: https://gitdiagram.com/dhruvshubh26-bit/qlipcraft
- Repository: https://github.com/dhruvshubh26-bit/qlipcraft

## Overview

QlipCraft turns a topic and Qoneqt community into a narrated, captioned vertical short video, through either a CLI or FastAPI studio. Both workflows generate community-toned scene scripts, synthesize narration, select local clips, and compose the result; the web studio also lists and deletes recent videos. The graph shows the sampled orchestration and integrations. The README documents the studio workflow and capabilities; unsampled template and browser details are represented conservatively.

Main entry points: [`web.py`](https://github.com/dhruvshubh26-bit/qlipcraft/blob/main/web.py) (FastAPI Studio), [`main.py`](https://github.com/dhruvshubh26-bit/qlipcraft/blob/main/main.py) (CLI Pipeline), [`static/app.js`](https://github.com/dhruvshubh26-bit/qlipcraft/blob/main/static/app.js) (Browser Logic), [`modules/brain.py`](https://github.com/dhruvshubh26-bit/qlipcraft/blob/main/modules/brain.py) (Script Generation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Creator Entry"]
  node_cli["CLI Pipeline<br/>[main.py]"]
  node_web["FastAPI Studio<br/>[web.py]"]
end

subgraph group_content["Content Generation"]
  node_script["Script Generation<br/>[brain.py]"]
  node_groq{{"Groq API"}}
end

subgraph group_media["Media Production"]
  node_narration["Narration Synthesis<br/>[audio.py]"]
  node_edge_tts{{"Edge TTS"}}
  node_clip_selection["Community Clip Selection<br/>[asset_manager.py]"]
  node_clip_library["Local Clip Library"]
  node_composition["Video Composition<br/>[composer.py]"]
  node_ffmpeg{{"FFmpeg / FFprobe"}}
end

subgraph group_studio["Web Studio"]
  node_webui["Studio Interface<br/>[index.html]"]
  node_browser["Browser Logic<br/>[app.js]"]
  node_web_videos["Generated Web Videos<br/>[web.py]"]
  node_recent["Recent Video List<br/>[web.py]"]
end

node_creator(("Creator"))

node_creator -->|"enters topic"| node_cli
node_creator -->|"enters topic"| node_webui
node_webui -.->|"uses interface logic"| node_browser
node_browser -.->|"submits generation"| node_web
node_cli -->|"requests script"| node_script
node_web -->|"requests script"| node_script
node_script -->|"requests completion"| node_groq
node_cli -->|"sends narration text"| node_narration
node_web -->|"sends narration text"| node_narration
node_narration -->|"synthesizes speech"| node_edge_tts
node_cli -->|"requests scene clips"| node_clip_selection
node_web -->|"requests scene clips"| node_clip_selection
node_clip_selection -->|"selects local clips"| node_clip_library
node_cli -->|"composes video"| node_composition
node_web -->|"composes video"| node_composition
node_composition -->|"processes media"| node_ffmpeg
node_web -->|"writes generated file"| node_web_videos
node_web -->|"records recent item"| node_recent
node_web -->|"renders page"| node_webui
node_web -->|"serves video files"| node_web_videos
node_browser -->|"deletes video"| node_web

click node_cli "https://github.com/dhruvshubh26-bit/qlipcraft/blob/main/main.py"
click node_web "https://github.com/dhruvshubh26-bit/qlipcraft/blob/main/web.py"
click node_webui "https://github.com/dhruvshubh26-bit/qlipcraft/blob/main/templates/index.html"
click node_browser "https://github.com/dhruvshubh26-bit/qlipcraft/blob/main/static/app.js"
click node_script "https://github.com/dhruvshubh26-bit/qlipcraft/blob/main/modules/brain.py"
click node_narration "https://github.com/dhruvshubh26-bit/qlipcraft/blob/main/modules/audio.py"
click node_clip_selection "https://github.com/dhruvshubh26-bit/qlipcraft/blob/main/modules/asset_manager.py"
click node_composition "https://github.com/dhruvshubh26-bit/qlipcraft/blob/main/modules/composer.py"
click node_web_videos "https://github.com/dhruvshubh26-bit/qlipcraft/blob/main/web.py"
click node_recent "https://github.com/dhruvshubh26-bit/qlipcraft/blob/main/web.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_cli,node_web toneBlue
class node_script,node_groq toneAmber
class node_narration,node_edge_tts,node_clip_selection,node_clip_library,node_composition,node_ffmpeg toneMint
class node_webui,node_browser,node_web_videos,node_recent toneRose
class node_creator toneIndigo
```

## Components

### Creator Entry

- [CLI Pipeline](https://github.com/dhruvshubh26-bit/qlipcraft/blob/main/main.py): `main.py`
- [FastAPI Studio](https://github.com/dhruvshubh26-bit/qlipcraft/blob/main/web.py): `web.py`

### Content Generation

- [Script Generation](https://github.com/dhruvshubh26-bit/qlipcraft/blob/main/modules/brain.py): `modules/brain.py`
- **Groq API**

### Media Production

- [Narration Synthesis](https://github.com/dhruvshubh26-bit/qlipcraft/blob/main/modules/audio.py): `modules/audio.py`
- **Edge TTS**
- [Community Clip Selection](https://github.com/dhruvshubh26-bit/qlipcraft/blob/main/modules/asset_manager.py): `modules/asset_manager.py`
- **Local Clip Library**
- [Video Composition](https://github.com/dhruvshubh26-bit/qlipcraft/blob/main/modules/composer.py): `modules/composer.py`
- **FFmpeg / FFprobe**

### Web Studio

- [Studio Interface](https://github.com/dhruvshubh26-bit/qlipcraft/blob/main/templates/index.html): `templates/index.html`
- [Browser Logic](https://github.com/dhruvshubh26-bit/qlipcraft/blob/main/static/app.js): `static/app.js`
- [Generated Web Videos](https://github.com/dhruvshubh26-bit/qlipcraft/blob/main/web.py): `web.py`
- [Recent Video List](https://github.com/dhruvshubh26-bit/qlipcraft/blob/main/web.py): `web.py`

### Other components

- **Creator**

## Connections

- Creator → CLI Pipeline: enters topic (evidence: `main.py`)
- Creator → Studio Interface: enters topic (evidence: `README.md`)
- Studio Interface → Browser Logic: uses interface logic
- Browser Logic → FastAPI Studio: submits generation
- CLI Pipeline → Script Generation: requests script (evidence: `main.py`)
- FastAPI Studio → Script Generation: requests script (evidence: `web.py`)
- Script Generation → Groq API: requests completion (evidence: `modules/brain.py`)
- CLI Pipeline → Narration Synthesis: sends narration text (evidence: `main.py`)
- FastAPI Studio → Narration Synthesis: sends narration text (evidence: `web.py`)
- Narration Synthesis → Edge TTS: synthesizes speech (evidence: `modules/audio.py`)
- CLI Pipeline → Community Clip Selection: requests scene clips (evidence: `main.py`)
- FastAPI Studio → Community Clip Selection: requests scene clips (evidence: `web.py`)
- Community Clip Selection → Local Clip Library: selects local clips (evidence: `modules/asset_manager.py`)
- CLI Pipeline → Video Composition: composes video (evidence: `main.py`)
- FastAPI Studio → Video Composition: composes video (evidence: `web.py`)
- Video Composition → FFmpeg / FFprobe: processes media (evidence: `modules/composer.py`)
- FastAPI Studio → Generated Web Videos: writes generated file (evidence: `web.py`)
- FastAPI Studio → Recent Video List: records recent item (evidence: `web.py`)
- FastAPI Studio → Studio Interface: renders page (evidence: `web.py`)
- FastAPI Studio → Generated Web Videos: serves video files (evidence: `web.py`)
- Browser Logic → FastAPI Studio: deletes video (evidence: `static/app.js`)
