# yashmagar01/getreel architecture

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

- Interactive diagram: https://gitdiagram.com/yashmagar01/getreel
- Repository: https://github.com/yashmagar01/getreel

## Overview

GetReel accepts Instagram Reel or YouTube URLs and returns either a structured analysis or a downloadable video. The principal Reel workflow is coordinated by the FastAPI backend: fetch media, transcribe and inspect frames, classify the content, generate a matching result, and resolve any promised link. The Next.js app submits requests, displays streaming progress and results, and supports shared capsules. README documentation supplies the overall pipeline and capability map; the sampled backend excerpt is partial, so internal call wiring beyond the documented flow is shown conservatively.

Main entry points: [`backend/main.py`](https://github.com/yashmagar01/getreel/blob/main/backend/main.py) (FastAPI pipeline), [`frontend/lib/api.ts`](https://github.com/yashmagar01/getreel/blob/main/frontend/lib/api.ts) (API client), [`backend/providers.py`](https://github.com/yashmagar01/getreel/blob/main/backend/providers.py) (Model providers), [`frontend/app/page.tsx`](https://github.com/yashmagar01/getreel/blob/main/frontend/app/page.tsx) (Submit and results)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Web experience"]
  node_home["Submit and results<br/>[page.tsx]"]
  node_clientapi["API client<br/>[api.ts]"]
  node_preview["Preview and progress"]
  node_roadmapui["Guide display<br/>[RoadmapDisplay.tsx]"]
  node_capsulepage["Shared capsule view<br/>[CapsuleClient.tsx]"]
end

subgraph group_orchestration["API orchestration"]
  node_backend["FastAPI pipeline<br/>[main.py]"]
  node_metadata["Instagram metadata<br/>[ig_meta.py]"]
end

subgraph group_analysis["Reel analysis"]
  node_video["Media download<br/>[downloader.py]"]
  node_ytvideo["YouTube download<br/>[yt_downloader.py]"]
  node_transcribe["Audio transcription<br/>[transcriber.py]"]
  node_frames["Frame extraction<br/>[frame_extractor.py]"]
  node_analyzer["Multimodal analysis<br/>[analyzer.py]"]
  node_classifier["Content classification"]
  node_strategies["Content strategies"]
  node_roadmap["Guide generation"]
  node_links["Promised-link resolver<br/>[link_finder.py]"]
end

subgraph group_persistence["State and sharing"]
  node_cache[("Result cache<br/>[cache.py]")]
  node_capsules[("Capsule store<br/>[capsule_store.py]")]
  node_jobs[("Job state<br/>[job_store.py]")]
  node_downloadstate[("Download tokens<br/>[main.py]")]
end

subgraph group_integrations["External services"]
  node_providers["Model providers<br/>[providers.py]"]
  node_instagram(("Instagram / oEmbed"))
  node_youtube(("YouTube"))
  node_groq(("Groq models"))
  node_websearch(("Web search"))
end

node_visitor(("Visitor"))

node_visitor -->|"submits URL"| node_home
node_home -->|"requests analysis"| node_clientapi
node_clientapi -->|"starts job"| node_backend
node_backend -->|"streams progress"| node_clientapi
node_clientapi -->|"updates preview"| node_preview
node_home -->|"renders result"| node_roadmapui
node_backend -->|"fetches metadata"| node_metadata
node_metadata -->|"requests oEmbed"| node_instagram
node_backend -->|"downloads Reel"| node_video
node_video -->|"fetches media"| node_instagram
node_backend -->|"downloads YouTube"| node_ytvideo
node_ytvideo -->|"fetches media"| node_youtube
node_backend -->|"transcribes audio"| node_transcribe
node_backend -->|"extracts frames"| node_frames
node_backend -->|"analyzes media"| node_analyzer
node_backend -->|"classifies content"| node_classifier
node_backend -->|"generates matching output"| node_strategies
node_backend -->|"generates guide"| node_roadmap
node_backend -->|"resolves promised link"| node_links
node_analyzer -->|"uses models"| node_providers
node_classifier -->|"uses models"| node_providers
node_strategies -->|"uses models"| node_providers
node_providers -->|"calls models"| node_groq
node_links -->|"searches resources"| node_websearch
node_backend -->|"reads and writes"| node_cache
node_backend -->|"tracks job"| node_jobs
node_backend -->|"stores shared result"| node_capsules
node_capsulepage -->|"fetches capsule"| node_backend
node_backend -->|"returns capsule data"| node_capsulepage
node_backend -->|"issues download token"| node_downloadstate
node_visitor -->|"opens shared result"| node_capsulepage

click node_home "https://github.com/yashmagar01/getreel/blob/main/frontend/app/page.tsx"
click node_clientapi "https://github.com/yashmagar01/getreel/blob/main/frontend/lib/api.ts"
click node_preview "https://github.com/yashmagar01/getreel/blob/main/frontend/components/ReelPreviewCard.tsx"
click node_roadmapui "https://github.com/yashmagar01/getreel/blob/main/frontend/components/RoadmapDisplay.tsx"
click node_capsulepage "https://github.com/yashmagar01/getreel/blob/main/frontend/app/capsule/%5Bid%5D/CapsuleClient.tsx"
click node_backend "https://github.com/yashmagar01/getreel/blob/main/backend/main.py"
click node_metadata "https://github.com/yashmagar01/getreel/blob/main/backend/ig_meta.py"
click node_video "https://github.com/yashmagar01/getreel/blob/main/backend/downloader.py"
click node_ytvideo "https://github.com/yashmagar01/getreel/blob/main/backend/yt_downloader.py"
click node_transcribe "https://github.com/yashmagar01/getreel/blob/main/backend/transcriber.py"
click node_frames "https://github.com/yashmagar01/getreel/blob/main/backend/frame_extractor.py"
click node_analyzer "https://github.com/yashmagar01/getreel/blob/main/backend/analyzer.py"
click node_classifier "https://github.com/yashmagar01/getreel/blob/main/backend/content_classifier.py"
click node_strategies "https://github.com/yashmagar01/getreel/blob/main/backend/content_strategies.py"
click node_roadmap "https://github.com/yashmagar01/getreel/blob/main/backend/roadmap_generator.py"
click node_links "https://github.com/yashmagar01/getreel/blob/main/backend/link_finder.py"
click node_providers "https://github.com/yashmagar01/getreel/blob/main/backend/providers.py"
click node_cache "https://github.com/yashmagar01/getreel/blob/main/backend/cache.py"
click node_capsules "https://github.com/yashmagar01/getreel/blob/main/backend/capsule_store.py"
click node_jobs "https://github.com/yashmagar01/getreel/blob/main/backend/job_store.py"
click node_downloadstate "https://github.com/yashmagar01/getreel/blob/main/backend/main.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_home,node_clientapi,node_preview,node_roadmapui,node_capsulepage toneBlue
class node_backend,node_metadata toneAmber
class node_video,node_ytvideo,node_transcribe,node_frames,node_analyzer,node_classifier,node_strategies,node_roadmap,node_links toneMint
class node_cache,node_capsules,node_jobs,node_downloadstate toneRose
class node_providers,node_instagram,node_youtube,node_groq,node_websearch,node_visitor toneIndigo
```

## Components

### Web experience

- [Submit and results](https://github.com/yashmagar01/getreel/blob/main/frontend/app/page.tsx): `frontend/app/page.tsx`
- [API client](https://github.com/yashmagar01/getreel/blob/main/frontend/lib/api.ts): `frontend/lib/api.ts`
- [Preview and progress](https://github.com/yashmagar01/getreel/blob/main/frontend/components/ReelPreviewCard.tsx): `frontend/components/ReelPreviewCard.tsx`
- [Guide display](https://github.com/yashmagar01/getreel/blob/main/frontend/components/RoadmapDisplay.tsx): `frontend/components/RoadmapDisplay.tsx`
- [Shared capsule view](https://github.com/yashmagar01/getreel/blob/main/frontend/app/capsule/%5Bid%5D/CapsuleClient.tsx): `frontend/app/capsule/[id]/CapsuleClient.tsx`

### API orchestration

- [FastAPI pipeline](https://github.com/yashmagar01/getreel/blob/main/backend/main.py): `backend/main.py`
- [Instagram metadata](https://github.com/yashmagar01/getreel/blob/main/backend/ig_meta.py): `backend/ig_meta.py`

### Reel analysis

- [Media download](https://github.com/yashmagar01/getreel/blob/main/backend/downloader.py): `backend/downloader.py`
- [YouTube download](https://github.com/yashmagar01/getreel/blob/main/backend/yt_downloader.py): `backend/yt_downloader.py`
- [Audio transcription](https://github.com/yashmagar01/getreel/blob/main/backend/transcriber.py): `backend/transcriber.py`
- [Frame extraction](https://github.com/yashmagar01/getreel/blob/main/backend/frame_extractor.py): `backend/frame_extractor.py`
- [Multimodal analysis](https://github.com/yashmagar01/getreel/blob/main/backend/analyzer.py): `backend/analyzer.py`
- [Content classification](https://github.com/yashmagar01/getreel/blob/main/backend/content_classifier.py): `backend/content_classifier.py`
- [Content strategies](https://github.com/yashmagar01/getreel/blob/main/backend/content_strategies.py): `backend/content_strategies.py`
- [Guide generation](https://github.com/yashmagar01/getreel/blob/main/backend/roadmap_generator.py): `backend/roadmap_generator.py`
- [Promised-link resolver](https://github.com/yashmagar01/getreel/blob/main/backend/link_finder.py): `backend/link_finder.py`

### State and sharing

- [Result cache](https://github.com/yashmagar01/getreel/blob/main/backend/cache.py): `backend/cache.py`
- [Capsule store](https://github.com/yashmagar01/getreel/blob/main/backend/capsule_store.py): `backend/capsule_store.py`
- [Job state](https://github.com/yashmagar01/getreel/blob/main/backend/job_store.py): `backend/job_store.py`
- [Download tokens](https://github.com/yashmagar01/getreel/blob/main/backend/main.py): `backend/main.py`

### External services

- [Model providers](https://github.com/yashmagar01/getreel/blob/main/backend/providers.py): `backend/providers.py`
- **Instagram / oEmbed**
- **YouTube**
- **Groq models**
- **Web search**

### Other components

- **Visitor**

## Connections

- Visitor → Submit and results: submits URL
- Submit and results → API client: requests analysis
- API client → FastAPI pipeline: starts job
- FastAPI pipeline → API client: streams progress
- API client → Preview and progress: updates preview
- Submit and results → Guide display: renders result
- FastAPI pipeline → Instagram metadata: fetches metadata
- Instagram metadata → Instagram / oEmbed: requests oEmbed
- FastAPI pipeline → Media download: downloads Reel
- Media download → Instagram / oEmbed: fetches media
- FastAPI pipeline → YouTube download: downloads YouTube
- YouTube download → YouTube: fetches media
- FastAPI pipeline → Audio transcription: transcribes audio
- FastAPI pipeline → Frame extraction: extracts frames
- FastAPI pipeline → Multimodal analysis: analyzes media
- FastAPI pipeline → Content classification: classifies content
- FastAPI pipeline → Content strategies: generates matching output
- FastAPI pipeline → Guide generation: generates guide
- FastAPI pipeline → Promised-link resolver: resolves promised link
- Multimodal analysis → Model providers: uses models
- Content classification → Model providers: uses models
- Content strategies → Model providers: uses models
- Model providers → Groq models: calls models
- Promised-link resolver → Web search: searches resources
- FastAPI pipeline → Result cache: reads and writes
- FastAPI pipeline → Job state: tracks job
- FastAPI pipeline → Capsule store: stores shared result
- Shared capsule view → FastAPI pipeline: fetches capsule
- FastAPI pipeline → Shared capsule view: returns capsule data
- FastAPI pipeline → Download tokens: issues download token
- Visitor → Shared capsule view: opens shared result
