# naserkhan07/naveed architecture

> Architecture diagram of the GitHub repository naserkhan07/naveed, 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/naserkhan07/naveed
- Repository: https://github.com/naserkhan07/naveed

## Overview

This repository combines a local video-to-Shorts/Reels publishing workflow with a Splitzzz storefront for selling verified Reel packs. The main path is links.txt → download and acknowledge a source → transcribe and plan clips → render and publish clips → collect eligible clips into ZIP packs. The README documents the product-level stages and storefront behavior; some implementation details, particularly the pipeline and storefront payment wiring, were not sampled, so uncertain connections are omitted or marked unverified.

Main entry points: [`shorts_bot/pipeline.py`](https://github.com/naserkhan07/naveed/blob/main/shorts_bot/pipeline.py) (Workflow pipeline), [`shorts_bot/file_queue.py`](https://github.com/naserkhan07/naveed/blob/main/shorts_bot/file_queue.py) (Link queue), [`main.py`](https://github.com/naserkhan07/naveed/blob/main/main.py) (Local launcher), [`shorts_bot/store_bundles.py`](https://github.com/naserkhan07/naveed/blob/main/shorts_bot/store_bundles.py) (Pack builder)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_intake["Queue and workflow"]
  node_entry["Local launcher<br/>[main.py]"]
  node_queue["Link queue<br/>[file_queue.py]"]
  node_pipeline["Workflow pipeline<br/>[pipeline.py]"]
  node_jobs[("Job history<br/>[db.py]")]
  node_config["Runtime settings<br/>[config.py]"]
end

subgraph group_production["Clip production"]
  node_download["Video downloader<br/>[downloader.py]"]
  node_transcribe["Transcription and planning<br/>[ai.py]"]
  node_media["Clip rendering<br/>[media.py]"]
  node_enhance["Optional enhancement<br/>[enhancer.py]"]
  node_archive["Job archive<br/>[archive.py]"]
end

subgraph group_publishing["Platform publishing"]
  node_youtube["YouTube publishing<br/>[youtube.py]"]
  node_instagram["Instagram publishing<br/>[instagram.py]"]
  node_facebook["Facebook publishing<br/>[facebook.py]"]
end

subgraph group_packs["Reel packs"]
  node_bundles["Pack builder<br/>[store_bundles.py]"]
  node_bundle_db[("Pack records<br/>[db.py]")]
end

subgraph group_storefront["Splitzzz storefront"]
  node_local_site["Local storefront server<br/>[local_site.py]"]
  node_store_ui["Storefront interface<br/>[app.js]"]
  node_store_api["Storefront API"]
end

node_operator(("Operator"))
node_r2[("Cloudflare R2")]
node_customer(("Store customer"))
node_razorpay["Razorpay"]

node_operator -->|"starts"| node_entry
node_entry -->|"starts watcher"| node_queue
node_entry -->|"starts server"| node_local_site
node_operator -->|"adds URLs"| node_queue
node_queue -->|"downloads source"| node_download
node_queue -->|"runs jobs"| node_pipeline
node_queue -->|"records jobs"| node_jobs
node_pipeline -->|"downloads source"| node_download
node_pipeline -->|"transcribes and plans"| node_transcribe
node_pipeline -->|"renders clips"| node_media
node_pipeline -->|"optionally enhances"| node_enhance
node_pipeline -->|"publishes Shorts"| node_youtube
node_pipeline -->|"publishes Reels"| node_instagram
node_pipeline -->|"publishes Reels"| node_facebook
node_pipeline -->|"creates job folders"| node_archive
node_pipeline -->|"updates job state"| node_jobs
node_config -.->|"configures"| node_pipeline
node_pipeline -->|"builds ready packs"| node_bundles
node_bundles -->|"records packs"| node_bundle_db
node_bundles -->|"optionally uploads"| node_r2
node_customer -.->|"browses and buys"| node_store_ui
node_store_ui -.->|"requests products and orders"| node_store_api
node_store_api -->|"verifies payment"| node_razorpay
node_store_api -->|"issues signed download"| node_r2
node_entry -->|"serves storefront"| node_local_site

click node_entry "https://github.com/naserkhan07/naveed/blob/main/main.py"
click node_queue "https://github.com/naserkhan07/naveed/blob/main/shorts_bot/file_queue.py"
click node_pipeline "https://github.com/naserkhan07/naveed/blob/main/shorts_bot/pipeline.py"
click node_jobs "https://github.com/naserkhan07/naveed/blob/main/shorts_bot/db.py"
click node_config "https://github.com/naserkhan07/naveed/blob/main/shorts_bot/config.py"
click node_download "https://github.com/naserkhan07/naveed/blob/main/shorts_bot/downloader.py"
click node_transcribe "https://github.com/naserkhan07/naveed/blob/main/shorts_bot/ai.py"
click node_media "https://github.com/naserkhan07/naveed/blob/main/shorts_bot/media.py"
click node_enhance "https://github.com/naserkhan07/naveed/blob/main/shorts_bot/enhancer.py"
click node_archive "https://github.com/naserkhan07/naveed/blob/main/shorts_bot/archive.py"
click node_youtube "https://github.com/naserkhan07/naveed/blob/main/shorts_bot/youtube.py"
click node_instagram "https://github.com/naserkhan07/naveed/blob/main/shorts_bot/instagram.py"
click node_facebook "https://github.com/naserkhan07/naveed/blob/main/shorts_bot/facebook.py"
click node_bundles "https://github.com/naserkhan07/naveed/blob/main/shorts_bot/store_bundles.py"
click node_bundle_db "https://github.com/naserkhan07/naveed/blob/main/shorts_bot/db.py"
click node_local_site "https://github.com/naserkhan07/naveed/blob/main/shorts_bot/local_site.py"
click node_store_ui "https://github.com/naserkhan07/naveed/blob/main/website/public/app.js"
click node_store_api "https://github.com/naserkhan07/naveed/tree/main/website/api"

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_entry,node_queue,node_pipeline,node_jobs,node_config toneBlue
class node_download,node_transcribe,node_media,node_enhance,node_archive,node_r2 toneAmber
class node_youtube,node_instagram,node_facebook toneMint
class node_bundles,node_bundle_db toneRose
class node_local_site,node_store_ui,node_store_api,node_operator,node_customer,node_razorpay toneIndigo
```

## Components

### Queue and workflow

- [Local launcher](https://github.com/naserkhan07/naveed/blob/main/main.py): `main.py`
- [Link queue](https://github.com/naserkhan07/naveed/blob/main/shorts_bot/file_queue.py): `shorts_bot/file_queue.py`
- [Workflow pipeline](https://github.com/naserkhan07/naveed/blob/main/shorts_bot/pipeline.py): `shorts_bot/pipeline.py`
- [Job history](https://github.com/naserkhan07/naveed/blob/main/shorts_bot/db.py): `shorts_bot/db.py`
- [Runtime settings](https://github.com/naserkhan07/naveed/blob/main/shorts_bot/config.py): `shorts_bot/config.py`

### Clip production

- [Video downloader](https://github.com/naserkhan07/naveed/blob/main/shorts_bot/downloader.py): `shorts_bot/downloader.py`
- [Transcription and planning](https://github.com/naserkhan07/naveed/blob/main/shorts_bot/ai.py): `shorts_bot/ai.py`
- [Clip rendering](https://github.com/naserkhan07/naveed/blob/main/shorts_bot/media.py): `shorts_bot/media.py`
- [Optional enhancement](https://github.com/naserkhan07/naveed/blob/main/shorts_bot/enhancer.py): `shorts_bot/enhancer.py`
- [Job archive](https://github.com/naserkhan07/naveed/blob/main/shorts_bot/archive.py): `shorts_bot/archive.py`

### Platform publishing

- [YouTube publishing](https://github.com/naserkhan07/naveed/blob/main/shorts_bot/youtube.py): `shorts_bot/youtube.py`
- [Instagram publishing](https://github.com/naserkhan07/naveed/blob/main/shorts_bot/instagram.py): `shorts_bot/instagram.py`
- [Facebook publishing](https://github.com/naserkhan07/naveed/blob/main/shorts_bot/facebook.py): `shorts_bot/facebook.py`

### Reel packs

- [Pack builder](https://github.com/naserkhan07/naveed/blob/main/shorts_bot/store_bundles.py): `shorts_bot/store_bundles.py`
- [Pack records](https://github.com/naserkhan07/naveed/blob/main/shorts_bot/db.py): `shorts_bot/db.py`

### Splitzzz storefront

- [Local storefront server](https://github.com/naserkhan07/naveed/blob/main/shorts_bot/local_site.py): `shorts_bot/local_site.py`
- [Storefront interface](https://github.com/naserkhan07/naveed/blob/main/website/public/app.js): `website/public/app.js`
- [Storefront API](https://github.com/naserkhan07/naveed/tree/main/website/api): `website/api`

### Other components

- **Operator**
- **Cloudflare R2**
- **Store customer**
- **Razorpay**

## Connections

- Operator → Local launcher: starts (evidence: `main.py`)
- Local launcher → Link queue: starts watcher (evidence: `main.py`)
- Local launcher → Local storefront server: starts server (evidence: `main.py`)
- Operator → Link queue: adds URLs (evidence: `README.md`)
- Link queue → Video downloader: downloads source (evidence: `README.md`)
- Link queue → Workflow pipeline: runs jobs (evidence: `shorts_bot/file_queue.py`)
- Link queue → Job history: records jobs (evidence: `shorts_bot/file_queue.py`)
- Workflow pipeline → Video downloader: downloads source (evidence: `README.md`)
- Workflow pipeline → Transcription and planning: transcribes and plans (evidence: `README.md`)
- Workflow pipeline → Clip rendering: renders clips (evidence: `README.md`)
- Workflow pipeline → Optional enhancement: optionally enhances (evidence: `README.md`)
- Workflow pipeline → YouTube publishing: publishes Shorts (evidence: `README.md`)
- Workflow pipeline → Instagram publishing: publishes Reels (evidence: `README.md`)
- Workflow pipeline → Facebook publishing: publishes Reels (evidence: `README.md`)
- Workflow pipeline → Job archive: creates job folders (evidence: `shorts_bot/pipeline.py`)
- Workflow pipeline → Job history: updates job state (evidence: `shorts_bot/pipeline.py`)
- Runtime settings → Workflow pipeline: configures (evidence: `shorts_bot/pipeline.py`)
- Workflow pipeline → Pack builder: builds ready packs (evidence: `shorts_bot/pipeline.py`)
- Pack builder → Pack records: records packs (evidence: `shorts_bot/store_bundles.py`)
- Pack builder → Cloudflare R2: optionally uploads (evidence: `README.md`)
- Store customer → Storefront interface: browses and buys
- Storefront interface → Storefront API: requests products and orders
- Storefront API → Razorpay: verifies payment (evidence: `README.md`)
- Storefront API → Cloudflare R2: issues signed download (evidence: `README.md`)
- Local launcher → Local storefront server: serves storefront (evidence: `main.py`)
