# ss-sevesh/reeltoreal architecture

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

- Interactive diagram: https://gitdiagram.com/ss-sevesh/reeltoreal
- Repository: https://github.com/ss-sevesh/reeltoreal

## Overview

ReelToReal turns short-form videos into a timestamped, searchable knowledge vault, with both a React dashboard and alternate Streamlit interface. Its main workflow downloads a reel, extracts audio and frames, transcribes and captions them, generates an Obsidian note, and indexes the note for hybrid search and grounded chat. The README documents the pipeline and its integrations; source excerpts confirm selected indexing and UI details. Several API, chat, diagnostics, and vault-browser implementations are unsampled, so their internal wiring is not expanded.

Main entry points: [`server.py`](https://github.com/ss-sevesh/reeltoreal/blob/main/server.py) (FastAPI backend), [`src/ingest.py`](https://github.com/ss-sevesh/reeltoreal/blob/main/src/ingest.py) (Video download), [`src/answer.py`](https://github.com/ss-sevesh/reeltoreal/blob/main/src/answer.py) (Grounded RAG answers), [`src/search.py`](https://github.com/ss-sevesh/reeltoreal/blob/main/src/search.py) (Hybrid retrieval and fusion)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interfaces["User interfaces"]
  node_react["React dashboard<br/>[App.tsx]"]
  node_streamlit["Streamlit UI<br/>[app.py]"]
  node_api["Frontend API client<br/>[api.ts]"]
  node_backend["FastAPI backend<br/>[server.py]"]
  node_express["Express backend<br/>[server.ts]"]
end

subgraph group_ingestion["Video ingestion"]
  node_ingest["Video download<br/>[ingest.py]"]
  node_classify["Metadata classification<br/>[classify.py]"]
  node_audio["Audio extraction<br/>[audio.py]"]
  node_frames["Frame sampling<br/>[frames.py]"]
end

subgraph group_knowledge["Knowledge processing"]
  node_transcribe["Timestamped transcription<br/>[transcribe.py]"]
  node_caption["Visual captioning<br/>[caption.py]"]
  node_notegen["Obsidian note generation<br/>[notegen.py]"]
end

subgraph group_retrieval["Search and answers"]
  node_search["Hybrid retrieval and fusion<br/>[search.py]"]
  node_answer["Grounded RAG answers<br/>[answer.py]"]
  node_web["Live web search"]
  node_llm["Groq or Ollama LLM"]
  node_nodevault["Node vault search<br/>[vault.ts]"]
end

subgraph group_persistence["Vault and indexes"]
  node_vault["Obsidian vault notes<br/>[notegen.py]"]
  node_qdrant[("Qdrant vectors<br/>[vector_db.py]")]
  node_fts[("SQLite FTS5 index<br/>[index.py]")]
end

node_user(("User"))

node_user -->|"uses dashboard"| node_react
node_user -.->|"uses alternate UI"| node_streamlit
node_react -->|"calls API client"| node_api
node_api -.->|"requests backend"| node_backend
node_user -.->|"uses API"| node_backend
node_user -.->|"uses Node backend"| node_express
node_backend -->|"runs pipeline"| node_ingest
node_streamlit -->|"starts ingestion"| node_ingest
node_ingest -->|"inspects metadata"| node_classify
node_ingest -->|"extracts audio"| node_audio
node_ingest -->|"samples frames"| node_frames
node_audio -->|"transcribes audio"| node_transcribe
node_frames -->|"captions frames"| node_caption
node_transcribe -->|"provides transcript"| node_notegen
node_caption -->|"provides captions"| node_notegen
node_notegen -->|"writes notes"| node_vault
node_vault -->|"indexes vectors"| node_qdrant
node_vault -->|"indexes text"| node_fts
node_search -->|"queries vectors"| node_qdrant
node_search -->|"queries lexical index"| node_fts
node_backend -->|"serves search"| node_search
node_backend -->|"serves chat"| node_answer
node_answer -->|"retrieves vault context"| node_search
node_answer -->|"fetches live context"| node_web
node_answer -->|"generates comparison"| node_llm
node_express -->|"uses vault parser"| node_nodevault
node_nodevault -.->|"reads vault notes"| node_vault

click node_react "https://github.com/ss-sevesh/reeltoreal/blob/main/src/App.tsx"
click node_streamlit "https://github.com/ss-sevesh/reeltoreal/blob/main/app.py"
click node_api "https://github.com/ss-sevesh/reeltoreal/blob/main/src/services/api.ts"
click node_backend "https://github.com/ss-sevesh/reeltoreal/blob/main/server.py"
click node_express "https://github.com/ss-sevesh/reeltoreal/blob/main/server.ts"
click node_ingest "https://github.com/ss-sevesh/reeltoreal/blob/main/src/ingest.py"
click node_classify "https://github.com/ss-sevesh/reeltoreal/blob/main/src/classify.py"
click node_audio "https://github.com/ss-sevesh/reeltoreal/blob/main/src/audio.py"
click node_frames "https://github.com/ss-sevesh/reeltoreal/blob/main/src/frames.py"
click node_transcribe "https://github.com/ss-sevesh/reeltoreal/blob/main/src/transcribe.py"
click node_caption "https://github.com/ss-sevesh/reeltoreal/blob/main/src/caption.py"
click node_notegen "https://github.com/ss-sevesh/reeltoreal/blob/main/src/notegen.py"
click node_search "https://github.com/ss-sevesh/reeltoreal/blob/main/src/search.py"
click node_answer "https://github.com/ss-sevesh/reeltoreal/blob/main/src/answer.py"
click node_vault "https://github.com/ss-sevesh/reeltoreal/blob/main/src/notegen.py"
click node_qdrant "https://github.com/ss-sevesh/reeltoreal/blob/main/src/vector_db.py"
click node_fts "https://github.com/ss-sevesh/reeltoreal/blob/main/src/index.py"
click node_nodevault "https://github.com/ss-sevesh/reeltoreal/blob/main/server/vault.ts"

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_react,node_streamlit,node_api,node_backend,node_express,node_user toneBlue
class node_ingest,node_classify,node_audio,node_frames toneAmber
class node_transcribe,node_caption,node_notegen toneMint
class node_search,node_answer,node_web,node_llm,node_nodevault toneRose
class node_vault,node_qdrant,node_fts toneIndigo
```

## Components

### User interfaces

- [React dashboard](https://github.com/ss-sevesh/reeltoreal/blob/main/src/App.tsx): `src/App.tsx`
- [Streamlit UI](https://github.com/ss-sevesh/reeltoreal/blob/main/app.py): `app.py`
- [Frontend API client](https://github.com/ss-sevesh/reeltoreal/blob/main/src/services/api.ts): `src/services/api.ts`
- [FastAPI backend](https://github.com/ss-sevesh/reeltoreal/blob/main/server.py): `server.py`
- [Express backend](https://github.com/ss-sevesh/reeltoreal/blob/main/server.ts): `server.ts`

### Video ingestion

- [Video download](https://github.com/ss-sevesh/reeltoreal/blob/main/src/ingest.py): `src/ingest.py`
- [Metadata classification](https://github.com/ss-sevesh/reeltoreal/blob/main/src/classify.py): `src/classify.py`
- [Audio extraction](https://github.com/ss-sevesh/reeltoreal/blob/main/src/audio.py): `src/audio.py`
- [Frame sampling](https://github.com/ss-sevesh/reeltoreal/blob/main/src/frames.py): `src/frames.py`

### Knowledge processing

- [Timestamped transcription](https://github.com/ss-sevesh/reeltoreal/blob/main/src/transcribe.py): `src/transcribe.py`
- [Visual captioning](https://github.com/ss-sevesh/reeltoreal/blob/main/src/caption.py): `src/caption.py`
- [Obsidian note generation](https://github.com/ss-sevesh/reeltoreal/blob/main/src/notegen.py): `src/notegen.py`

### Search and answers

- [Hybrid retrieval and fusion](https://github.com/ss-sevesh/reeltoreal/blob/main/src/search.py): `src/search.py`
- [Grounded RAG answers](https://github.com/ss-sevesh/reeltoreal/blob/main/src/answer.py): `src/answer.py`
- **Live web search**
- **Groq or Ollama LLM**
- [Node vault search](https://github.com/ss-sevesh/reeltoreal/blob/main/server/vault.ts): `server/vault.ts`

### Vault and indexes

- [Obsidian vault notes](https://github.com/ss-sevesh/reeltoreal/blob/main/src/notegen.py): `src/notegen.py`
- [Qdrant vectors](https://github.com/ss-sevesh/reeltoreal/blob/main/src/vector_db.py): `src/vector_db.py`
- [SQLite FTS5 index](https://github.com/ss-sevesh/reeltoreal/blob/main/src/index.py): `src/index.py`

### Other components

- **User**

## Connections

- User → React dashboard: uses dashboard (evidence: `README.md`)
- User → Streamlit UI: uses alternate UI (evidence: `README.md`)
- React dashboard → Frontend API client: calls API client (evidence: `src/App.tsx`)
- Frontend API client → FastAPI backend: requests backend
- User → FastAPI backend: uses API (evidence: `README.md`)
- User → Express backend: uses Node backend (evidence: `README.md`)
- FastAPI backend → Video download: runs pipeline (evidence: `server.py`)
- Streamlit UI → Video download: starts ingestion (evidence: `app.py`)
- Video download → Metadata classification: inspects metadata (evidence: `app.py`)
- Video download → Audio extraction: extracts audio (evidence: `README.md`)
- Video download → Frame sampling: samples frames (evidence: `README.md`)
- Audio extraction → Timestamped transcription: transcribes audio (evidence: `README.md`)
- Frame sampling → Visual captioning: captions frames (evidence: `README.md`)
- Timestamped transcription → Obsidian note generation: provides transcript (evidence: `README.md`)
- Visual captioning → Obsidian note generation: provides captions (evidence: `README.md`)
- Obsidian note generation → Obsidian vault notes: writes notes (evidence: `README.md`)
- Obsidian vault notes → Qdrant vectors: indexes vectors (evidence: `README.md`)
- Obsidian vault notes → SQLite FTS5 index: indexes text (evidence: `README.md`)
- Hybrid retrieval and fusion → Qdrant vectors: queries vectors (evidence: `src/search.py`)
- Hybrid retrieval and fusion → SQLite FTS5 index: queries lexical index (evidence: `src/search.py`)
- FastAPI backend → Hybrid retrieval and fusion: serves search (evidence: `server.py`)
- FastAPI backend → Grounded RAG answers: serves chat (evidence: `server.py`)
- Grounded RAG answers → Hybrid retrieval and fusion: retrieves vault context (evidence: `src/answer.py`)
- Grounded RAG answers → Live web search: fetches live context (evidence: `README.md`)
- Grounded RAG answers → Groq or Ollama LLM: generates comparison (evidence: `README.md`)
- Express backend → Node vault search: uses vault parser (evidence: `server.ts`)
- Node vault search → Obsidian vault notes: reads vault notes
