# aman678317/talkflow architecture

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

- Interactive diagram: https://gitdiagram.com/aman678317/talkflow
- Repository: https://github.com/aman678317/talkflow

## Overview

GlobalTalk AI is a multilingual communication platform whose central flow captures speech, creates an immutable source transcript, translates it independently for each listener, and delivers speech or captions. The web app also exposes text translation, writing, documents, meetings, chat, glossaries, and account/usage features. The graph focuses on the documented product and the sampled `services/api` runtime; the repository also contains a separate `apps/api` implementation, so its relationships are not inferred here. Some feature paths are directory-level because their source was not sampled.

Main entry points: [`services/api/app/main.py`](https://github.com/aman678317/talkflow/blob/main/services/api/app/main.py) (API application), [`services/api/app/realtime/pipeline.py`](https://github.com/aman678317/talkflow/blob/main/services/api/app/realtime/pipeline.py) (Realtime audio pipeline), [`apps/web/src/main.tsx`](https://github.com/aman678317/talkflow/blob/main/apps/web/src/main.tsx) (Web application), [`workers/document-worker/main.py`](https://github.com/aman678317/talkflow/blob/main/workers/document-worker/main.py) (Document worker)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_webapp["Web application<br/>[main.tsx]"]
  node_meeting["Live meeting room<br/>[MeetingRoom.tsx]"]
  node_voice["Voice studio<br/>[Voice.tsx]"]
  node_textwrite["Translate and write<br/>[Translate.tsx]"]
end

subgraph group_api["API and product services"]
  node_api["API application<br/>[main.py]"]
  node_realtime["Realtime audio pipeline<br/>[pipeline.py]"]
  node_translation["Translation service"]
  node_documents["Document translation"]
  node_writing["Writing assistant<br/>[write_service.py]"]
  node_chat["Translated chat<br/>[chat_service.py]"]
  node_meetings["Meeting services<br/>[meeting_service.py]"]
end

subgraph group_ai["AI runtime"]
  node_ai["AI provider runtime<br/>[ai.py]"]
  node_router["Model router<br/>[router.py]"]
  node_providers["Speech and language providers"]
end

subgraph group_state["State and integrations"]
  node_db[("Application database<br/>[session.py]")]
  node_storage[("Object storage<br/>[storage.py]")]
  node_queue["Job queue<br/>[queue.py]"]
  node_documentworker["Document worker<br/>[main.py]"]
  node_livekit{{"LiveKit media"}}
end

node_person(("Participants and users"))

node_person -->|"uses"| node_webapp
node_webapp -->|"routes to"| node_meeting
node_webapp -->|"routes to"| node_voice
node_webapp -->|"routes to"| node_textwrite
node_meeting -.->|"streams audio"| node_realtime
node_voice -.->|"streams audio"| node_realtime
node_webapp -->|"calls API"| node_api
node_api -->|"serves realtime"| node_realtime
node_realtime -->|"requests inference"| node_ai
node_ai -->|"routes tasks"| node_router
node_router -->|"selects provider"| node_providers
node_realtime -->|"persists transcripts"| node_db
node_realtime -->|"stores audio"| node_storage
node_realtime -->|"broadcasts events"| node_meetings
node_textwrite -.->|"requests translation"| node_translation
node_api -.->|"routes requests"| node_translation
node_api -.->|"routes jobs"| node_documents
node_api -.->|"routes requests"| node_writing
node_api -.->|"serves chat"| node_chat
node_api -.->|"serves meetings"| node_meetings
node_documents -.->|"enqueues jobs"| node_queue
node_documentworker -->|"consumes jobs"| node_queue
node_documentworker -->|"runs processing"| node_documents
node_documentworker -->|"uses AI"| node_ai
node_documentworker -->|"uses storage"| node_storage
node_meeting -.->|"joins media"| node_livekit

click node_webapp "https://github.com/aman678317/talkflow/blob/main/apps/web/src/main.tsx"
click node_meeting "https://github.com/aman678317/talkflow/blob/main/apps/web/src/pages/MeetingRoom.tsx"
click node_voice "https://github.com/aman678317/talkflow/blob/main/apps/web/src/pages/Voice.tsx"
click node_textwrite "https://github.com/aman678317/talkflow/blob/main/apps/web/src/pages/Translate.tsx"
click node_api "https://github.com/aman678317/talkflow/blob/main/services/api/app/main.py"
click node_realtime "https://github.com/aman678317/talkflow/blob/main/services/api/app/realtime/pipeline.py"
click node_translation "https://github.com/aman678317/talkflow/blob/main/services/api/app/services/translation_service.py"
click node_documents "https://github.com/aman678317/talkflow/blob/main/services/api/app/services/document_service.py"
click node_writing "https://github.com/aman678317/talkflow/blob/main/services/api/app/services/write_service.py"
click node_chat "https://github.com/aman678317/talkflow/blob/main/services/api/app/services/chat_service.py"
click node_meetings "https://github.com/aman678317/talkflow/blob/main/services/api/app/services/meeting_service.py"
click node_ai "https://github.com/aman678317/talkflow/blob/main/services/api/app/ai.py"
click node_router "https://github.com/aman678317/talkflow/blob/main/ai/model_router/router.py"
click node_providers "https://github.com/aman678317/talkflow/tree/main/ai/providers"
click node_db "https://github.com/aman678317/talkflow/blob/main/services/api/app/db/session.py"
click node_storage "https://github.com/aman678317/talkflow/blob/main/services/api/app/storage.py"
click node_queue "https://github.com/aman678317/talkflow/blob/main/services/api/app/queue.py"
click node_documentworker "https://github.com/aman678317/talkflow/blob/main/workers/document-worker/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_webapp,node_meeting,node_voice,node_textwrite,node_person toneBlue
class node_api,node_realtime,node_translation,node_documents,node_writing,node_chat,node_meetings toneAmber
class node_ai,node_router,node_providers toneMint
class node_db,node_storage,node_queue,node_documentworker,node_livekit toneRose
```

## Components

### Web experience

- [Web application](https://github.com/aman678317/talkflow/blob/main/apps/web/src/main.tsx): `apps/web/src/main.tsx`
- [Live meeting room](https://github.com/aman678317/talkflow/blob/main/apps/web/src/pages/MeetingRoom.tsx): `apps/web/src/pages/MeetingRoom.tsx`
- [Voice studio](https://github.com/aman678317/talkflow/blob/main/apps/web/src/pages/Voice.tsx): `apps/web/src/pages/Voice.tsx`
- [Translate and write](https://github.com/aman678317/talkflow/blob/main/apps/web/src/pages/Translate.tsx): `apps/web/src/pages/Translate.tsx`

### API and product services

- [API application](https://github.com/aman678317/talkflow/blob/main/services/api/app/main.py): `services/api/app/main.py`
- [Realtime audio pipeline](https://github.com/aman678317/talkflow/blob/main/services/api/app/realtime/pipeline.py): `services/api/app/realtime/pipeline.py`
- [Translation service](https://github.com/aman678317/talkflow/blob/main/services/api/app/services/translation_service.py): `services/api/app/services/translation_service.py`
- [Document translation](https://github.com/aman678317/talkflow/blob/main/services/api/app/services/document_service.py): `services/api/app/services/document_service.py`
- [Writing assistant](https://github.com/aman678317/talkflow/blob/main/services/api/app/services/write_service.py): `services/api/app/services/write_service.py`
- [Translated chat](https://github.com/aman678317/talkflow/blob/main/services/api/app/services/chat_service.py): `services/api/app/services/chat_service.py`
- [Meeting services](https://github.com/aman678317/talkflow/blob/main/services/api/app/services/meeting_service.py): `services/api/app/services/meeting_service.py`

### AI runtime

- [AI provider runtime](https://github.com/aman678317/talkflow/blob/main/services/api/app/ai.py): `services/api/app/ai.py`
- [Model router](https://github.com/aman678317/talkflow/blob/main/ai/model_router/router.py): `ai/model_router/router.py`
- [Speech and language providers](https://github.com/aman678317/talkflow/tree/main/ai/providers): `ai/providers`

### State and integrations

- [Application database](https://github.com/aman678317/talkflow/blob/main/services/api/app/db/session.py): `services/api/app/db/session.py`
- [Object storage](https://github.com/aman678317/talkflow/blob/main/services/api/app/storage.py): `services/api/app/storage.py`
- [Job queue](https://github.com/aman678317/talkflow/blob/main/services/api/app/queue.py): `services/api/app/queue.py`
- [Document worker](https://github.com/aman678317/talkflow/blob/main/workers/document-worker/main.py): `workers/document-worker/main.py`
- **LiveKit media**

### Other components

- **Participants and users**

## Connections

- Participants and users → Web application: uses (evidence: `README.md`)
- Web application → Live meeting room: routes to (evidence: `apps/web/src/main.tsx`)
- Web application → Voice studio: routes to (evidence: `apps/web/src/main.tsx`)
- Web application → Translate and write: routes to (evidence: `apps/web/src/main.tsx`)
- Live meeting room → Realtime audio pipeline: streams audio
- Voice studio → Realtime audio pipeline: streams audio
- Web application → API application: calls API (evidence: `README.md`)
- API application → Realtime audio pipeline: serves realtime
- Realtime audio pipeline → AI provider runtime: requests inference (evidence: `services/api/app/realtime/pipeline.py`)
- AI provider runtime → Model router: routes tasks (evidence: `services/api/app/ai.py`)
- Model router → Speech and language providers: selects provider (evidence: `ai/model_router/router.py`)
- Realtime audio pipeline → Application database: persists transcripts (evidence: `services/api/app/realtime/pipeline.py`)
- Realtime audio pipeline → Object storage: stores audio (evidence: `services/api/app/realtime/pipeline.py`)
- Realtime audio pipeline → Meeting services: broadcasts events (evidence: `services/api/app/realtime/pipeline.py`)
- Translate and write → Translation service: requests translation
- API application → Translation service: routes requests
- API application → Document translation: routes jobs
- API application → Writing assistant: routes requests
- API application → Translated chat: serves chat
- API application → Meeting services: serves meetings
- Document translation → Job queue: enqueues jobs
- Document worker → Job queue: consumes jobs (evidence: `workers/document-worker/main.py`)
- Document worker → Document translation: runs processing (evidence: `workers/document-worker/main.py`)
- Document worker → AI provider runtime: uses AI (evidence: `workers/document-worker/main.py`)
- Document worker → Object storage: uses storage (evidence: `workers/document-worker/main.py`)
- Live meeting room → LiveKit media: joins media
