# sujay-pravin/swiftgist architecture

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

- Interactive diagram: https://gitdiagram.com/sujay-pravin/swiftgist
- Repository: https://github.com/sujay-pravin/swiftgist

## Overview

#### Purpose and Runtime Shape
SwiftGist is a two-tier meeting-audio intelligence application. A React/Vite browser client uploads recordings and displays processed meeting artifacts; a Python FastAPI service persists meeting state and runs asynchronous transcription and AI extraction. Primary launch points are `backend/main.py` and `frontend/src/main.tsx`.

#### Frontend Application Shell
`frontend/src/App.tsx` composes the meeting workspace: history navigation, upload initiation, audio playback, and result panels. `frontend/src/api/client.ts` is the browser/backend boundary, using the configured `VITE_API_BASE_URL`. `frontend/src/hooks/useMeetings.ts` centralizes client-side meeting retrieval, selection, upload/process state, and deletion behavior.

#### Meeting Workspace and Interaction
The selected meeting is rendered through a coordinated UI: `frontend/src/components/MeetingsSidebar.tsx` exposes persisted history; `frontend/src/components/AudioPlayer.tsx` plays the source recording; and `frontend/src/components/KeyPointsPanel.tsx`, `frontend/src/components/ActionItemsPanel.tsx`, and `frontend/src/components/EventsPanel.tsx` present AI-generated structured data. `frontend/src/hooks/useAudioPlayer.ts` is the audio synchronization boundary, allowing timestamped key points to seek within the recording.

#### Upload and API Boundary
`frontend/src/components/UploadModal.tsx` submits supported audio files to the backend. FastAPI routing in `backend/routes/meetings.py` owns the meeting HTTP lifecycle: upload/create, listing and retrieval, status/result access, and deletion. `backend/main.py` configures the service application and mounts these routes, forming the backend entry boundary used by the frontend.

#### Asynchronous AI Processing Pipeline
Upload returns before intelligence is ready; backend background processing advances a persisted meeting through transcription and summarization. `backend/services/transcription.py` sends audio to Groq Whisper Large V3 Turbo and produces transcript content with segment-level timestamps. `backend/services/summarization.py` submits the transcript to Google Gemini/Gemma to extract key points, assigned/prioritized action items, and calendar events.

#### Persistence and Domain Model
`backend/models.py` defines the persisted meeting and structured intelligence domain shape shared conceptually with the frontend types in `frontend/src/types/meeting.ts`. `backend/database.py` establishes database access and storage lifecycle. This is the durable boundary between request handling/background work and later history/result reads.

#### Infrastructure and External Dependencies
The backend requires Python 3.10+, FastAPI dependencies from `backend/requirements.txt`, and environment-driven credentials/configuration in `backend/config.py` and `backend/.env.example`. It integrates with Groq for speech-to-text and Google AI for structured summarization. The frontend requires Node 18+, builds/runs with Vite (`frontend/package.json`), and receives its backend endpoint through `frontend/.env.example`. The README identifies Render free-tier deployment constraints and practical upload limits.

