# sravannotshravan/meeting-summarizer architecture

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

- Interactive diagram: https://gitdiagram.com/sravannotshravan/meeting-summarizer
- Repository: https://github.com/sravannotshravan/meeting-summarizer

## Overview

#### Purpose and entry points
MeetingAI is a local, privacy-oriented meeting-recording processor. It accepts audio/video, produces a speaker-attributed transcript and structured meeting summary, and serves a synchronized playback UI. Runtime entry points are FastAPI (`api/main.py`), the React client (`frontend/src/main.tsx`), and Compose (`docker-compose.yml`).

#### API orchestration and asynchronous processing
The FastAPI application owns the REST boundary: upload, meeting listing/status, artifact retrieval, audio streaming, and deletion. Upload creates a meeting record and schedules processing through background tasks rather than blocking the request. The API is the only intended bridge between browser state and the AI/storage layers.
Paths: `api/main.py`, `ai/pipeline.py`, `backend/storage.py`.

#### Meeting persistence and artifact boundary
SQLite stores meeting metadata/status, while the filesystem holds recordings and generated artifacts in per-meeting directories. Storage operations encapsulate CRUD plus artifact reads/writes, allowing API handlers and pipeline stages to coordinate through a meeting ID and persisted files rather than in-memory job state.
Paths: `backend/database.py`, `backend/models.py`, `backend/storage.py`.

#### AI pipeline stages
The pipeline orchestrates a sequential local workflow: invoke whisper.cpp for timestamped transcription; run pyannote diarization; temporally align transcript segments with detected speakers; then request an LLM-generated structured summary. Each stage produces input for the next, with the persisted raw transcript, speaker transcript, and summary exposed independently by the API.
Paths: `ai/pipeline.py`, `ai/diarization.py`, `ai/alignment.py`.

#### Local model/service integration
Speech recognition is executed through an installed/containerized `whisper-cli` and local Whisper model. Diarization uses pyannote and requires a Hugging Face token for its gated model. Summarization delegates to a separately running llama.cpp server hosting Qwen3-8B, so the backend depends on an HTTP LLM-service boundary but no cloud inference API.
Paths: `ai/summarizer.py`, `requirements.txt`, `.env.example`.

#### Frontend interaction model
The React/Vite client has a dashboard for meeting discovery/upload and a dedicated meeting view that polls/loads status and artifacts through a typed API client. The meeting page combines streamed original audio with timestamped speaker transcript for click-to-seek and synchronized scrolling, alongside the structured summary.
Paths: `frontend/src/App.tsx`, `frontend/src/pages/MeetingPage.tsx`, `frontend/src/lib/api.ts`.

#### Deployment topology
Docker Compose coordinates frontend, backend/AI dependencies, and llama.cpp. The frontend production image is served by Nginx; the backend image packages Python, Whisper, and pyannote dependencies. Persistent host-mounted model and data directories are architecturally necessary because the SQLite DB, recordings/artifacts, and GGUF model outlive containers.
Paths: `docker-compose.yml`, `Dockerfile.backend`, `Dockerfile.frontend`.

