# aryanpatil4506/dropzero architecture

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

- Interactive diagram: https://gitdiagram.com/aryanpatil4506/dropzero
- Repository: https://github.com/aryanpatil4506/dropzero

## Overview

DROPZERO is a local-first video audience simulator. A creator uploads a video or script, starts analysis, and receives a transcript, timed segments, multimodal features, retention predictions, evidence-backed drop-off flags, and edit suggestions. The dashboard also supports edit-impact simulation, rendering edited copies, A/B comparisons, and validation against real viewing data. The map combines the README workflow with the sampled API, pipeline, detection, rendering, and frontend files; several unsampled subsystems are represented at their exact directories, so some internal links are intentionally omitted.

Main entry points: [`backend/app/pipeline/runner.py`](https://github.com/aryanpatil4506/dropzero/blob/main/backend/app/pipeline/runner.py) (Analysis runner), [`backend/app/api/projects.py`](https://github.com/aryanpatil4506/dropzero/blob/main/backend/app/api/projects.py) (Project API), [`frontend/src/api/client.ts`](https://github.com/aryanpatil4506/dropzero/blob/main/frontend/src/api/client.ts) (API client), [`frontend/src/pages/Dashboard.tsx`](https://github.com/aryanpatil4506/dropzero/blob/main/frontend/src/pages/Dashboard.tsx) (Project dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Creator experience"]
  node_dashboard["Project dashboard<br/>[Dashboard.tsx]"]
  node_api_client["API client<br/>[client.ts]"]
end

subgraph group_analysis["Analysis pipeline"]
  node_pipeline["Analysis runner<br/>[runner.py]"]
  node_ingestion["Media ingestion"]
  node_transcription["Transcription"]
  node_segmentation["Timed segmentation<br/>[windows.py]"]
  node_text_features["Text features<br/>[extract.py]"]
  node_av_features["Audio-visual features<br/>[av.py]"]
  node_local_models["Local model runtime<br/>[embedder.py]"]
end

subgraph group_insights["Retention insights"]
  node_retention_model["Retention prediction<br/>[predict.py]"]
  node_detection["Drop-off detection<br/>[flags.py]"]
  node_promise_check["Title-promise check<br/>[promises.py]"]
  node_explanations["Evidence explanations<br/>[llm.py]"]
end

subgraph group_editing["Edits and validation"]
  node_simulation["Edit simulation"]
  node_rendering["Edited-video rendering<br/>[service.py]"]
  node_validation["Model validation"]
end

subgraph group_platform["API and storage"]
  node_project_api["Project API<br/>[projects.py]"]
  node_job_api["Job API<br/>[jobs.py]"]
  node_db[("Project and artifact store<br/>[db.py]")]
  node_media_store[("Encrypted media store<br/>[media_store.py]")]
end

node_creator(("Creator"))

node_creator -->|"uses"| node_dashboard
node_dashboard -->|"requests data"| node_api_client
node_api_client -->|"calls project endpoints"| node_project_api
node_api_client -->|"polls jobs"| node_job_api
node_project_api -->|"starts analysis"| node_pipeline
node_pipeline -->|"extracts media"| node_ingestion
node_pipeline -->|"transcribes"| node_transcription
node_pipeline -->|"builds segments"| node_segmentation
node_pipeline -->|"extracts text features"| node_text_features
node_pipeline -->|"extracts AV features"| node_av_features
node_text_features -->|"uses embeddings"| node_local_models
node_pipeline -->|"predicts retention"| node_retention_model
node_pipeline -->|"checks title promise"| node_promise_check
node_pipeline -->|"detects drop-offs"| node_detection
node_detection -.->|"explains flags"| node_explanations
node_project_api -->|"simulates edits"| node_simulation
node_project_api -->|"requests renders"| node_rendering
node_rendering -->|"stores encrypted output"| node_media_store
node_pipeline -->|"persists artifacts"| node_db
node_project_api -.->|"reads project data"| node_db
node_project_api -.->|"serves uploaded media"| node_media_store
node_api_client -->|"fetches validation"| node_validation
node_retention_model -->|"evaluated against viewing data"| node_validation

click node_dashboard "https://github.com/aryanpatil4506/dropzero/blob/main/frontend/src/pages/Dashboard.tsx"
click node_api_client "https://github.com/aryanpatil4506/dropzero/blob/main/frontend/src/api/client.ts"
click node_project_api "https://github.com/aryanpatil4506/dropzero/blob/main/backend/app/api/projects.py"
click node_job_api "https://github.com/aryanpatil4506/dropzero/blob/main/backend/app/api/jobs.py"
click node_pipeline "https://github.com/aryanpatil4506/dropzero/blob/main/backend/app/pipeline/runner.py"
click node_ingestion "https://github.com/aryanpatil4506/dropzero/tree/main/backend/app/ingestion"
click node_transcription "https://github.com/aryanpatil4506/dropzero/tree/main/backend/app/transcription"
click node_segmentation "https://github.com/aryanpatil4506/dropzero/blob/main/backend/app/segmentation/windows.py"
click node_text_features "https://github.com/aryanpatil4506/dropzero/blob/main/backend/app/features/text/extract.py"
click node_av_features "https://github.com/aryanpatil4506/dropzero/blob/main/backend/app/features/av.py"
click node_retention_model "https://github.com/aryanpatil4506/dropzero/blob/main/backend/app/model/predict.py"
click node_detection "https://github.com/aryanpatil4506/dropzero/blob/main/backend/app/detection/flags.py"
click node_promise_check "https://github.com/aryanpatil4506/dropzero/blob/main/backend/app/detection/promises.py"
click node_explanations "https://github.com/aryanpatil4506/dropzero/blob/main/backend/app/explain/llm.py"
click node_simulation "https://github.com/aryanpatil4506/dropzero/tree/main/backend/app/simulate"
click node_rendering "https://github.com/aryanpatil4506/dropzero/blob/main/backend/app/render/service.py"
click node_validation "https://github.com/aryanpatil4506/dropzero/tree/main/backend/app/validation"
click node_db "https://github.com/aryanpatil4506/dropzero/blob/main/backend/app/storage/db.py"
click node_media_store "https://github.com/aryanpatil4506/dropzero/blob/main/backend/app/storage/media_store.py"
click node_local_models "https://github.com/aryanpatil4506/dropzero/blob/main/backend/app/features/text/embedder.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_dashboard,node_api_client toneBlue
class node_pipeline,node_ingestion,node_transcription,node_segmentation,node_text_features,node_av_features,node_local_models toneAmber
class node_retention_model,node_detection,node_promise_check,node_explanations toneMint
class node_simulation,node_rendering,node_validation toneRose
class node_project_api,node_job_api,node_db,node_media_store,node_creator toneIndigo
```

## Components

### Creator experience

- [Project dashboard](https://github.com/aryanpatil4506/dropzero/blob/main/frontend/src/pages/Dashboard.tsx): `frontend/src/pages/Dashboard.tsx`
- [API client](https://github.com/aryanpatil4506/dropzero/blob/main/frontend/src/api/client.ts): `frontend/src/api/client.ts`

### Analysis pipeline

- [Analysis runner](https://github.com/aryanpatil4506/dropzero/blob/main/backend/app/pipeline/runner.py): `backend/app/pipeline/runner.py`
- [Media ingestion](https://github.com/aryanpatil4506/dropzero/tree/main/backend/app/ingestion): `backend/app/ingestion`
- [Transcription](https://github.com/aryanpatil4506/dropzero/tree/main/backend/app/transcription): `backend/app/transcription`
- [Timed segmentation](https://github.com/aryanpatil4506/dropzero/blob/main/backend/app/segmentation/windows.py): `backend/app/segmentation/windows.py`
- [Text features](https://github.com/aryanpatil4506/dropzero/blob/main/backend/app/features/text/extract.py): `backend/app/features/text/extract.py`
- [Audio-visual features](https://github.com/aryanpatil4506/dropzero/blob/main/backend/app/features/av.py): `backend/app/features/av.py`
- [Local model runtime](https://github.com/aryanpatil4506/dropzero/blob/main/backend/app/features/text/embedder.py): `backend/app/features/text/embedder.py`

### Retention insights

- [Retention prediction](https://github.com/aryanpatil4506/dropzero/blob/main/backend/app/model/predict.py): `backend/app/model/predict.py`
- [Drop-off detection](https://github.com/aryanpatil4506/dropzero/blob/main/backend/app/detection/flags.py): `backend/app/detection/flags.py`
- [Title-promise check](https://github.com/aryanpatil4506/dropzero/blob/main/backend/app/detection/promises.py): `backend/app/detection/promises.py`
- [Evidence explanations](https://github.com/aryanpatil4506/dropzero/blob/main/backend/app/explain/llm.py): `backend/app/explain/llm.py`

### Edits and validation

- [Edit simulation](https://github.com/aryanpatil4506/dropzero/tree/main/backend/app/simulate): `backend/app/simulate`
- [Edited-video rendering](https://github.com/aryanpatil4506/dropzero/blob/main/backend/app/render/service.py): `backend/app/render/service.py`
- [Model validation](https://github.com/aryanpatil4506/dropzero/tree/main/backend/app/validation): `backend/app/validation`

### API and storage

- [Project API](https://github.com/aryanpatil4506/dropzero/blob/main/backend/app/api/projects.py): `backend/app/api/projects.py`
- [Job API](https://github.com/aryanpatil4506/dropzero/blob/main/backend/app/api/jobs.py): `backend/app/api/jobs.py`
- [Project and artifact store](https://github.com/aryanpatil4506/dropzero/blob/main/backend/app/storage/db.py): `backend/app/storage/db.py`
- [Encrypted media store](https://github.com/aryanpatil4506/dropzero/blob/main/backend/app/storage/media_store.py): `backend/app/storage/media_store.py`

### Other components

- **Creator**

## Connections

- Creator → Project dashboard: uses (evidence: `README.md`)
- Project dashboard → API client: requests data (evidence: `frontend/src/pages/Dashboard.tsx`)
- API client → Project API: calls project endpoints (evidence: `README.md`)
- API client → Job API: polls jobs (evidence: `frontend/src/api/client.ts`)
- Project API → Analysis runner: starts analysis (evidence: `backend/app/api/projects.py`)
- Analysis runner → Media ingestion: extracts media (evidence: `backend/app/pipeline/runner.py`)
- Analysis runner → Transcription: transcribes (evidence: `backend/app/pipeline/runner.py`)
- Analysis runner → Timed segmentation: builds segments (evidence: `backend/app/pipeline/runner.py`)
- Analysis runner → Text features: extracts text features (evidence: `backend/app/pipeline/runner.py`)
- Analysis runner → Audio-visual features: extracts AV features (evidence: `backend/app/pipeline/runner.py`)
- Text features → Local model runtime: uses embeddings (evidence: `backend/app/features/text/extract.py`)
- Analysis runner → Retention prediction: predicts retention (evidence: `backend/app/pipeline/runner.py`)
- Analysis runner → Title-promise check: checks title promise (evidence: `backend/app/pipeline/runner.py`)
- Analysis runner → Drop-off detection: detects drop-offs (evidence: `backend/app/pipeline/runner.py`)
- Drop-off detection → Evidence explanations: explains flags (evidence: `backend/app/explain/llm.py`)
- Project API → Edit simulation: simulates edits (evidence: `README.md`)
- Project API → Edited-video rendering: requests renders (evidence: `backend/app/api/projects.py`)
- Edited-video rendering → Encrypted media store: stores encrypted output (evidence: `backend/app/render/service.py`)
- Analysis runner → Project and artifact store: persists artifacts (evidence: `backend/app/pipeline/runner.py`)
- Project API → Project and artifact store: reads project data (evidence: `backend/app/api/projects.py`)
- Project API → Encrypted media store: serves uploaded media
- API client → Model validation: fetches validation (evidence: `README.md`)
- Retention prediction → Model validation: evaluated against viewing data (evidence: `README.md`)
