# yuyudhan/simple-voice architecture

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

- Interactive diagram: https://gitdiagram.com/yuyudhan/simple-voice
- Repository: https://github.com/yuyudhan/simple-voice

## Overview

Simple Voice is a macOS dictation app: a user starts a recording with a shortcut, speaks, and gets formatted text delivered to the frontmost app, with a history record. Its documented workflow supports cloud or on-device transcription, optional cleanup, dictionary-aware formatting, and clipboard/paste delivery. The graph also includes the UI’s settings, dictionary, history, insights, model, permissions, and update capabilities. Sampled source confirms the dictation pipeline and engine sidecar; some feature wiring is represented only by the tree and README, so uncertain calls are omitted.

Main entry points: [`src/app/App.tsx`](https://github.com/yuyudhan/simple-voice/blob/main/src/app/App.tsx) (App shell and pages), [`src/lib/api.ts`](https://github.com/yuyudhan/simple-voice/blob/main/src/lib/api.ts) (Tauri API client), [`src-tauri/src/features/dictation/pipeline.rs`](https://github.com/yuyudhan/simple-voice/blob/main/src-tauri/src/features/dictation/pipeline.rs) (Dictation pipeline), [`crates/sv-storage/src/db.rs`](https://github.com/yuyudhan/simple-voice/blob/main/crates/sv-storage/src/db.rs) (SQLite data store)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["App interface"]
  node_ui["App shell and pages<br/>[App.tsx]"]
  node_uiapi["Tauri API client<br/>[api.ts]"]
  node_historyui["History and search<br/>[HistoryPage.tsx]"]
  node_insightsui["Insights views<br/>[InsightsPage.tsx]"]
  node_dictionaryui["Dictionary editor<br/>[DictionaryPage.tsx]"]
  node_settingsui["Settings and models<br/>[SettingsPage.tsx]"]
  node_onboarding["Onboarding<br/>[Onboarding.tsx]"]
  node_updatesui["Update notices<br/>[UpdateBanner.tsx]"]
end

subgraph group_dictation["Dictation workflow"]
  node_coordinator["Dictation coordinator<br/>[coordinator.rs]"]
  node_capture["Audio capture<br/>[capture.rs]"]
  node_pipeline["Dictation pipeline<br/>[pipeline.rs]"]
  node_transcribe["Transcription routing<br/>[transcription.rs]"]
  node_format["Text formatting<br/>[lib.rs]"]
  node_delivery["Text delivery<br/>[delivery.rs]"]
end

subgraph group_engines["Speech and cleanup"]
  node_cloud["Cloud providers<br/>[lib.rs]"]
  node_engineclient["Engine client<br/>[client.rs]"]
  node_swift["On-device speech engine<br/>[main.swift]"]
  node_modelsbackend["Model management<br/>[mod.rs]"]
end

subgraph group_local["Local data"]
  node_store[("SQLite data store<br/>[db.rs]")]
  node_historybackend["History operations<br/>[mod.rs]"]
  node_dictionarybackend["Dictionary operations<br/>[mod.rs]"]
  node_insightsbackend["Insights operations<br/>[mod.rs]"]
  node_settingsbackend["Settings operations<br/>[mod.rs]"]
end

subgraph group_platform["macOS integration"]
  node_backend["Tauri application<br/>[lib.rs]"]
  node_shortcuts["Shortcuts and tray<br/>[shortcuts.rs]"]
  node_engineprocess["Engine sidecar process<br/>[engine_process.rs]"]
end

node_user(("Mac user"))
node_frontmost(("Frontmost app"))
node_providers{{"Cloud services"}}

node_user -->|"uses app"| node_ui
node_ui -->|"invokes commands"| node_uiapi
node_uiapi -->|"calls Tauri"| node_backend
node_ui -->|"shows history"| node_historyui
node_ui -->|"shows insights"| node_insightsui
node_ui -->|"shows dictionary"| node_dictionaryui
node_ui -->|"shows settings"| node_settingsui
node_ui -->|"starts setup"| node_onboarding
node_ui -->|"shows updates"| node_updatesui
node_user -->|"presses shortcut"| node_shortcuts
node_shortcuts -->|"starts or stops"| node_coordinator
node_coordinator -->|"records audio"| node_capture
node_coordinator -->|"submits recording"| node_pipeline
node_pipeline -->|"requests transcript"| node_transcribe
node_transcribe -.->|"uses cloud model"| node_cloud
node_transcribe -->|"requests local model"| node_engineclient
node_engineprocess -->|"connects transport"| node_engineclient
node_engineprocess -->|"launches sidecar"| node_swift
node_pipeline -->|"formats transcript"| node_format
node_pipeline -.->|"requests cleanup"| node_cloud
node_cloud -.->|"sends provider requests"| node_providers
node_pipeline -->|"delivers text"| node_delivery
node_delivery -->|"pastes text"| node_frontmost
node_pipeline -->|"writes history"| node_store
node_historyui -->|"loads entries"| node_uiapi
node_historybackend -->|"reads and writes"| node_store
node_dictionarybackend -->|"reads and writes"| node_store
node_insightsbackend -->|"reads insights"| node_store
node_settingsbackend -->|"reads and writes"| node_store
node_modelsbackend -->|"manages models"| node_engineclient
node_settingsui -->|"updates preferences"| node_uiapi
node_dictionaryui -->|"edits terms"| node_uiapi
node_insightsui -->|"loads metrics"| node_uiapi
node_updatesui -->|"checks updates"| node_uiapi

click node_ui "https://github.com/yuyudhan/simple-voice/blob/main/src/app/App.tsx"
click node_uiapi "https://github.com/yuyudhan/simple-voice/blob/main/src/lib/api.ts"
click node_historyui "https://github.com/yuyudhan/simple-voice/blob/main/src/features/history/HistoryPage.tsx"
click node_insightsui "https://github.com/yuyudhan/simple-voice/blob/main/src/features/insights/InsightsPage.tsx"
click node_dictionaryui "https://github.com/yuyudhan/simple-voice/blob/main/src/features/dictionary/DictionaryPage.tsx"
click node_settingsui "https://github.com/yuyudhan/simple-voice/blob/main/src/features/settings/SettingsPage.tsx"
click node_onboarding "https://github.com/yuyudhan/simple-voice/blob/main/src/features/onboarding/Onboarding.tsx"
click node_updatesui "https://github.com/yuyudhan/simple-voice/blob/main/src/features/updates/UpdateBanner.tsx"
click node_backend "https://github.com/yuyudhan/simple-voice/blob/main/src-tauri/src/lib.rs"
click node_shortcuts "https://github.com/yuyudhan/simple-voice/blob/main/src-tauri/src/platform/shortcuts.rs"
click node_coordinator "https://github.com/yuyudhan/simple-voice/blob/main/src-tauri/src/features/dictation/coordinator.rs"
click node_capture "https://github.com/yuyudhan/simple-voice/blob/main/crates/sv-audio/src/capture.rs"
click node_pipeline "https://github.com/yuyudhan/simple-voice/blob/main/src-tauri/src/features/dictation/pipeline.rs"
click node_transcribe "https://github.com/yuyudhan/simple-voice/blob/main/src-tauri/src/features/dictation/transcription.rs"
click node_format "https://github.com/yuyudhan/simple-voice/blob/main/crates/sv-text/src/lib.rs"
click node_delivery "https://github.com/yuyudhan/simple-voice/blob/main/src-tauri/src/features/dictation/delivery.rs"
click node_cloud "https://github.com/yuyudhan/simple-voice/blob/main/crates/sv-cloud/src/lib.rs"
click node_engineclient "https://github.com/yuyudhan/simple-voice/blob/main/crates/sv-engine/src/client.rs"
click node_engineprocess "https://github.com/yuyudhan/simple-voice/blob/main/src-tauri/src/platform/engine_process.rs"
click node_swift "https://github.com/yuyudhan/simple-voice/blob/main/engine/Sources/SimpleVoiceEngine/main.swift"
click node_store "https://github.com/yuyudhan/simple-voice/blob/main/crates/sv-storage/src/db.rs"
click node_historybackend "https://github.com/yuyudhan/simple-voice/blob/main/src-tauri/src/features/history/mod.rs"
click node_dictionarybackend "https://github.com/yuyudhan/simple-voice/blob/main/src-tauri/src/features/dictionary/mod.rs"
click node_insightsbackend "https://github.com/yuyudhan/simple-voice/blob/main/src-tauri/src/features/insights/mod.rs"
click node_settingsbackend "https://github.com/yuyudhan/simple-voice/blob/main/src-tauri/src/features/settings/mod.rs"
click node_modelsbackend "https://github.com/yuyudhan/simple-voice/blob/main/src-tauri/src/features/models/mod.rs"

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_ui,node_uiapi,node_historyui,node_insightsui,node_dictionaryui,node_settingsui,node_onboarding,node_updatesui,node_user toneBlue
class node_coordinator,node_capture,node_pipeline,node_transcribe,node_format,node_delivery toneAmber
class node_cloud,node_engineclient,node_swift,node_modelsbackend toneMint
class node_store,node_historybackend,node_dictionarybackend,node_insightsbackend,node_settingsbackend toneRose
class node_backend,node_shortcuts,node_engineprocess,node_frontmost,node_providers toneIndigo
```

## Components

### App interface

- [App shell and pages](https://github.com/yuyudhan/simple-voice/blob/main/src/app/App.tsx): `src/app/App.tsx`
- [Tauri API client](https://github.com/yuyudhan/simple-voice/blob/main/src/lib/api.ts): `src/lib/api.ts`
- [History and search](https://github.com/yuyudhan/simple-voice/blob/main/src/features/history/HistoryPage.tsx): `src/features/history/HistoryPage.tsx`
- [Insights views](https://github.com/yuyudhan/simple-voice/blob/main/src/features/insights/InsightsPage.tsx): `src/features/insights/InsightsPage.tsx`
- [Dictionary editor](https://github.com/yuyudhan/simple-voice/blob/main/src/features/dictionary/DictionaryPage.tsx): `src/features/dictionary/DictionaryPage.tsx`
- [Settings and models](https://github.com/yuyudhan/simple-voice/blob/main/src/features/settings/SettingsPage.tsx): `src/features/settings/SettingsPage.tsx`
- [Onboarding](https://github.com/yuyudhan/simple-voice/blob/main/src/features/onboarding/Onboarding.tsx): `src/features/onboarding/Onboarding.tsx`
- [Update notices](https://github.com/yuyudhan/simple-voice/blob/main/src/features/updates/UpdateBanner.tsx): `src/features/updates/UpdateBanner.tsx`

### Dictation workflow

- [Dictation coordinator](https://github.com/yuyudhan/simple-voice/blob/main/src-tauri/src/features/dictation/coordinator.rs): `src-tauri/src/features/dictation/coordinator.rs`
- [Audio capture](https://github.com/yuyudhan/simple-voice/blob/main/crates/sv-audio/src/capture.rs): `crates/sv-audio/src/capture.rs`
- [Dictation pipeline](https://github.com/yuyudhan/simple-voice/blob/main/src-tauri/src/features/dictation/pipeline.rs): `src-tauri/src/features/dictation/pipeline.rs`
- [Transcription routing](https://github.com/yuyudhan/simple-voice/blob/main/src-tauri/src/features/dictation/transcription.rs): `src-tauri/src/features/dictation/transcription.rs`
- [Text formatting](https://github.com/yuyudhan/simple-voice/blob/main/crates/sv-text/src/lib.rs): `crates/sv-text/src/lib.rs`
- [Text delivery](https://github.com/yuyudhan/simple-voice/blob/main/src-tauri/src/features/dictation/delivery.rs): `src-tauri/src/features/dictation/delivery.rs`

### Speech and cleanup

- [Cloud providers](https://github.com/yuyudhan/simple-voice/blob/main/crates/sv-cloud/src/lib.rs): `crates/sv-cloud/src/lib.rs`
- [Engine client](https://github.com/yuyudhan/simple-voice/blob/main/crates/sv-engine/src/client.rs): `crates/sv-engine/src/client.rs`
- [On-device speech engine](https://github.com/yuyudhan/simple-voice/blob/main/engine/Sources/SimpleVoiceEngine/main.swift): `engine/Sources/SimpleVoiceEngine/main.swift`
- [Model management](https://github.com/yuyudhan/simple-voice/blob/main/src-tauri/src/features/models/mod.rs): `src-tauri/src/features/models/mod.rs`

### Local data

- [SQLite data store](https://github.com/yuyudhan/simple-voice/blob/main/crates/sv-storage/src/db.rs): `crates/sv-storage/src/db.rs`
- [History operations](https://github.com/yuyudhan/simple-voice/blob/main/src-tauri/src/features/history/mod.rs): `src-tauri/src/features/history/mod.rs`
- [Dictionary operations](https://github.com/yuyudhan/simple-voice/blob/main/src-tauri/src/features/dictionary/mod.rs): `src-tauri/src/features/dictionary/mod.rs`
- [Insights operations](https://github.com/yuyudhan/simple-voice/blob/main/src-tauri/src/features/insights/mod.rs): `src-tauri/src/features/insights/mod.rs`
- [Settings operations](https://github.com/yuyudhan/simple-voice/blob/main/src-tauri/src/features/settings/mod.rs): `src-tauri/src/features/settings/mod.rs`

### macOS integration

- [Tauri application](https://github.com/yuyudhan/simple-voice/blob/main/src-tauri/src/lib.rs): `src-tauri/src/lib.rs`
- [Shortcuts and tray](https://github.com/yuyudhan/simple-voice/blob/main/src-tauri/src/platform/shortcuts.rs): `src-tauri/src/platform/shortcuts.rs`
- [Engine sidecar process](https://github.com/yuyudhan/simple-voice/blob/main/src-tauri/src/platform/engine_process.rs): `src-tauri/src/platform/engine_process.rs`

### Other components

- **Mac user**
- **Frontmost app**
- **Cloud services**

## Connections

- Mac user → App shell and pages: uses app
- App shell and pages → Tauri API client: invokes commands
- Tauri API client → Tauri application: calls Tauri
- App shell and pages → History and search: shows history
- App shell and pages → Insights views: shows insights
- App shell and pages → Dictionary editor: shows dictionary
- App shell and pages → Settings and models: shows settings
- App shell and pages → Onboarding: starts setup
- App shell and pages → Update notices: shows updates
- Mac user → Shortcuts and tray: presses shortcut
- Shortcuts and tray → Dictation coordinator: starts or stops
- Dictation coordinator → Audio capture: records audio
- Dictation coordinator → Dictation pipeline: submits recording
- Dictation pipeline → Transcription routing: requests transcript
- Transcription routing → Cloud providers: uses cloud model
- Transcription routing → Engine client: requests local model
- Engine sidecar process → Engine client: connects transport
- Engine sidecar process → On-device speech engine: launches sidecar
- Dictation pipeline → Text formatting: formats transcript
- Dictation pipeline → Cloud providers: requests cleanup
- Cloud providers → Cloud services: sends provider requests
- Dictation pipeline → Text delivery: delivers text
- Text delivery → Frontmost app: pastes text
- Dictation pipeline → SQLite data store: writes history
- History and search → Tauri API client: loads entries
- History operations → SQLite data store: reads and writes
- Dictionary operations → SQLite data store: reads and writes
- Insights operations → SQLite data store: reads insights
- Settings operations → SQLite data store: reads and writes
- Model management → Engine client: manages models
- Settings and models → Tauri API client: updates preferences
- Dictionary editor → Tauri API client: edits terms
- Insights views → Tauri API client: loads metrics
- Update notices → Tauri API client: checks updates
