# root1v/prosodia-media-platform architecture

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

- Interactive diagram: https://gitdiagram.com/root1v/prosodia-media-platform
- Repository: https://github.com/root1v/prosodia-media-platform

## Overview

Prosodia is a self-hosted AI media platform: users create and manage projects in a web dashboard, which submits work through a REST API and background queue; workers run media-processing workflows and store results for later download. The product also offers standalone CLI workflows. The README documents dubbing’s transcription, diarization, contextual translation, voice synthesis, and rendering stages, plus subtitles, transcription, TTS, and micro-video capabilities. Web wiring and several feature implementations are represented at the documented subsystem level because their source was not sampled.

Main entry points: [`src/video_translator/web/tasks/run_project.py`](https://github.com/root1v/prosodia-media-platform/blob/main/src/video_translator/web/tasks/run_project.py) (Project worker), [`src/video_translator/application/use_cases/translate_video.py`](https://github.com/root1v/prosodia-media-platform/blob/main/src/video_translator/application/use_cases/translate_video.py) (Video translation), [`src/video_translator/web/services/storage.py`](https://github.com/root1v/prosodia-media-platform/blob/main/src/video_translator/web/services/storage.py) (Media storage), [`src/video_translator/application/use_cases/synthesize_text.py`](https://github.com/root1v/prosodia-media-platform/blob/main/src/video_translator/application/use_cases/synthesize_text.py) (Speech synthesis)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_dashboard["Web dashboard"]
  node_frontend["Dashboard app<br/>[App.tsx]"]
  node_project_pages["Project pages"]
  node_api_client["API client<br/>[client.ts]"]
end

subgraph group_web["Web services"]
  node_auth["Authentication<br/>[auth.py]"]
  node_project_api["Project API<br/>[projects.py]"]
  node_feature_apis["Feature APIs"]
  node_job_queue["Job queue<br/>[celery_app.py]"]
  node_worker["Project worker<br/>[run_project.py]"]
  node_project_store[("Project database")]
  node_media_storage["Media storage<br/>[storage.py]"]
end

subgraph group_workflows["Media workflows"]
  node_cli["CLI entry<br/>[cli.py]"]
  node_transcription["Transcription"]
  node_translation["Video translation<br/>[translate_video.py]"]
  node_synthesis["Speech synthesis<br/>[synthesize_text.py]"]
  node_micro_video["Micro-video generation"]
end

subgraph group_engines["Processing engines"]
  node_media_processor["Media processing"]
  node_transcriber["Whisper engines"]
  node_diarizer["Diarization"]
  node_tts_engines["TTS engines"]
end

node_user(("User"))
node_local_llm["Local LLM"]
node_postgres[("Postgres")]
node_redis["Redis"]
node_user_media["Source media"]
node_artifacts["Project artifacts"]

node_user -->|"uses"| node_frontend
node_frontend -->|"routes to"| node_project_pages
node_project_pages -->|"requests"| node_api_client
node_api_client -->|"authenticates"| node_auth
node_api_client -->|"submits projects"| node_project_api
node_api_client -->|"calls features"| node_feature_apis
node_project_api -->|"reads and writes"| node_project_store
node_auth -->|"reads and writes"| node_project_store
node_feature_apis -->|"uses project data"| node_project_store
node_project_api -->|"dispatches jobs"| node_job_queue
node_job_queue -->|"queues tasks"| node_redis
node_worker -->|"consumes tasks"| node_job_queue
node_worker -->|"runs workflow"| node_transcription
node_worker -->|"runs workflow"| node_translation
node_worker -->|"runs workflow"| node_synthesis
node_worker -->|"runs workflow"| node_micro_video
node_worker -->|"reads inputs"| node_media_storage
node_media_storage -->|"stores uploads"| node_user_media
node_worker -->|"stores outputs"| node_media_storage
node_media_storage -->|"writes files"| node_artifacts
node_project_api -->|"serves downloads"| node_media_storage
node_cli -->|"runs workflow"| node_transcription
node_cli -->|"runs workflow"| node_translation
node_cli -->|"runs workflow"| node_synthesis
node_transcription -->|"transcribes audio"| node_transcriber
node_translation -->|"detects speakers"| node_diarizer
node_translation -->|"translates contextually"| node_local_llm
node_translation -->|"requests dubbed speech"| node_synthesis
node_synthesis -->|"synthesizes speech"| node_tts_engines
node_transcription -->|"extracts media"| node_media_processor
node_translation -->|"renders video"| node_media_processor
node_micro_video -->|"processes media"| node_media_processor
node_synthesis -->|"mixes audio"| node_media_processor
node_project_store -->|"persists data"| node_postgres
node_user -.->|"runs locally"| node_cli

click node_frontend "https://github.com/root1v/prosodia-media-platform/blob/main/frontend/src/App.tsx"
click node_project_pages "https://github.com/root1v/prosodia-media-platform/tree/main/frontend/src/pages"
click node_api_client "https://github.com/root1v/prosodia-media-platform/blob/main/frontend/src/api/client.ts"
click node_auth "https://github.com/root1v/prosodia-media-platform/blob/main/src/video_translator/web/routers/auth.py"
click node_project_api "https://github.com/root1v/prosodia-media-platform/blob/main/src/video_translator/web/routers/projects.py"
click node_feature_apis "https://github.com/root1v/prosodia-media-platform/tree/main/src/video_translator/web/routers"
click node_job_queue "https://github.com/root1v/prosodia-media-platform/blob/main/src/video_translator/web/tasks/celery_app.py"
click node_worker "https://github.com/root1v/prosodia-media-platform/blob/main/src/video_translator/web/tasks/run_project.py"
click node_project_store "https://github.com/root1v/prosodia-media-platform/tree/main/src/video_translator/web/db"
click node_media_storage "https://github.com/root1v/prosodia-media-platform/blob/main/src/video_translator/web/services/storage.py"
click node_cli "https://github.com/root1v/prosodia-media-platform/blob/main/src/video_translator/cli.py"
click node_transcription "https://github.com/root1v/prosodia-media-platform/blob/main/src/video_translator/application/use_cases/transcribe_media.py"
click node_translation "https://github.com/root1v/prosodia-media-platform/blob/main/src/video_translator/application/use_cases/translate_video.py"
click node_synthesis "https://github.com/root1v/prosodia-media-platform/blob/main/src/video_translator/application/use_cases/synthesize_text.py"
click node_micro_video "https://github.com/root1v/prosodia-media-platform/blob/main/src/video_translator/application/use_cases/generate_micro_video.py"
click node_media_processor "https://github.com/root1v/prosodia-media-platform/blob/main/src/video_translator/infrastructure/media/ffmpeg_processor.py"
click node_transcriber "https://github.com/root1v/prosodia-media-platform/tree/main/src/video_translator/infrastructure/transcription"
click node_diarizer "https://github.com/root1v/prosodia-media-platform/tree/main/src/video_translator/infrastructure/diarization"
click node_tts_engines "https://github.com/root1v/prosodia-media-platform/tree/main/src/video_translator/infrastructure/synthesis"

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,node_project_pages,node_api_client,node_user toneBlue
class node_auth,node_project_api,node_feature_apis,node_job_queue,node_worker,node_project_store,node_media_storage,node_postgres,node_redis toneAmber
class node_cli,node_transcription,node_translation,node_synthesis,node_micro_video toneMint
class node_media_processor,node_transcriber,node_diarizer,node_tts_engines toneRose
class node_local_llm,node_user_media,node_artifacts toneIndigo
```

## Components

### Web dashboard

- [Dashboard app](https://github.com/root1v/prosodia-media-platform/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Project pages](https://github.com/root1v/prosodia-media-platform/tree/main/frontend/src/pages): `frontend/src/pages`
- [API client](https://github.com/root1v/prosodia-media-platform/blob/main/frontend/src/api/client.ts): `frontend/src/api/client.ts`

### Web services

- [Authentication](https://github.com/root1v/prosodia-media-platform/blob/main/src/video_translator/web/routers/auth.py): `src/video_translator/web/routers/auth.py`
- [Project API](https://github.com/root1v/prosodia-media-platform/blob/main/src/video_translator/web/routers/projects.py): `src/video_translator/web/routers/projects.py`
- [Feature APIs](https://github.com/root1v/prosodia-media-platform/tree/main/src/video_translator/web/routers): `src/video_translator/web/routers`
- [Job queue](https://github.com/root1v/prosodia-media-platform/blob/main/src/video_translator/web/tasks/celery_app.py): `src/video_translator/web/tasks/celery_app.py`
- [Project worker](https://github.com/root1v/prosodia-media-platform/blob/main/src/video_translator/web/tasks/run_project.py): `src/video_translator/web/tasks/run_project.py`
- [Project database](https://github.com/root1v/prosodia-media-platform/tree/main/src/video_translator/web/db): `src/video_translator/web/db`
- [Media storage](https://github.com/root1v/prosodia-media-platform/blob/main/src/video_translator/web/services/storage.py): `src/video_translator/web/services/storage.py`

### Media workflows

- [CLI entry](https://github.com/root1v/prosodia-media-platform/blob/main/src/video_translator/cli.py): `src/video_translator/cli.py`
- [Transcription](https://github.com/root1v/prosodia-media-platform/blob/main/src/video_translator/application/use_cases/transcribe_media.py): `src/video_translator/application/use_cases/transcribe_media.py`
- [Video translation](https://github.com/root1v/prosodia-media-platform/blob/main/src/video_translator/application/use_cases/translate_video.py): `src/video_translator/application/use_cases/translate_video.py`
- [Speech synthesis](https://github.com/root1v/prosodia-media-platform/blob/main/src/video_translator/application/use_cases/synthesize_text.py): `src/video_translator/application/use_cases/synthesize_text.py`
- [Micro-video generation](https://github.com/root1v/prosodia-media-platform/blob/main/src/video_translator/application/use_cases/generate_micro_video.py): `src/video_translator/application/use_cases/generate_micro_video.py`

### Processing engines

- [Media processing](https://github.com/root1v/prosodia-media-platform/blob/main/src/video_translator/infrastructure/media/ffmpeg_processor.py): `src/video_translator/infrastructure/media/ffmpeg_processor.py`
- [Whisper engines](https://github.com/root1v/prosodia-media-platform/tree/main/src/video_translator/infrastructure/transcription): `src/video_translator/infrastructure/transcription`
- [Diarization](https://github.com/root1v/prosodia-media-platform/tree/main/src/video_translator/infrastructure/diarization): `src/video_translator/infrastructure/diarization`
- [TTS engines](https://github.com/root1v/prosodia-media-platform/tree/main/src/video_translator/infrastructure/synthesis): `src/video_translator/infrastructure/synthesis`

### Other components

- **User**
- **Local LLM**
- **Postgres**
- **Redis**
- **Source media**
- **Project artifacts**

## Connections

- User → Dashboard app: uses
- Dashboard app → Project pages: routes to
- Project pages → API client: requests
- API client → Authentication: authenticates
- API client → Project API: submits projects
- API client → Feature APIs: calls features
- Project API → Project database: reads and writes
- Authentication → Project database: reads and writes
- Feature APIs → Project database: uses project data
- Project API → Job queue: dispatches jobs
- Job queue → Redis: queues tasks
- Project worker → Job queue: consumes tasks
- Project worker → Transcription: runs workflow
- Project worker → Video translation: runs workflow
- Project worker → Speech synthesis: runs workflow
- Project worker → Micro-video generation: runs workflow
- Project worker → Media storage: reads inputs
- Media storage → Source media: stores uploads
- Project worker → Media storage: stores outputs
- Media storage → Project artifacts: writes files
- Project API → Media storage: serves downloads
- CLI entry → Transcription: runs workflow
- CLI entry → Video translation: runs workflow
- CLI entry → Speech synthesis: runs workflow
- Transcription → Whisper engines: transcribes audio
- Video translation → Diarization: detects speakers
- Video translation → Local LLM: translates contextually
- Video translation → Speech synthesis: requests dubbed speech
- Speech synthesis → TTS engines: synthesizes speech
- Transcription → Media processing: extracts media
- Video translation → Media processing: renders video
- Micro-video generation → Media processing: processes media
- Speech synthesis → Media processing: mixes audio
- Project database → Postgres: persists data
- User → CLI entry: runs locally
