# quancut244-jpg/live-business-translator architecture

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

- Interactive diagram: https://gitdiagram.com/quancut244-jpg/live-business-translator
- Repository: https://github.com/quancut244-jpg/live-business-translator

## Overview

This is a Vietnamese–English live business-meeting translator with a React interface and FastAPI backend. In the live workflow, the meeting page captures microphone audio and uses a socket service to exchange audio and transcript events with backend routes; backend processing validates audio, transcribes it, translates text, and can synthesize spoken output. The interface also presents conversation messages and meeting controls. Source excerpts show frontend component use and backend service imports, but omit key route and socket implementations, so some cross-process links remain unverified.

Main entry points: [`backend/app/main.py`](https://github.com/quancut244-jpg/live-business-translator/blob/main/backend/app/main.py) (HTTP and socket routes), [`UIandUX/src/pages/LiveMeetingPage/LiveMeetingPage.tsx`](https://github.com/quancut244-jpg/live-business-translator/blob/main/UIandUX/src/pages/LiveMeetingPage/LiveMeetingPage.tsx) (Live meeting), [`UIandUX/src/components/conversation/ConversationList.tsx`](https://github.com/quancut244-jpg/live-business-translator/blob/main/UIandUX/src/components/conversation/ConversationList.tsx) (Conversation list), [`backend/speech/speech_pipeline.py`](https://github.com/quancut244-jpg/live-business-translator/blob/main/backend/speech/speech_pipeline.py) (Speech pipeline)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Meeting interface"]
  node_meeting_page["Live meeting"]
  node_app_shell["App shell<br/>[App.tsx]"]
  node_conversation_list["Conversation list"]
  node_message_card["Message card<br/>[MessageCard.tsx]"]
  node_mock_messages["Sample messages<br/>[mockMessages.ts]"]
  node_microphone["Microphone capture<br/>[microphone.ts]"]
  node_live_socket["Live socket<br/>[liveSocket.ts]"]
  node_api_client["API client<br/>[api.ts]"]
end

subgraph group_backend["API processing"]
  node_api_routes["HTTP and socket routes<br/>[main.py]"]
  node_audio_validation["Audio validation<br/>[audio_validator.py]"]
  node_configuration["Backend configuration<br/>[config.py]"]
end

subgraph group_speech["Speech services"]
  node_transcription["Speech recognition<br/>[speech_to_text.py]"]
  node_translation["Text translation"]
  node_speech_output["Speech synthesis<br/>[tts_service.py]"]
  node_speech_pipeline["Speech pipeline<br/>[speech_pipeline.py]"]
end

node_participant(("Meeting participant"))

node_participant -->|"uses"| node_meeting_page
node_app_shell -->|"renders"| node_meeting_page
node_meeting_page -->|"captures audio"| node_microphone
node_meeting_page -->|"exchanges events"| node_live_socket
node_meeting_page -->|"renders"| node_conversation_list
node_conversation_list -->|"renders"| node_message_card
node_conversation_list -->|"loads samples"| node_mock_messages
node_api_client -.->|"HTTP requests"| node_api_routes
node_live_socket -.->|"socket events"| node_api_routes
node_api_routes -->|"validates uploads"| node_audio_validation
node_audio_validation -->|"reads limits"| node_configuration
node_api_routes -->|"transcribes audio"| node_transcription
node_api_routes -->|"translates text"| node_translation
node_api_routes -->|"synthesizes speech"| node_speech_output
node_speech_pipeline -->|"uses translator"| node_translation
node_speech_pipeline -->|"speaks translation"| node_speech_output

click node_meeting_page "https://github.com/quancut244-jpg/live-business-translator/blob/main/UIandUX/src/pages/LiveMeetingPage/LiveMeetingPage.tsx"
click node_app_shell "https://github.com/quancut244-jpg/live-business-translator/blob/main/UIandUX/src/App.tsx"
click node_conversation_list "https://github.com/quancut244-jpg/live-business-translator/blob/main/UIandUX/src/components/conversation/ConversationList.tsx"
click node_message_card "https://github.com/quancut244-jpg/live-business-translator/blob/main/UIandUX/src/components/conversation/MessageCard.tsx"
click node_mock_messages "https://github.com/quancut244-jpg/live-business-translator/blob/main/UIandUX/src/data/mockMessages.ts"
click node_microphone "https://github.com/quancut244-jpg/live-business-translator/blob/main/UIandUX/src/services/microphone.ts"
click node_live_socket "https://github.com/quancut244-jpg/live-business-translator/blob/main/UIandUX/src/services/liveSocket.ts"
click node_api_client "https://github.com/quancut244-jpg/live-business-translator/blob/main/UIandUX/src/services/api.ts"
click node_api_routes "https://github.com/quancut244-jpg/live-business-translator/blob/main/backend/app/main.py"
click node_audio_validation "https://github.com/quancut244-jpg/live-business-translator/blob/main/backend/app/validators/audio_validator.py"
click node_configuration "https://github.com/quancut244-jpg/live-business-translator/blob/main/backend/app/config.py"
click node_transcription "https://github.com/quancut244-jpg/live-business-translator/blob/main/backend/app/services/speech_to_text.py"
click node_translation "https://github.com/quancut244-jpg/live-business-translator/blob/main/backend/speech/translation_service.py"
click node_speech_output "https://github.com/quancut244-jpg/live-business-translator/blob/main/backend/speech/tts_service.py"
click node_speech_pipeline "https://github.com/quancut244-jpg/live-business-translator/blob/main/backend/speech/speech_pipeline.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_meeting_page,node_app_shell,node_conversation_list,node_message_card,node_mock_messages,node_microphone,node_live_socket,node_api_client toneBlue
class node_api_routes,node_audio_validation,node_configuration toneAmber
class node_transcription,node_translation,node_speech_output,node_speech_pipeline toneMint
class node_participant toneIndigo
```

## Components

### Meeting interface

- [Live meeting](https://github.com/quancut244-jpg/live-business-translator/blob/main/UIandUX/src/pages/LiveMeetingPage/LiveMeetingPage.tsx): `UIandUX/src/pages/LiveMeetingPage/LiveMeetingPage.tsx`
- [App shell](https://github.com/quancut244-jpg/live-business-translator/blob/main/UIandUX/src/App.tsx): `UIandUX/src/App.tsx`
- [Conversation list](https://github.com/quancut244-jpg/live-business-translator/blob/main/UIandUX/src/components/conversation/ConversationList.tsx): `UIandUX/src/components/conversation/ConversationList.tsx`
- [Message card](https://github.com/quancut244-jpg/live-business-translator/blob/main/UIandUX/src/components/conversation/MessageCard.tsx): `UIandUX/src/components/conversation/MessageCard.tsx`
- [Sample messages](https://github.com/quancut244-jpg/live-business-translator/blob/main/UIandUX/src/data/mockMessages.ts): `UIandUX/src/data/mockMessages.ts`
- [Microphone capture](https://github.com/quancut244-jpg/live-business-translator/blob/main/UIandUX/src/services/microphone.ts): `UIandUX/src/services/microphone.ts`
- [Live socket](https://github.com/quancut244-jpg/live-business-translator/blob/main/UIandUX/src/services/liveSocket.ts): `UIandUX/src/services/liveSocket.ts`
- [API client](https://github.com/quancut244-jpg/live-business-translator/blob/main/UIandUX/src/services/api.ts): `UIandUX/src/services/api.ts`

### API processing

- [HTTP and socket routes](https://github.com/quancut244-jpg/live-business-translator/blob/main/backend/app/main.py): `backend/app/main.py`
- [Audio validation](https://github.com/quancut244-jpg/live-business-translator/blob/main/backend/app/validators/audio_validator.py): `backend/app/validators/audio_validator.py`
- [Backend configuration](https://github.com/quancut244-jpg/live-business-translator/blob/main/backend/app/config.py): `backend/app/config.py`

### Speech services

- [Speech recognition](https://github.com/quancut244-jpg/live-business-translator/blob/main/backend/app/services/speech_to_text.py): `backend/app/services/speech_to_text.py`
- [Text translation](https://github.com/quancut244-jpg/live-business-translator/blob/main/backend/speech/translation_service.py): `backend/speech/translation_service.py`
- [Speech synthesis](https://github.com/quancut244-jpg/live-business-translator/blob/main/backend/speech/tts_service.py): `backend/speech/tts_service.py`
- [Speech pipeline](https://github.com/quancut244-jpg/live-business-translator/blob/main/backend/speech/speech_pipeline.py): `backend/speech/speech_pipeline.py`

### Other components

- **Meeting participant**

## Connections

- Meeting participant → Live meeting: uses (evidence: `UIandUX/src/pages/LiveMeetingPage/LiveMeetingPage.tsx`)
- App shell → Live meeting: renders (evidence: `UIandUX/src/App.tsx`)
- Live meeting → Microphone capture: captures audio (evidence: `UIandUX/src/pages/LiveMeetingPage/LiveMeetingPage.tsx`)
- Live meeting → Live socket: exchanges events (evidence: `UIandUX/src/pages/LiveMeetingPage/LiveMeetingPage.tsx`)
- Live meeting → Conversation list: renders (evidence: `UIandUX/src/pages/LiveMeetingPage/LiveMeetingPage.tsx`)
- Conversation list → Message card: renders (evidence: `UIandUX/src/components/conversation/ConversationList.tsx`)
- Conversation list → Sample messages: loads samples (evidence: `UIandUX/src/components/conversation/ConversationList.tsx`)
- API client → HTTP and socket routes: HTTP requests
- Live socket → HTTP and socket routes: socket events
- HTTP and socket routes → Audio validation: validates uploads (evidence: `backend/app/main.py`)
- Audio validation → Backend configuration: reads limits (evidence: `backend/app/validators/audio_validator.py`)
- HTTP and socket routes → Speech recognition: transcribes audio (evidence: `backend/app/main.py`)
- HTTP and socket routes → Text translation: translates text (evidence: `backend/app/main.py`)
- HTTP and socket routes → Speech synthesis: synthesizes speech (evidence: `backend/app/main.py`)
- Speech pipeline → Text translation: uses translator (evidence: `backend/speech/speech_pipeline.py`)
- Speech pipeline → Speech synthesis: speaks translation (evidence: `backend/speech/speech_pipeline.py`)