Main entry points: [`frontend/src/App.tsx`](https://github.com/sujay-pravin/swiftgist/blob/main/frontend/src/App.tsx) (Meeting workspace), [`backend/services/transcription.py`](https://github.com/sujay-pravin/swiftgist/blob/main/backend/services/transcription.py) (Transcription stage), [`backend/routes/meetings.py`](https://github.com/sujay-pravin/swiftgist/blob/main/backend/routes/meetings.py) (Meeting HTTP lifecycle), [`backend/database.py`](https://github.com/sujay-pravin/swiftgist/blob/main/backend/database.py) (Database access)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Browser Client"]
  node_fe_main["React/Vite entry<br/>entrypoint<br/>[main.tsx]"]
  node_fe_app["Meeting workspace<br/>React shell<br/>[App.tsx]"]
  node_fe_meetings["Meeting state<br/>React hook<br/>[useMeetings.ts]"]
  node_fe_api["Backend API client<br/>HTTP client<br/>[client.ts]"]
  node_fe_upload["Audio upload<br/>UI component<br/>[UploadModal.tsx]"]
  node_fe_history["Meeting history<br/>UI component"]
  node_fe_audio["Playback and seeking<br/>UI hook/component<br/>[useAudioPlayer.ts]"]
  node_fe_results["Intelligence panels<br/>UI components<br/>[KeyPointsPanel.tsx]"]
  node_fe_types["Meeting types<br/>domain types<br/>[meeting.ts]"]
end

subgraph group_backend["FastAPI Service"]
  node_be_main["Service entry<br/>FastAPI app<br/>[main.py]"]
  node_be_routes["Meeting HTTP lifecycle<br/>FastAPI routes<br/>[meetings.py]"]
  node_be_models["Meeting domain model<br/>persistence model<br/>[models.py]"]
  node_be_db[("Database access<br/>storage lifecycle<br/>[database.py]")]
  node_be_transcription["Transcription stage<br/>background service<br/>[transcription.py]"]
  node_be_summarization["Extraction stage<br/>background service<br/>[summarization.py]"]
end

subgraph group_external["AI Providers"]
  node_groq{{"Groq Whisper<br/>speech-to-text API"}}
  node_google_ai{{"Google AI<br/>structured AI API"}}
end

node_fe_main -->|"renders"| node_fe_app
node_fe_app -->|"uses"| node_fe_meetings
node_fe_app -->|"opens"| node_fe_upload
node_fe_app -->|"renders"| node_fe_history
node_fe_app -->|"coordinates"| node_fe_audio
node_fe_app -->|"renders"| node_fe_results
node_fe_meetings -->|"requests"| node_fe_api
node_fe_upload -->|"uploads audio"| node_fe_api
node_fe_results -->|"seeks by timestamp"| node_fe_audio
node_fe_types -.->|"shapes state"| node_fe_meetings
node_fe_api -->|"meeting HTTP API"| node_be_routes
node_be_main -->|"mounts"| node_be_routes
node_be_routes -->|"reads and writes"| node_be_db
node_be_routes -->|"starts asynchronously"| node_be_transcription
node_be_transcription -->|"transcribes audio"| node_groq
node_be_transcription -->|"passes transcript"| node_be_summarization
node_be_summarization -->|"extracts intelligence"| node_google_ai
node_be_transcription -->|"persists transcript/status"| node_be_db
node_be_summarization -->|"persists results/status"| node_be_db
node_be_models -.->|"defines stored records"| node_be_db
node_be_models -.->|"conceptual contract"| node_fe_types

click node_fe_main "https://github.com/sujay-pravin/swiftgist/blob/main/frontend/src/main.tsx"
click node_fe_app "https://github.com/sujay-pravin/swiftgist/blob/main/frontend/src/App.tsx"
click node_fe_meetings "https://github.com/sujay-pravin/swiftgist/blob/main/frontend/src/hooks/useMeetings.ts"
click node_fe_api "https://github.com/sujay-pravin/swiftgist/blob/main/frontend/src/api/client.ts"
click node_fe_upload "https://github.com/sujay-pravin/swiftgist/blob/main/frontend/src/components/UploadModal.tsx"
click node_fe_history "https://github.com/sujay-pravin/swiftgist/blob/main/frontend/src/components/MeetingsSidebar.tsx"
click node_fe_audio "https://github.com/sujay-pravin/swiftgist/blob/main/frontend/src/hooks/useAudioPlayer.ts"
click node_fe_results "https://github.com/sujay-pravin/swiftgist/blob/main/frontend/src/components/KeyPointsPanel.tsx"
click node_fe_types "https://github.com/sujay-pravin/swiftgist/blob/main/frontend/src/types/meeting.ts"
click node_be_main "https://github.com/sujay-pravin/swiftgist/blob/main/backend/main.py"
click node_be_routes "https://github.com/sujay-pravin/swiftgist/blob/main/backend/routes/meetings.py"
click node_be_models "https://github.com/sujay-pravin/swiftgist/blob/main/backend/models.py"
click node_be_db "https://github.com/sujay-pravin/swiftgist/blob/main/backend/database.py"
click node_be_transcription "https://github.com/sujay-pravin/swiftgist/blob/main/backend/services/transcription.py"
click node_be_summarization "https://github.com/sujay-pravin/swiftgist/blob/main/backend/services/summarization.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_fe_main,node_fe_app,node_fe_meetings,node_fe_api,node_fe_upload,node_fe_history,node_fe_audio,node_fe_results,node_fe_types toneBlue
class node_be_main,node_be_routes,node_be_models,node_be_db,node_be_transcription,node_be_summarization toneAmber
class node_groq,node_google_ai toneMint
```

## Components

### Browser Client

- [React/Vite entry](https://github.com/sujay-pravin/swiftgist/blob/main/frontend/src/main.tsx): entrypoint · `frontend/src/main.tsx`
- [Meeting workspace](https://github.com/sujay-pravin/swiftgist/blob/main/frontend/src/App.tsx): React shell · `frontend/src/App.tsx`
- [Meeting state](https://github.com/sujay-pravin/swiftgist/blob/main/frontend/src/hooks/useMeetings.ts): React hook · Retrieval, selection, upload state, and deletion. · `frontend/src/hooks/useMeetings.ts`
- [Backend API client](https://github.com/sujay-pravin/swiftgist/blob/main/frontend/src/api/client.ts): HTTP client · Uses VITE_API_BASE_URL. · `frontend/src/api/client.ts`
- [Audio upload](https://github.com/sujay-pravin/swiftgist/blob/main/frontend/src/components/UploadModal.tsx): UI component · `frontend/src/components/UploadModal.tsx`
- [Meeting history](https://github.com/sujay-pravin/swiftgist/blob/main/frontend/src/components/MeetingsSidebar.tsx): UI component · `frontend/src/components/MeetingsSidebar.tsx`
- [Playback and seeking](https://github.com/sujay-pravin/swiftgist/blob/main/frontend/src/hooks/useAudioPlayer.ts): UI hook/component · Synchronizes timestamped results with source audio. · `frontend/src/hooks/useAudioPlayer.ts`
- [Intelligence panels](https://github.com/sujay-pravin/swiftgist/blob/main/frontend/src/components/KeyPointsPanel.tsx): UI components · Key points, action items, and events. · `frontend/src/components/KeyPointsPanel.tsx`
- [Meeting types](https://github.com/sujay-pravin/swiftgist/blob/main/frontend/src/types/meeting.ts): domain types · `frontend/src/types/meeting.ts`

### FastAPI Service

- [Service entry](https://github.com/sujay-pravin/swiftgist/blob/main/backend/main.py): FastAPI app · Configures and mounts meeting routes. · `backend/main.py`
- [Meeting HTTP lifecycle](https://github.com/sujay-pravin/swiftgist/blob/main/backend/routes/meetings.py): FastAPI routes · Upload, history, status/results, and deletion. · `backend/routes/meetings.py`
- [Meeting domain model](https://github.com/sujay-pravin/swiftgist/blob/main/backend/models.py): persistence model · Meeting state and structured intelligence artifacts. · `backend/models.py`
- [Database access](https://github.com/sujay-pravin/swiftgist/blob/main/backend/database.py): storage lifecycle · `backend/database.py`
- [Transcription stage](https://github.com/sujay-pravin/swiftgist/blob/main/backend/services/transcription.py): background service · Produces transcript segments with timestamps. · `backend/services/transcription.py`
- [Extraction stage](https://github.com/sujay-pravin/swiftgist/blob/main/backend/services/summarization.py): background service · Extracts key points, action items, and events. · `backend/services/summarization.py`

### AI Providers

- **Groq Whisper**: speech-to-text API · Whisper Large V3 Turbo.
- **Google AI**: structured AI API · Gemini/Gemma summarization.

## Connections

- React/Vite entry → Meeting workspace: renders
- Meeting workspace → Meeting state: uses
- Meeting workspace → Audio upload: opens
- Meeting workspace → Meeting history: renders
- Meeting workspace → Playback and seeking: coordinates
- Meeting workspace → Intelligence panels: renders
- Meeting state → Backend API client: requests
- Audio upload → Backend API client: uploads audio
- Intelligence panels → Playback and seeking: seeks by timestamp
- Meeting types → Meeting state: shapes state
- Backend API client → Meeting HTTP lifecycle: meeting HTTP API
- Service entry → Meeting HTTP lifecycle: mounts
- Meeting HTTP lifecycle → Database access: reads and writes
- Meeting HTTP lifecycle → Transcription stage: starts asynchronously
- Transcription stage → Groq Whisper: transcribes audio
- Transcription stage → Extraction stage: passes transcript
- Extraction stage → Google AI: extracts intelligence
- Transcription stage → Database access: persists transcript/status
- Extraction stage → Database access: persists results/status
- Meeting domain model → Database access: defines stored records
- Meeting domain model → Meeting types: conceptual contract
