# abhishek10600/ai-video-generation-application architecture

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

- Interactive diagram: https://gitdiagram.com/abhishek10600/ai-video-generation-application
- Repository: https://github.com/abhishek10600/ai-video-generation-application

## Overview

This is a text-to-video generation web application. A user configures a prompt and generation options in the frontend, submits them through its API client, and the backend validates the request before asking Higgsfield to generate a video; the returned URL is shown for playback or download. The graph covers the principal flow and the frontend rendering/API and backend routing/validation layers. The frontend-to-backend HTTP connection is dashed because the API base URL configuration is not shown.

Main entry points: [`frontend/src/components/VideoGenerator.tsx`](https://github.com/abhishek10600/ai-video-generation-application/blob/main/frontend/src/components/VideoGenerator.tsx) (Generator UI), [`backend/src/controllers/video.controller.ts`](https://github.com/abhishek10600/ai-video-generation-application/blob/main/backend/src/controllers/video.controller.ts) (Video controller), [`backend/src/services/higgsfield.video.service.ts`](https://github.com/abhishek10600/ai-video-generation-application/blob/main/backend/src/services/higgsfield.video.service.ts) (Higgsfield service), [`frontend/src/api/video.api.ts`](https://github.com/abhishek10600/ai-video-generation-application/blob/main/frontend/src/api/video.api.ts) (Video API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Frontend"]
  node_frontend_app["App shell<br/>[App.tsx]"]
  node_generator["Generator UI<br/>[VideoGenerator.tsx]"]
  node_frontend_types["Request types<br/>[video.type.ts]"]
  node_api_client["Video API client<br/>[video.api.ts]"]
end

subgraph group_backend["Backend"]
  node_server_entry["Server entry<br/>[main.ts]"]
  node_app["Express app<br/>[app.ts]"]
  node_video_route["Video route<br/>[video.route.ts]"]
  node_controller["Video controller"]
  node_validator["Input validator<br/>[video.validator.ts]"]
end

subgraph group_generation["Video generation"]
  node_backend_types["Generation types<br/>[video.type.ts]"]
  node_generation_service["Higgsfield service"]
  node_video_result["Generated video"]
end

subgraph group_external["External services"]
  node_higgsfield{{"Higgsfield API"}}
end

node_user(("User"))

node_user -->|"configures"| node_generator
node_frontend_app -->|"renders"| node_generator
node_generator -->|"uses types"| node_frontend_types
node_generator -->|"submits request"| node_api_client
node_api_client -->|"uses types"| node_frontend_types
node_api_client -.->|"sends HTTP request"| node_video_route
node_server_entry -->|"starts"| node_app
node_app -->|"mounts"| node_video_route
node_video_route -->|"dispatches"| node_controller
node_controller -->|"validates with"| node_validator
node_controller -->|"requests generation"| node_generation_service
node_generation_service -->|"uses types"| node_backend_types
node_generation_service -->|"submits generation"| node_higgsfield
node_generation_service -->|"returns URL"| node_video_result
node_controller -.->|"returns response"| node_generator
node_generator -->|"previews or downloads"| node_video_result

click node_frontend_app "https://github.com/abhishek10600/ai-video-generation-application/blob/main/frontend/src/App.tsx"
click node_generator "https://github.com/abhishek10600/ai-video-generation-application/blob/main/frontend/src/components/VideoGenerator.tsx"
click node_frontend_types "https://github.com/abhishek10600/ai-video-generation-application/blob/main/frontend/src/types/video.type.ts"
click node_api_client "https://github.com/abhishek10600/ai-video-generation-application/blob/main/frontend/src/api/video.api.ts"
click node_server_entry "https://github.com/abhishek10600/ai-video-generation-application/blob/main/backend/src/main.ts"
click node_app "https://github.com/abhishek10600/ai-video-generation-application/blob/main/backend/src/app.ts"
click node_video_route "https://github.com/abhishek10600/ai-video-generation-application/blob/main/backend/src/routes/video.route.ts"
click node_controller "https://github.com/abhishek10600/ai-video-generation-application/blob/main/backend/src/controllers/video.controller.ts"
click node_validator "https://github.com/abhishek10600/ai-video-generation-application/blob/main/backend/src/validators/video.validator.ts"
click node_backend_types "https://github.com/abhishek10600/ai-video-generation-application/blob/main/backend/src/types/video.type.ts"
click node_generation_service "https://github.com/abhishek10600/ai-video-generation-application/blob/main/backend/src/services/higgsfield.video.service.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_frontend_app,node_generator,node_frontend_types,node_api_client,node_user toneBlue
class node_server_entry,node_app,node_video_route,node_controller,node_validator toneAmber
class node_backend_types,node_generation_service,node_video_result toneMint
class node_higgsfield toneRose
```

## Components

### Frontend

- [App shell](https://github.com/abhishek10600/ai-video-generation-application/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Generator UI](https://github.com/abhishek10600/ai-video-generation-application/blob/main/frontend/src/components/VideoGenerator.tsx): `frontend/src/components/VideoGenerator.tsx`
- [Request types](https://github.com/abhishek10600/ai-video-generation-application/blob/main/frontend/src/types/video.type.ts): `frontend/src/types/video.type.ts`
- [Video API client](https://github.com/abhishek10600/ai-video-generation-application/blob/main/frontend/src/api/video.api.ts): `frontend/src/api/video.api.ts`

### Backend

- [Server entry](https://github.com/abhishek10600/ai-video-generation-application/blob/main/backend/src/main.ts): `backend/src/main.ts`
- [Express app](https://github.com/abhishek10600/ai-video-generation-application/blob/main/backend/src/app.ts): `backend/src/app.ts`
- [Video route](https://github.com/abhishek10600/ai-video-generation-application/blob/main/backend/src/routes/video.route.ts): `backend/src/routes/video.route.ts`
- [Video controller](https://github.com/abhishek10600/ai-video-generation-application/blob/main/backend/src/controllers/video.controller.ts): `backend/src/controllers/video.controller.ts`
- [Input validator](https://github.com/abhishek10600/ai-video-generation-application/blob/main/backend/src/validators/video.validator.ts): `backend/src/validators/video.validator.ts`

### Video generation

- [Generation types](https://github.com/abhishek10600/ai-video-generation-application/blob/main/backend/src/types/video.type.ts): `backend/src/types/video.type.ts`
- [Higgsfield service](https://github.com/abhishek10600/ai-video-generation-application/blob/main/backend/src/services/higgsfield.video.service.ts): `backend/src/services/higgsfield.video.service.ts`
- **Generated video**

### External services

- **Higgsfield API**

### Other components

- **User**

## Connections

- User → Generator UI: configures (evidence: `frontend/src/components/VideoGenerator.tsx`)
- App shell → Generator UI: renders (evidence: `frontend/src/App.tsx`)
- Generator UI → Request types: uses types (evidence: `frontend/src/components/VideoGenerator.tsx`)
- Generator UI → Video API client: submits request (evidence: `frontend/src/components/VideoGenerator.tsx`)
- Video API client → Request types: uses types (evidence: `frontend/src/api/video.api.ts`)
- Video API client → Video route: sends HTTP request
- Server entry → Express app: starts (evidence: `backend/src/main.ts`)
- Express app → Video route: mounts (evidence: `backend/src/app.ts`)
- Video route → Video controller: dispatches (evidence: `backend/src/routes/video.route.ts`)
- Video controller → Input validator: validates with (evidence: `backend/src/controllers/video.controller.ts`)
- Video controller → Higgsfield service: requests generation (evidence: `backend/src/controllers/video.controller.ts`)
- Higgsfield service → Generation types: uses types (evidence: `backend/src/services/higgsfield.video.service.ts`)
- Higgsfield service → Higgsfield API: submits generation (evidence: `backend/src/services/higgsfield.video.service.ts`)
- Higgsfield service → Generated video: returns URL (evidence: `backend/src/services/higgsfield.video.service.ts`)
- Video controller → Generator UI: returns response
- Generator UI → Generated video: previews or downloads (evidence: `frontend/src/components/VideoGenerator.tsx`)
