# bhuma005/reelmob architecture

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

- Interactive diagram: https://gitdiagram.com/bhuma005/reelmob
- Repository: https://github.com/bhuma005/reelmob

## Overview

ReelsMob is a web studio for analyzing videos, generating Shorts metadata, editing vertical video, and publishing or scheduling content. The main user flow runs from the React dashboard into the FastAPI backend, through video analysis and AI metadata generation, then toward editing and YouTube publishing. Separate branches cover analytics, scheduling, and cloud upload workflows. The excerpts show key calls and imports, but not all page/API wiring or backend routes, so some UI-to-backend links are marked unverified.

Main entry points: [`frontend-react/src/App.jsx`](https://github.com/bhuma005/reelmob/blob/main/frontend-react/src/App.jsx) (React app), [`backend/services/analysis_service.py`](https://github.com/bhuma005/reelmob/blob/main/backend/services/analysis_service.py) (Analysis jobs), [`frontend-react/src/api/client.js`](https://github.com/bhuma005/reelmob/blob/main/frontend-react/src/api/client.js) (API client), [`backend/services/cloud_ai.py`](https://github.com/bhuma005/reelmob/blob/main/backend/services/cloud_ai.py) (Metadata generation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web studio"]
  node_app["React app<br/>[App.jsx]"]
  node_create["Create reel<br/>[CreateReelPage.jsx]"]
  node_library["Video library<br/>[LibraryPage.jsx]"]
  node_analytics_ui["Analytics UI<br/>[AnalyticsPage.jsx]"]
  node_scheduler_ui["Scheduler UI<br/>[SchedulerPage.jsx]"]
  node_api_client["API client<br/>[client.js]"]
end

subgraph group_api["Backend API"]
  node_api_server["FastAPI server<br/>[main.py]"]
end

subgraph group_analysis["Analysis and AI"]
  node_analysis_service["Analysis jobs"]
  node_video_analyzer["Video analysis<br/>[video_analyzer.py]"]
  node_metadata["Metadata generation<br/>[cloud_ai.py]"]
  node_llm["LLM client<br/>[llm.py]"]
  node_agent_flow["Agent workflow<br/>[master_agent.py]"]
  node_ai_pipeline["Shorts metadata pipeline<br/>[ai_pipeline.py]"]
end

subgraph group_media["Video and publishing"]
  node_video_download["Video download<br/>[video_download.py]"]
  node_video_editor["Video editing<br/>[video_editor.py]"]
  node_canvas["Canvas formatting<br/>[fit_to_canvas.py]"]
  node_posting["Posting engine<br/>[posting_engine.py]"]
  node_scheduler["Schedule service<br/>[scheduler.py]"]
  node_cloud_upload["Cloud upload workflow<br/>[workflow_upload.py]"]
end

subgraph group_integrations["External services"]
  node_auth["Cloud auth<br/>[cloud_auth.py]"]
  node_analytics["Channel analytics<br/>[analytics.py]"]
  node_limits["Resource limits<br/>[resource_limits.py]"]
  node_supabase[("Supabase")]
  node_youtube["YouTube"]
  node_ai_providers["Gemini and Groq"]
end

node_user(("Studio user"))

node_user -->|"uses"| node_app
node_app -->|"routes to"| node_create
node_app -->|"routes to"| node_library
node_app -->|"routes to"| node_analytics_ui
node_app -->|"routes to"| node_scheduler_ui
node_create -.->|"uses API"| node_api_client
node_library -.->|"uses API"| node_api_client
node_analytics_ui -.->|"uses API"| node_api_client
node_scheduler_ui -.->|"uses API"| node_api_client
node_api_client -.->|"HTTP requests"| node_api_server
node_api_server -->|"starts analysis"| node_analysis_service
node_api_server -->|"handles downloads"| node_video_download
node_analysis_service -->|"analyzes video"| node_video_analyzer
node_analysis_service -->|"generates metadata"| node_metadata
node_analysis_service -->|"gets schedule"| node_scheduler
node_analysis_service -->|"invokes agents"| node_agent_flow
node_agent_flow -->|"uses analyzer"| node_video_analyzer
node_ai_pipeline -->|"calls model"| node_llm
node_llm -->|"uses credentials"| node_metadata
node_metadata -->|"calls AI APIs"| node_ai_providers
node_video_analyzer -.->|"uses vision AI"| node_metadata
node_video_editor -->|"formats video"| node_canvas
node_canvas -->|"gets FFmpeg limits"| node_limits
node_posting -->|"reads performance"| node_analytics
node_posting -.->|"selects posting time"| node_scheduler
node_cloud_upload -->|"loads credentials"| node_auth
node_auth -->|"reads OAuth tokens"| node_supabase
node_cloud_upload -.->|"uploads video"| node_youtube
node_auth -->|"refreshes token"| node_youtube

click node_app "https://github.com/bhuma005/reelmob/blob/main/frontend-react/src/App.jsx"
click node_create "https://github.com/bhuma005/reelmob/blob/main/frontend-react/src/pages/CreateReelPage.jsx"
click node_library "https://github.com/bhuma005/reelmob/blob/main/frontend-react/src/pages/LibraryPage.jsx"
click node_analytics_ui "https://github.com/bhuma005/reelmob/blob/main/frontend-react/src/pages/AnalyticsPage.jsx"
click node_scheduler_ui "https://github.com/bhuma005/reelmob/blob/main/frontend-react/src/pages/SchedulerPage.jsx"
click node_api_client "https://github.com/bhuma005/reelmob/blob/main/frontend-react/src/api/client.js"
click node_api_server "https://github.com/bhuma005/reelmob/blob/main/backend/main.py"
click node_analysis_service "https://github.com/bhuma005/reelmob/blob/main/backend/services/analysis_service.py"
click node_video_analyzer "https://github.com/bhuma005/reelmob/blob/main/backend/video_analyzer.py"
click node_metadata "https://github.com/bhuma005/reelmob/blob/main/backend/services/cloud_ai.py"
click node_llm "https://github.com/bhuma005/reelmob/blob/main/backend/agents/llm.py"
click node_agent_flow "https://github.com/bhuma005/reelmob/blob/main/backend/agents/master_agent.py"
click node_ai_pipeline "https://github.com/bhuma005/reelmob/blob/main/backend/ai_pipeline.py"
click node_video_download "https://github.com/bhuma005/reelmob/blob/main/backend/services/video_download.py"
click node_video_editor "https://github.com/bhuma005/reelmob/blob/main/backend/services/video_editor.py"
click node_canvas "https://github.com/bhuma005/reelmob/blob/main/backend/fit_to_canvas.py"
click node_posting "https://github.com/bhuma005/reelmob/blob/main/backend/posting_engine.py"
click node_scheduler "https://github.com/bhuma005/reelmob/blob/main/backend/services/scheduler.py"
click node_cloud_upload "https://github.com/bhuma005/reelmob/blob/main/cloud/workflow_upload.py"
click node_auth "https://github.com/bhuma005/reelmob/blob/main/cloud/cloud_auth.py"
click node_analytics "https://github.com/bhuma005/reelmob/blob/main/backend/analytics.py"
click node_limits "https://github.com/bhuma005/reelmob/blob/main/backend/services/resource_limits.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_app,node_create,node_library,node_analytics_ui,node_scheduler_ui,node_api_client,node_user toneBlue
class node_api_server toneAmber
class node_analysis_service,node_video_analyzer,node_metadata,node_llm,node_agent_flow,node_ai_pipeline toneMint
class node_video_download,node_video_editor,node_canvas,node_posting,node_scheduler,node_cloud_upload toneRose
class node_auth,node_analytics,node_limits,node_supabase,node_youtube,node_ai_providers toneIndigo
```

## Components

### Web studio

- [React app](https://github.com/bhuma005/reelmob/blob/main/frontend-react/src/App.jsx): `frontend-react/src/App.jsx`
- [Create reel](https://github.com/bhuma005/reelmob/blob/main/frontend-react/src/pages/CreateReelPage.jsx): `frontend-react/src/pages/CreateReelPage.jsx`
- [Video library](https://github.com/bhuma005/reelmob/blob/main/frontend-react/src/pages/LibraryPage.jsx): `frontend-react/src/pages/LibraryPage.jsx`
- [Analytics UI](https://github.com/bhuma005/reelmob/blob/main/frontend-react/src/pages/AnalyticsPage.jsx): `frontend-react/src/pages/AnalyticsPage.jsx`
- [Scheduler UI](https://github.com/bhuma005/reelmob/blob/main/frontend-react/src/pages/SchedulerPage.jsx): `frontend-react/src/pages/SchedulerPage.jsx`
- [API client](https://github.com/bhuma005/reelmob/blob/main/frontend-react/src/api/client.js): `frontend-react/src/api/client.js`

### Backend API

- [FastAPI server](https://github.com/bhuma005/reelmob/blob/main/backend/main.py): `backend/main.py`

### Analysis and AI

- [Analysis jobs](https://github.com/bhuma005/reelmob/blob/main/backend/services/analysis_service.py): `backend/services/analysis_service.py`
- [Video analysis](https://github.com/bhuma005/reelmob/blob/main/backend/video_analyzer.py): `backend/video_analyzer.py`
- [Metadata generation](https://github.com/bhuma005/reelmob/blob/main/backend/services/cloud_ai.py): `backend/services/cloud_ai.py`
- [LLM client](https://github.com/bhuma005/reelmob/blob/main/backend/agents/llm.py): `backend/agents/llm.py`
- [Agent workflow](https://github.com/bhuma005/reelmob/blob/main/backend/agents/master_agent.py): `backend/agents/master_agent.py`
- [Shorts metadata pipeline](https://github.com/bhuma005/reelmob/blob/main/backend/ai_pipeline.py): `backend/ai_pipeline.py`

### Video and publishing

- [Video download](https://github.com/bhuma005/reelmob/blob/main/backend/services/video_download.py): `backend/services/video_download.py`
- [Video editing](https://github.com/bhuma005/reelmob/blob/main/backend/services/video_editor.py): `backend/services/video_editor.py`
- [Canvas formatting](https://github.com/bhuma005/reelmob/blob/main/backend/fit_to_canvas.py): `backend/fit_to_canvas.py`
- [Posting engine](https://github.com/bhuma005/reelmob/blob/main/backend/posting_engine.py): `backend/posting_engine.py`
- [Schedule service](https://github.com/bhuma005/reelmob/blob/main/backend/services/scheduler.py): `backend/services/scheduler.py`
- [Cloud upload workflow](https://github.com/bhuma005/reelmob/blob/main/cloud/workflow_upload.py): `cloud/workflow_upload.py`

### External services

- [Cloud auth](https://github.com/bhuma005/reelmob/blob/main/cloud/cloud_auth.py): `cloud/cloud_auth.py`
- [Channel analytics](https://github.com/bhuma005/reelmob/blob/main/backend/analytics.py): `backend/analytics.py`
- [Resource limits](https://github.com/bhuma005/reelmob/blob/main/backend/services/resource_limits.py): `backend/services/resource_limits.py`
- **Supabase**
- **YouTube**
- **Gemini and Groq**

### Other components

- **Studio user**

## Connections

- Studio user → React app: uses (evidence: `README.md`)
- React app → Create reel: routes to (evidence: `frontend-react/src/App.jsx`)
- React app → Video library: routes to (evidence: `frontend-react/src/App.jsx`)
- React app → Analytics UI: routes to (evidence: `frontend-react/src/App.jsx`)
- React app → Scheduler UI: routes to (evidence: `frontend-react/src/App.jsx`)
- Create reel → API client: uses API
- Video library → API client: uses API
- Analytics UI → API client: uses API
- Scheduler UI → API client: uses API
- API client → FastAPI server: HTTP requests
- FastAPI server → Analysis jobs: starts analysis (evidence: `backend/main.py`)
- FastAPI server → Video download: handles downloads (evidence: `backend/main.py`)
- Analysis jobs → Video analysis: analyzes video (evidence: `backend/services/analysis_service.py`)
- Analysis jobs → Metadata generation: generates metadata (evidence: `backend/services/analysis_service.py`)
- Analysis jobs → Schedule service: gets schedule (evidence: `backend/services/analysis_service.py`)
- Analysis jobs → Agent workflow: invokes agents (evidence: `backend/services/analysis_service.py`)
- Agent workflow → Video analysis: uses analyzer (evidence: `backend/agents/master_agent.py`)
- Shorts metadata pipeline → LLM client: calls model (evidence: `backend/ai_pipeline.py`)
- LLM client → Metadata generation: uses credentials (evidence: `backend/agents/llm.py`)
- Metadata generation → Gemini and Groq: calls AI APIs (evidence: `backend/services/cloud_ai.py`)
- Video analysis → Metadata generation: uses vision AI (evidence: `backend/video_analyzer.py`)
- Video editing → Canvas formatting: formats video (evidence: `backend/services/video_editor.py`)
- Canvas formatting → Resource limits: gets FFmpeg limits (evidence: `backend/fit_to_canvas.py`)
- Posting engine → Channel analytics: reads performance (evidence: `backend/posting_engine.py`)
- Posting engine → Schedule service: selects posting time
- Cloud upload workflow → Cloud auth: loads credentials (evidence: `cloud/workflow_upload.py`)
- Cloud auth → Supabase: reads OAuth tokens (evidence: `cloud/cloud_auth.py`)
- Cloud upload workflow → YouTube: uploads video
- Cloud auth → YouTube: refreshes token (evidence: `cloud/cloud_auth.py`)