Main entry points: [`docker-compose.yml`](https://github.com/sravannotshravan/meeting-summarizer/blob/main/docker-compose.yml) (Docker Compose deployment), [`backend/storage.py`](https://github.com/sravannotshravan/meeting-summarizer/blob/main/backend/storage.py) (Meeting storage), [`api/main.py`](https://github.com/sravannotshravan/meeting-summarizer/blob/main/api/main.py) (FastAPI application), [`ai/pipeline.py`](https://github.com/sravannotshravan/meeting-summarizer/blob/main/ai/pipeline.py) (Processing pipeline)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Browser client"]
  node_react_app["React dashboard &amp; meeting view<br/>React/Vite UI<br/>[App.tsx]"]
  node_meeting_page["Meeting playback view<br/>React page<br/>[MeetingPage.tsx]"]
  node_typed_api_client["Typed API client<br/>frontend API layer<br/>[api.ts]"]
end

subgraph group_api["Backend &amp; storage"]
  node_fastapi["FastAPI application<br/>REST API<br/>[main.py]"]
  node_meeting_storage["Meeting storage<br/>persistence boundary<br/>[storage.py]"]
  node_sqlite[("Meeting metadata DB<br/>SQLite<br/>[database.py]")]
  node_meeting_model["Meeting model<br/>data model<br/>[models.py]"]
  node_artifact_files["Recordings &amp; artifacts<br/>mounted filesystem"]
end

subgraph group_pipeline["Local AI pipeline"]
  node_pipeline_orchestrator["Processing pipeline<br/>background workflow<br/>[pipeline.py]"]
  node_whisper{{"whisper.cpp transcription<br/>local CLI inference"}}
  node_diarization["Speaker diarization<br/>pyannote stage<br/>[diarization.py]"]
  node_alignment["Transcript-speaker alignment<br/>pipeline stage<br/>[alignment.py]"]
  node_summarizer["Structured summarizer<br/>LLM client<br/>[summarizer.py]"]
end

subgraph group_runtime["Container runtime"]
  node_llama_server{{"llama.cpp / Qwen3-8B<br/>local LLM service"}}
  node_compose["Docker Compose deployment<br/>container topology<br/>[docker-compose.yml]"]
  node_frontend_image["Nginx frontend image<br/>production container"]
  node_backend_image["Backend AI image<br/>production container<br/>[Dockerfile.backend]"]
end

node_react_app -->|"routes to"| node_meeting_page
node_react_app -->|"uses"| node_typed_api_client
node_meeting_page -->|"loads status and artifacts"| node_typed_api_client
node_typed_api_client -->|"REST requests"| node_fastapi
node_fastapi -->|"persists and retrieves"| node_meeting_storage
node_fastapi -.->|"schedules after upload"| node_pipeline_orchestrator
node_meeting_storage -->|"metadata and status"| node_sqlite
node_meeting_storage -->|"maps records"| node_meeting_model
node_meeting_storage -->|"reads and writes"| node_artifact_files
node_pipeline_orchestrator -->|"transcribes recording"| node_whisper
node_whisper -->|"timestamped transcript"| node_diarization
node_diarization -->|"speaker intervals"| node_alignment
node_alignment -->|"speaker transcript"| node_summarizer
node_pipeline_orchestrator -->|"persists stage artifacts"| node_meeting_storage
node_summarizer -->|"local HTTP inference"| node_llama_server
node_compose -->|"runs"| node_frontend_image
node_compose -->|"runs"| node_backend_image
node_compose -->|"runs"| node_llama_server
node_backend_image -->|"hosts"| node_fastapi
node_frontend_image -->|"serves"| node_react_app
node_compose -->|"persistent host mount"| node_artifact_files
node_compose -->|"persistent host mount"| node_sqlite

click node_react_app "https://github.com/sravannotshravan/meeting-summarizer/blob/main/frontend/src/App.tsx"
click node_meeting_page "https://github.com/sravannotshravan/meeting-summarizer/blob/main/frontend/src/pages/MeetingPage.tsx"
click node_typed_api_client "https://github.com/sravannotshravan/meeting-summarizer/blob/main/frontend/src/lib/api.ts"
click node_fastapi "https://github.com/sravannotshravan/meeting-summarizer/blob/main/api/main.py"
click node_pipeline_orchestrator "https://github.com/sravannotshravan/meeting-summarizer/blob/main/ai/pipeline.py"
click node_meeting_storage "https://github.com/sravannotshravan/meeting-summarizer/blob/main/backend/storage.py"
click node_sqlite "https://github.com/sravannotshravan/meeting-summarizer/blob/main/backend/database.py"
click node_meeting_model "https://github.com/sravannotshravan/meeting-summarizer/blob/main/backend/models.py"
click node_diarization "https://github.com/sravannotshravan/meeting-summarizer/blob/main/ai/diarization.py"
click node_alignment "https://github.com/sravannotshravan/meeting-summarizer/blob/main/ai/alignment.py"
click node_summarizer "https://github.com/sravannotshravan/meeting-summarizer/blob/main/ai/summarizer.py"
click node_compose "https://github.com/sravannotshravan/meeting-summarizer/blob/main/docker-compose.yml"
click node_frontend_image "https://github.com/sravannotshravan/meeting-summarizer/blob/main/Dockerfile.frontend"
click node_backend_image "https://github.com/sravannotshravan/meeting-summarizer/blob/main/Dockerfile.backend"

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_react_app,node_meeting_page,node_typed_api_client toneBlue
class node_fastapi,node_meeting_storage,node_sqlite,node_meeting_model,node_artifact_files toneAmber
class node_pipeline_orchestrator,node_whisper,node_diarization,node_alignment,node_summarizer toneMint
class node_llama_server,node_compose,node_frontend_image,node_backend_image toneRose
```

## Components

### Browser client

- [React dashboard & meeting view](https://github.com/sravannotshravan/meeting-summarizer/blob/main/frontend/src/App.tsx): React/Vite UI · Upload, discovery, playback, transcript synchronization, and summary display. · `frontend/src/App.tsx`
- [Meeting playback view](https://github.com/sravannotshravan/meeting-summarizer/blob/main/frontend/src/pages/MeetingPage.tsx): React page · Streams audio and seeks from timestamped speaker transcript. · `frontend/src/pages/MeetingPage.tsx`
- [Typed API client](https://github.com/sravannotshravan/meeting-summarizer/blob/main/frontend/src/lib/api.ts): frontend API layer · `frontend/src/lib/api.ts`

### Backend & storage

- [FastAPI application](https://github.com/sravannotshravan/meeting-summarizer/blob/main/api/main.py): REST API · Owns upload, meeting status, artifacts, audio streaming, and deletion. · `api/main.py`
- [Meeting storage](https://github.com/sravannotshravan/meeting-summarizer/blob/main/backend/storage.py): persistence boundary · Coordinates CRUD and per-meeting recording and artifact files. · `backend/storage.py`
- [Meeting metadata DB](https://github.com/sravannotshravan/meeting-summarizer/blob/main/backend/database.py): SQLite · Stores meeting metadata and processing status. · `backend/database.py`
- [Meeting model](https://github.com/sravannotshravan/meeting-summarizer/blob/main/backend/models.py): data model · `backend/models.py`
- **Recordings & artifacts**: mounted filesystem · Per-meeting audio, raw transcript, speaker transcript, and summary.

### Local AI pipeline

- [Processing pipeline](https://github.com/sravannotshravan/meeting-summarizer/blob/main/ai/pipeline.py): background workflow · Runs sequential processing after upload without blocking the request. · `ai/pipeline.py`
- **whisper.cpp transcription**: local CLI inference · Produces timestamped raw transcripts using a local Whisper model.
- [Speaker diarization](https://github.com/sravannotshravan/meeting-summarizer/blob/main/ai/diarization.py): pyannote stage · Detects speaker time ranges using the gated pyannote model. · `ai/diarization.py`
- [Transcript-speaker alignment](https://github.com/sravannotshravan/meeting-summarizer/blob/main/ai/alignment.py): pipeline stage · Associates transcript segments with detected speakers. · `ai/alignment.py`
- [Structured summarizer](https://github.com/sravannotshravan/meeting-summarizer/blob/main/ai/summarizer.py): LLM client · Requests the meeting summary from the local llama.cpp server. · `ai/summarizer.py`

### Container runtime

- **llama.cpp / Qwen3-8B**: local LLM service · Separately running HTTP inference service backed by a GGUF model.
- [Docker Compose deployment](https://github.com/sravannotshravan/meeting-summarizer/blob/main/docker-compose.yml): container topology · Runs frontend, backend AI dependencies, and llama.cpp with persistent mounts. · `docker-compose.yml`
- [Nginx frontend image](https://github.com/sravannotshravan/meeting-summarizer/blob/main/Dockerfile.frontend): production container · `Dockerfile.frontend`
- [Backend AI image](https://github.com/sravannotshravan/meeting-summarizer/blob/main/Dockerfile.backend): production container · Packages Python, Whisper, and pyannote dependencies. · `Dockerfile.backend`

## Connections

- React dashboard & meeting view → Meeting playback view: routes to
- React dashboard & meeting view → Typed API client: uses
- Meeting playback view → Typed API client: loads status and artifacts
- Typed API client → FastAPI application: REST requests
- FastAPI application → Meeting storage: persists and retrieves
- FastAPI application → Processing pipeline: schedules after upload
- Meeting storage → Meeting metadata DB: metadata and status
- Meeting storage → Meeting model: maps records
- Meeting storage → Recordings & artifacts: reads and writes
- Processing pipeline → whisper.cpp transcription: transcribes recording
- whisper.cpp transcription → Speaker diarization: timestamped transcript
- Speaker diarization → Transcript-speaker alignment: speaker intervals
- Transcript-speaker alignment → Structured summarizer: speaker transcript
- Processing pipeline → Meeting storage: persists stage artifacts
- Structured summarizer → llama.cpp / Qwen3-8B: local HTTP inference
- Docker Compose deployment → Nginx frontend image: runs
- Docker Compose deployment → Backend AI image: runs
- Docker Compose deployment → llama.cpp / Qwen3-8B: runs
- Backend AI image → FastAPI application: hosts
- Nginx frontend image → React dashboard & meeting view: serves
- Docker Compose deployment → Recordings & artifacts: persistent host mount
- Docker Compose deployment → Meeting metadata DB: persistent host mount
