# mhkarami97/ai-meet architecture

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

- Interactive diagram: https://gitdiagram.com/mhkarami97/ai-meet
- Repository: https://github.com/mhkarami97/ai-meet

## Overview

AI Meet is a client-side browser extension for capturing Google Meet captions, turning transcripts into AI reports, and storing, exporting, or optionally syncing meeting records. The main flow runs from the Meet-page capture control through the background worker and IndexedDB, then report generation and side-panel review/export. README documents advanced report analysis, multiple AI providers, manual prompt mode, offline formats, GitHub sync, and bilingual/theme settings; these are retained as distinct capabilities. Several UI and sync internals were not sampled, so only documented or indexed relationships are shown.

Main entry points: [`src/background/service-worker.js`](https://github.com/mhkarami97/ai-meet/blob/main/src/background/service-worker.js) (Message router), [`src/background/settings-store.js`](https://github.com/mhkarami97/ai-meet/blob/main/src/background/settings-store.js) (Settings and secrets), [`src/ui/options.js`](https://github.com/mhkarami97/ai-meet/blob/main/src/ui/options.js) (Provider and preferences), [`src/ui/sidepanel.js`](https://github.com/mhkarami97/ai-meet/blob/main/src/ui/sidepanel.js) (Meeting side panel)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_capture["Capture"]
  node_capture_ui["Caption capture<br/>[meet-capture.js]"]
end

subgraph group_runtime["Background"]
  node_worker["Message router<br/>[service-worker.js]"]
  node_settings["Settings and secrets<br/>[settings-store.js]"]
  node_crypto["Secret encryption<br/>[crypto-helper.js]"]
end

subgraph group_ai["AI reports"]
  node_summarizer["Report orchestration<br/>[summarizer.js]"]
  node_templates["Prompt templates"]
  node_providers["AI providers<br/>[providers.js]"]
  node_provider_interface["Provider interface"]
  node_manual_mode["Manual prompt mode<br/>[providers.js]"]
end

subgraph group_records["Meeting records"]
  node_meeting_model["Meeting and analysis model<br/>[models.js]"]
  node_database[("IndexedDB history<br/>[database.js]")]
end

subgraph group_experience["UI and outputs"]
  node_sidepanel["Meeting side panel<br/>[sidepanel.js]"]
  node_options["Provider and preferences<br/>[options.js]"]
  node_exporters["Offline exporters<br/>[exporters.js]"]
  node_markdown["Markdown builder"]
  node_github_sync["GitHub sync<br/>[sync-provider.js]"]
  node_i18n["Translations<br/>[i18n.js]"]
  node_language["UI language bootstrap<br/>[ui-language.js]"]
  node_theme["Theme application<br/>[theme.js]"]
end

node_organizer(("Meeting user"))
node_meet["Google Meet"]
node_ai_services{{"AI endpoints"}}
node_github{{"GitHub repository"}}

node_organizer -->|"starts or stops"| node_capture_ui
node_meet -->|"provides captions"| node_capture_ui
node_capture_ui -.->|"sends meeting events"| node_worker
node_worker -->|"reads settings"| node_settings
node_settings -->|"encrypts secrets"| node_crypto
node_worker -->|"saves and loads meetings"| node_database
node_database -->|"rehydrates records"| node_meeting_model
node_worker -->|"requests reports"| node_summarizer
node_summarizer -->|"builds prompts"| node_templates
node_summarizer -->|"requests completion"| node_providers
node_providers -->|"implements"| node_provider_interface
node_summarizer -->|"loads provider config"| node_settings
node_providers -->|"sends AI requests"| node_ai_services
node_worker -.->|"broadcasts meeting updates"| node_sidepanel
node_sidepanel -.->|"reads meeting history"| node_database
node_sidepanel -.->|"exports selected meeting"| node_exporters
node_exporters -->|"builds Markdown output"| node_markdown
node_exporters -->|"reads transcript option"| node_settings
node_worker -->|"syncs requested meeting"| node_github_sync
node_worker -->|"builds sync report"| node_markdown
node_github_sync -.->|"uploads meeting files"| node_github
node_options -.->|"saves preferences"| node_settings
node_options -.->|"configures templates"| node_templates
node_options -.->|"configures providers"| node_providers
node_sidepanel -->|"initializes language"| node_language
node_options -->|"initializes language"| node_language
node_language -->|"loads language choice"| node_settings
node_language -->|"loads translations"| node_i18n
node_i18n -->|"renders bilingual UI"| node_organizer
node_sidepanel -->|"applies theme"| node_theme
node_options -->|"applies theme"| node_theme

click node_capture_ui "https://github.com/mhkarami97/ai-meet/blob/main/src/content/meet-capture.js"
click node_worker "https://github.com/mhkarami97/ai-meet/blob/main/src/background/service-worker.js"
click node_settings "https://github.com/mhkarami97/ai-meet/blob/main/src/background/settings-store.js"
click node_crypto "https://github.com/mhkarami97/ai-meet/blob/main/src/background/crypto-helper.js"
click node_summarizer "https://github.com/mhkarami97/ai-meet/blob/main/src/background/summarizer.js"
click node_templates "https://github.com/mhkarami97/ai-meet/blob/main/src/ai/prompt-templates.js"
click node_providers "https://github.com/mhkarami97/ai-meet/blob/main/src/ai/providers.js"
click node_provider_interface "https://github.com/mhkarami97/ai-meet/blob/main/src/ai/provider-interface.js"
click node_manual_mode "https://github.com/mhkarami97/ai-meet/blob/main/src/ai/providers.js"
click node_meeting_model "https://github.com/mhkarami97/ai-meet/blob/main/src/db/models.js"
click node_database "https://github.com/mhkarami97/ai-meet/blob/main/src/db/database.js"
click node_sidepanel "https://github.com/mhkarami97/ai-meet/blob/main/src/ui/sidepanel.js"
click node_options "https://github.com/mhkarami97/ai-meet/blob/main/src/ui/options.js"
click node_exporters "https://github.com/mhkarami97/ai-meet/blob/main/src/export/exporters.js"
click node_markdown "https://github.com/mhkarami97/ai-meet/blob/main/src/export/markdown-builder.js"
click node_github_sync "https://github.com/mhkarami97/ai-meet/blob/main/src/background/sync-provider.js"
click node_i18n "https://github.com/mhkarami97/ai-meet/blob/main/src/i18n/i18n.js"
click node_language "https://github.com/mhkarami97/ai-meet/blob/main/src/ui/ui-language.js"
click node_theme "https://github.com/mhkarami97/ai-meet/blob/main/src/ui/theme.js"

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_capture_ui,node_organizer toneBlue
class node_worker,node_settings,node_crypto toneAmber
class node_summarizer,node_templates,node_providers,node_provider_interface,node_manual_mode toneMint
class node_meeting_model,node_database toneRose
class node_sidepanel,node_options,node_exporters,node_markdown,node_github_sync,node_i18n,node_language,node_theme,node_meet,node_ai_services,node_github toneIndigo
```

## Components

### Capture

- [Caption capture](https://github.com/mhkarami97/ai-meet/blob/main/src/content/meet-capture.js): `src/content/meet-capture.js`

### Background

- [Message router](https://github.com/mhkarami97/ai-meet/blob/main/src/background/service-worker.js): `src/background/service-worker.js`
- [Settings and secrets](https://github.com/mhkarami97/ai-meet/blob/main/src/background/settings-store.js): `src/background/settings-store.js`
- [Secret encryption](https://github.com/mhkarami97/ai-meet/blob/main/src/background/crypto-helper.js): `src/background/crypto-helper.js`

### AI reports

- [Report orchestration](https://github.com/mhkarami97/ai-meet/blob/main/src/background/summarizer.js): `src/background/summarizer.js`
- [Prompt templates](https://github.com/mhkarami97/ai-meet/blob/main/src/ai/prompt-templates.js): `src/ai/prompt-templates.js`
- [AI providers](https://github.com/mhkarami97/ai-meet/blob/main/src/ai/providers.js): `src/ai/providers.js`
- [Provider interface](https://github.com/mhkarami97/ai-meet/blob/main/src/ai/provider-interface.js): `src/ai/provider-interface.js`
- [Manual prompt mode](https://github.com/mhkarami97/ai-meet/blob/main/src/ai/providers.js): `src/ai/providers.js`

### Meeting records

- [Meeting and analysis model](https://github.com/mhkarami97/ai-meet/blob/main/src/db/models.js): `src/db/models.js`
- [IndexedDB history](https://github.com/mhkarami97/ai-meet/blob/main/src/db/database.js): `src/db/database.js`

### UI and outputs

- [Meeting side panel](https://github.com/mhkarami97/ai-meet/blob/main/src/ui/sidepanel.js): `src/ui/sidepanel.js`
- [Provider and preferences](https://github.com/mhkarami97/ai-meet/blob/main/src/ui/options.js): `src/ui/options.js`
- [Offline exporters](https://github.com/mhkarami97/ai-meet/blob/main/src/export/exporters.js): `src/export/exporters.js`
- [Markdown builder](https://github.com/mhkarami97/ai-meet/blob/main/src/export/markdown-builder.js): `src/export/markdown-builder.js`
- [GitHub sync](https://github.com/mhkarami97/ai-meet/blob/main/src/background/sync-provider.js): `src/background/sync-provider.js`
- [Translations](https://github.com/mhkarami97/ai-meet/blob/main/src/i18n/i18n.js): `src/i18n/i18n.js`
- [UI language bootstrap](https://github.com/mhkarami97/ai-meet/blob/main/src/ui/ui-language.js): `src/ui/ui-language.js`
- [Theme application](https://github.com/mhkarami97/ai-meet/blob/main/src/ui/theme.js): `src/ui/theme.js`

### Other components

- **Meeting user**
- **Google Meet**
- **AI endpoints**
- **GitHub repository**

## Connections

- Meeting user → Caption capture: starts or stops (evidence: `README.md`)
- Google Meet → Caption capture: provides captions (evidence: `README.md`)
- Caption capture → Message router: sends meeting events
- Message router → Settings and secrets: reads settings (evidence: `src/background/service-worker.js`)
- Settings and secrets → Secret encryption: encrypts secrets (evidence: `src/background/settings-store.js`)
- Message router → IndexedDB history: saves and loads meetings (evidence: `src/background/service-worker.js`)
- IndexedDB history → Meeting and analysis model: rehydrates records (evidence: `src/db/database.js`)
- Message router → Report orchestration: requests reports (evidence: `src/background/service-worker.js`)
- Report orchestration → Prompt templates: builds prompts (evidence: `src/background/summarizer.js`)
- Report orchestration → AI providers: requests completion (evidence: `src/background/summarizer.js`)
- AI providers → Provider interface: implements (evidence: `src/ai/providers.js`)
- Report orchestration → Settings and secrets: loads provider config (evidence: `src/background/summarizer.js`)
- AI providers → AI endpoints: sends AI requests (evidence: `src/ai/providers.js`)
- Message router → Meeting side panel: broadcasts meeting updates
- Meeting side panel → IndexedDB history: reads meeting history
- Meeting side panel → Offline exporters: exports selected meeting (evidence: `src/ui/sidepanel.js`)
- Offline exporters → Markdown builder: builds Markdown output (evidence: `src/export/exporters.js`)
- Offline exporters → Settings and secrets: reads transcript option (evidence: `src/export/exporters.js`)
- Message router → GitHub sync: syncs requested meeting (evidence: `src/background/service-worker.js`)
- Message router → Markdown builder: builds sync report (evidence: `src/background/service-worker.js`)
- GitHub sync → GitHub repository: uploads meeting files
- Provider and preferences → Settings and secrets: saves preferences (evidence: `src/ui/options.js`)
- Provider and preferences → Prompt templates: configures templates (evidence: `src/ui/options.js`)
- Provider and preferences → AI providers: configures providers (evidence: `src/ui/options.js`)
- Meeting side panel → UI language bootstrap: initializes language (evidence: `src/ui/sidepanel.js`)
- Provider and preferences → UI language bootstrap: initializes language (evidence: `src/ui/options.js`)
- UI language bootstrap → Settings and secrets: loads language choice (evidence: `src/ui/ui-language.js`)
- UI language bootstrap → Translations: loads translations (evidence: `src/ui/ui-language.js`)
- Translations → Meeting user: renders bilingual UI (evidence: `src/i18n/i18n.js`)
- Meeting side panel → Theme application: applies theme (evidence: `src/ui/sidepanel.js`)
- Provider and preferences → Theme application: applies theme (evidence: `src/ui/options.js`)
