# akash4406pal/gitvideo architecture

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

- Interactive diagram: https://gitdiagram.com/akash4406pal/gitvideo
- Repository: https://github.com/akash4406pal/gitvideo

## Overview

GitVideo is an AI codebase-to-video product with a web studio and a backend generation engine. The main workflow accepts a repository, ingests and analyzes it into a verified skeleton, generates a storyboard and architecture blueprint, synthesizes narration, and renders a walkthrough video. The graph also preserves the documented storyboard-review, export, authentication, quota, blueprint, and repository-chat capabilities. Backend flow is supported by the CLI entrypoint; frontend-to-backend API relationships are limited to the shown pipeline request and documented capabilities.

Main entry points: [`backend/src/index.ts`](https://github.com/akash4406pal/gitvideo/blob/main/backend/src/index.ts) (Generation orchestrator), [`frontend/src/3_hooks/usePipeline.ts`](https://github.com/akash4406pal/gitvideo/blob/main/frontend/src/3_hooks/usePipeline.ts) (Pipeline controller), [`frontend/src/4_components`](https://github.com/akash4406pal/gitvideo/tree/main/frontend/src/4_components) (Review & explore), [`frontend/src/app/StudioClientApp.tsx`](https://github.com/akash4406pal/gitvideo/blob/main/frontend/src/app/StudioClientApp.tsx) (Studio application)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_studio["Web Studio"]
  node_studio_app["Studio application"]
  node_pipeline_hook["Pipeline controller<br/>[usePipeline.ts]"]
  node_studio_features["Review &amp; explore"]
  node_pipeline_domain["Pipeline data model<br/>[pipeline.ts]"]
end

subgraph group_api["Studio API"]
  node_pipeline_run["Pipeline run API<br/>[route.ts]"]
  node_pipeline_status["Job status API<br/>[route.ts]"]
  node_blueprint_api["Blueprint API<br/>[route.ts]"]
  node_chat_api["Repository chat API<br/>[route.ts]"]
  node_auth_quota["Auth &amp; quota<br/>[quotaService.ts]"]
end

subgraph group_ingestion_analysis["Ingestion &amp; Analysis"]
  node_backend_entry["Generation orchestrator<br/>[index.ts]"]
  node_repo_ingest["Repository ingestion<br/>[cloner.ts]"]
  node_skeleton_builder["Skeleton analysis<br/>[skeletonBuilder.ts]"]
  node_analysis_helpers["Filters &amp; extraction"]
  node_skeleton_types["Verified skeleton<br/>[skeleton.ts]"]
end

subgraph group_storyboard["Narrative Generation"]
  node_storyboard_generator["Storyboard generation"]
  node_storyboard_support["Prompt &amp; validation"]
  node_storyboard_types["Storyboard schema<br/>[storyboard.ts]"]
  node_bharatcode{{"BharatCode model"}}
  node_architecture_doc["Architecture blueprint<br/>[architectureDoc.ts]"]
end

subgraph group_synthesis["Audio &amp; Video"]
  node_audio_synthesis["Narration synthesis"]
  node_tts_client["Edge TTS client<br/>[edgeTtsClient.ts]"]
  node_video_renderer["Remotion renderer<br/>[renderVideo.ts]"]
  node_compositions["Video scenes"]
  node_video_output["Walkthrough MP4"]
end

node_user(("Repository contributor"))

node_user -->|"opens studio"| node_studio_app
node_studio_app -->|"uses controller"| node_pipeline_hook
node_studio_app -->|"renders features"| node_studio_features
node_pipeline_hook -->|"uses types"| node_pipeline_domain
node_pipeline_hook -->|"posts job"| node_pipeline_run
node_pipeline_hook -.->|"polls status"| node_pipeline_status
node_studio_features -.->|"requests blueprint"| node_blueprint_api
node_studio_features -.->|"requests answers"| node_chat_api
node_studio_features -.->|"uses account controls"| node_auth_quota
node_user -.->|"submits repository"| node_pipeline_run
node_pipeline_run -.->|"starts generation"| node_backend_entry
node_backend_entry -->|"ingests source"| node_repo_ingest
node_backend_entry -->|"builds skeleton"| node_skeleton_builder
node_skeleton_builder -->|"filters and extracts"| node_analysis_helpers
node_skeleton_builder -->|"reads repository metadata"| node_repo_ingest
node_backend_entry -->|"generates script"| node_storyboard_generator
node_storyboard_generator -->|"requests completion"| node_bharatcode
node_storyboard_generator -->|"uses prompt and checks"| node_storyboard_support
node_backend_entry -->|"writes blueprint"| node_architecture_doc
node_backend_entry -->|"synthesizes narration"| node_audio_synthesis
node_audio_synthesis -->|"synthesizes speech"| node_tts_client
node_backend_entry -->|"renders walkthrough"| node_video_renderer
node_video_renderer -.->|"renders scenes"| node_compositions
node_video_renderer -->|"produces MP4"| node_video_output

click node_studio_app "https://github.com/akash4406pal/gitvideo/blob/main/frontend/src/app/StudioClientApp.tsx"
click node_pipeline_hook "https://github.com/akash4406pal/gitvideo/blob/main/frontend/src/3_hooks/usePipeline.ts"
click node_studio_features "https://github.com/akash4406pal/gitvideo/tree/main/frontend/src/4_components"
click node_pipeline_domain "https://github.com/akash4406pal/gitvideo/blob/main/frontend/src/1_domain/pipeline.ts"
click node_pipeline_run "https://github.com/akash4406pal/gitvideo/blob/main/frontend/src/app/api/pipeline/run/route.ts"
click node_pipeline_status "https://github.com/akash4406pal/gitvideo/blob/main/frontend/src/app/api/pipeline/status/route.ts"
click node_blueprint_api "https://github.com/akash4406pal/gitvideo/blob/main/frontend/src/app/api/repo/blueprint/route.ts"
click node_chat_api "https://github.com/akash4406pal/gitvideo/blob/main/frontend/src/app/api/repo/chat/route.ts"
click node_auth_quota "https://github.com/akash4406pal/gitvideo/blob/main/frontend/src/5_shared/security/quotaService.ts"
click node_backend_entry "https://github.com/akash4406pal/gitvideo/blob/main/backend/src/index.ts"
click node_repo_ingest "https://github.com/akash4406pal/gitvideo/blob/main/backend/src/ingest/cloner.ts"
click node_skeleton_builder "https://github.com/akash4406pal/gitvideo/blob/main/backend/src/analyzer/skeletonBuilder.ts"
click node_analysis_helpers "https://github.com/akash4406pal/gitvideo/tree/main/backend/src/analyzer"
click node_skeleton_types "https://github.com/akash4406pal/gitvideo/blob/main/backend/src/types/skeleton.ts"
click node_storyboard_generator "https://github.com/akash4406pal/gitvideo/blob/main/backend/src/storyboard/storyboardGenerator.ts"
click node_storyboard_support "https://github.com/akash4406pal/gitvideo/tree/main/backend/src/storyboard"
click node_storyboard_types "https://github.com/akash4406pal/gitvideo/blob/main/backend/src/types/storyboard.ts"
click node_architecture_doc "https://github.com/akash4406pal/gitvideo/blob/main/backend/src/analyzer/architectureDoc.ts"
click node_audio_synthesis "https://github.com/akash4406pal/gitvideo/blob/main/backend/src/tts/audioSynthesizer.ts"
click node_tts_client "https://github.com/akash4406pal/gitvideo/blob/main/backend/src/tts/edgeTtsClient.ts"
click node_video_renderer "https://github.com/akash4406pal/gitvideo/blob/main/backend/src/remotion/renderVideo.ts"
click node_compositions "https://github.com/akash4406pal/gitvideo/tree/main/backend/src/remotion"

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_studio_app,node_pipeline_hook,node_studio_features,node_pipeline_domain toneBlue
class node_pipeline_run,node_pipeline_status,node_blueprint_api,node_chat_api,node_auth_quota toneAmber
class node_backend_entry,node_repo_ingest,node_skeleton_builder,node_analysis_helpers,node_skeleton_types toneMint
class node_storyboard_generator,node_storyboard_support,node_storyboard_types,node_bharatcode,node_architecture_doc toneRose
class node_audio_synthesis,node_tts_client,node_video_renderer,node_compositions,node_video_output,node_user toneIndigo
```

## Components

### Web Studio

- [Studio application](https://github.com/akash4406pal/gitvideo/blob/main/frontend/src/app/StudioClientApp.tsx): `frontend/src/app/StudioClientApp.tsx`
- [Pipeline controller](https://github.com/akash4406pal/gitvideo/blob/main/frontend/src/3_hooks/usePipeline.ts): `frontend/src/3_hooks/usePipeline.ts`
- [Review & explore](https://github.com/akash4406pal/gitvideo/tree/main/frontend/src/4_components): `frontend/src/4_components`
- [Pipeline data model](https://github.com/akash4406pal/gitvideo/blob/main/frontend/src/1_domain/pipeline.ts): `frontend/src/1_domain/pipeline.ts`

### Studio API

- [Pipeline run API](https://github.com/akash4406pal/gitvideo/blob/main/frontend/src/app/api/pipeline/run/route.ts): `frontend/src/app/api/pipeline/run/route.ts`
- [Job status API](https://github.com/akash4406pal/gitvideo/blob/main/frontend/src/app/api/pipeline/status/route.ts): `frontend/src/app/api/pipeline/status/route.ts`
- [Blueprint API](https://github.com/akash4406pal/gitvideo/blob/main/frontend/src/app/api/repo/blueprint/route.ts): `frontend/src/app/api/repo/blueprint/route.ts`
- [Repository chat API](https://github.com/akash4406pal/gitvideo/blob/main/frontend/src/app/api/repo/chat/route.ts): `frontend/src/app/api/repo/chat/route.ts`
- [Auth & quota](https://github.com/akash4406pal/gitvideo/blob/main/frontend/src/5_shared/security/quotaService.ts): `frontend/src/5_shared/security/quotaService.ts`

### Ingestion & Analysis

- [Generation orchestrator](https://github.com/akash4406pal/gitvideo/blob/main/backend/src/index.ts): `backend/src/index.ts`
- [Repository ingestion](https://github.com/akash4406pal/gitvideo/blob/main/backend/src/ingest/cloner.ts): `backend/src/ingest/cloner.ts`
- [Skeleton analysis](https://github.com/akash4406pal/gitvideo/blob/main/backend/src/analyzer/skeletonBuilder.ts): `backend/src/analyzer/skeletonBuilder.ts`
- [Filters & extraction](https://github.com/akash4406pal/gitvideo/tree/main/backend/src/analyzer): `backend/src/analyzer`
- [Verified skeleton](https://github.com/akash4406pal/gitvideo/blob/main/backend/src/types/skeleton.ts): `backend/src/types/skeleton.ts`

### Narrative Generation

- [Storyboard generation](https://github.com/akash4406pal/gitvideo/blob/main/backend/src/storyboard/storyboardGenerator.ts): `backend/src/storyboard/storyboardGenerator.ts`
- [Prompt & validation](https://github.com/akash4406pal/gitvideo/tree/main/backend/src/storyboard): `backend/src/storyboard`
- [Storyboard schema](https://github.com/akash4406pal/gitvideo/blob/main/backend/src/types/storyboard.ts): `backend/src/types/storyboard.ts`
- **BharatCode model**
- [Architecture blueprint](https://github.com/akash4406pal/gitvideo/blob/main/backend/src/analyzer/architectureDoc.ts): `backend/src/analyzer/architectureDoc.ts`

### Audio & Video

- [Narration synthesis](https://github.com/akash4406pal/gitvideo/blob/main/backend/src/tts/audioSynthesizer.ts): `backend/src/tts/audioSynthesizer.ts`
- [Edge TTS client](https://github.com/akash4406pal/gitvideo/blob/main/backend/src/tts/edgeTtsClient.ts): `backend/src/tts/edgeTtsClient.ts`
- [Remotion renderer](https://github.com/akash4406pal/gitvideo/blob/main/backend/src/remotion/renderVideo.ts): `backend/src/remotion/renderVideo.ts`
- [Video scenes](https://github.com/akash4406pal/gitvideo/tree/main/backend/src/remotion): `backend/src/remotion`
- **Walkthrough MP4**

### Other components

- **Repository contributor**

## Connections

- Repository contributor → Studio application: opens studio (evidence: `README.md`)
- Studio application → Pipeline controller: uses controller (evidence: `frontend/src/app/StudioClientApp.tsx`)
- Studio application → Review & explore: renders features (evidence: `frontend/src/app/StudioClientApp.tsx`)
- Pipeline controller → Pipeline data model: uses types (evidence: `frontend/src/3_hooks/usePipeline.ts`)
- Pipeline controller → Pipeline run API: posts job (evidence: `frontend/src/3_hooks/usePipeline.ts`)
- Pipeline controller → Job status API: polls status
- Review & explore → Blueprint API: requests blueprint
- Review & explore → Repository chat API: requests answers
- Review & explore → Auth & quota: uses account controls
- Repository contributor → Pipeline run API: submits repository
- Pipeline run API → Generation orchestrator: starts generation
- Generation orchestrator → Repository ingestion: ingests source (evidence: `backend/src/index.ts`)
- Generation orchestrator → Skeleton analysis: builds skeleton (evidence: `backend/src/index.ts`)
- Skeleton analysis → Filters & extraction: filters and extracts (evidence: `backend/src/analyzer/skeletonBuilder.ts`)
- Skeleton analysis → Repository ingestion: reads repository metadata (evidence: `backend/src/analyzer/skeletonBuilder.ts`)
- Generation orchestrator → Storyboard generation: generates script (evidence: `backend/src/index.ts`)
- Storyboard generation → BharatCode model: requests completion
- Storyboard generation → Prompt & validation: uses prompt and checks (evidence: `backend/src/storyboard/storyboardGenerator.ts`)
- Generation orchestrator → Architecture blueprint: writes blueprint (evidence: `backend/src/index.ts`)
- Generation orchestrator → Narration synthesis: synthesizes narration (evidence: `backend/src/index.ts`)
- Narration synthesis → Edge TTS client: synthesizes speech (evidence: `backend/src/tts/audioSynthesizer.ts`)
- Generation orchestrator → Remotion renderer: renders walkthrough (evidence: `backend/src/index.ts`)
- Remotion renderer → Video scenes: renders scenes
- Remotion renderer → Walkthrough MP4: produces MP4 (evidence: `backend/src/remotion/renderVideo.ts`)
