# fjenn/wispr-bro architecture

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

- Interactive diagram: https://gitdiagram.com/fjenn/wispr-bro
- Repository: https://github.com/fjenn/wispr-bro

## Overview

Wispr Bro is a local-first macOS dictation app. The main user workflow is to invoke a shortcut, record speech, transcribe it locally, clean the text, and insert it into the active app; the README describes this flow, while the sampled hotkey engine shows dispatch into the transcription coordinator. Other documented product branches include model management, writing aids, history, context awareness, settings, synchronization, and background updates. Several backend stages are unsampled, so their internal links are marked unverified rather than inferred as observed calls.

Main entry points: [`src/App.tsx`](https://github.com/fjenn/wispr-bro/blob/main/src/App.tsx) (App shell), [`src-tauri/src/fork/llm`](https://github.com/fjenn/wispr-bro/tree/main/src-tauri/src/fork/llm) (Text cleanup), [`src-tauri/src/managers/transcription.rs`](https://github.com/fjenn/wispr-bro/blob/main/src-tauri/src/managers/transcription.rs) (Speech transcription), [`src-tauri/src/transcription_coordinator.rs`](https://github.com/fjenn/wispr-bro/blob/main/src-tauri/src/transcription_coordinator.rs) (Transcription coordinator)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["App interaction"]
  node_app["App shell<br/>[App.tsx]"]
  node_bindings["Tauri bindings<br/>[bindings.ts]"]
  node_settings_ui["Settings UI<br/>[useSettings.ts]"]
  node_shortcut["Shortcut engine<br/>[engine.rs]"]
end

subgraph group_speech["Dictation pipeline"]
  node_coordinator["Transcription coordinator"]
  node_recorder["Audio capture<br/>[engine.rs]"]
  node_transcription["Speech transcription<br/>[transcription.rs]"]
  node_audio_tools["Audio processing"]
end

subgraph group_writing["Writing tools"]
  node_cleanup["Text cleanup"]
  node_api_cleanup["Provider cleanup<br/>[llm_client.rs]"]
  node_insertion["Text insertion"]
  node_dictionary["Dictionary"]
  node_snippets["Snippets"]
  node_context["Context awareness"]
end

subgraph group_state["Local state"]
  node_history[("History")]
  node_models["Model management"]
  node_settings[("Settings storage<br/>[settings.rs]")]
  node_sync["Sync"]
end

subgraph group_platform["Platform services"]
  node_updates["App updates"]
end

node_user(("User"))
node_active_app["Active app"]
node_local_models[("On-device models")]
node_release_feed["Signed release feed"]

node_user -->|"invokes"| node_shortcut
node_shortcut -->|"dispatches commands"| node_coordinator
node_user -.->|"speaks"| node_recorder
node_coordinator -.->|"starts capture"| node_recorder
node_recorder -.->|"provides audio"| node_transcription
node_transcription -.->|"processes audio"| node_audio_tools
node_transcription -.->|"produces transcript"| node_cleanup
node_cleanup -.->|"uses provider"| node_api_cleanup
node_cleanup -.->|"uses local models"| node_local_models
node_coordinator -.->|"delivers text"| node_insertion
node_insertion -->|"inserts text"| node_active_app
node_app -->|"invokes commands"| node_bindings
node_bindings -.->|"serves settings"| node_settings_ui
node_settings_ui -.->|"reads and updates"| node_settings
node_cleanup -.->|"uses vocabulary"| node_dictionary
node_cleanup -.->|"uses context"| node_context
node_app -.->|"offers snippets"| node_snippets
node_transcription -.->|"stores results"| node_history
node_app -.->|"manages models"| node_models
node_app -.->|"supports sync"| node_sync
node_app -.->|"checks updates"| node_updates
node_updates -->|"checks signed feed"| node_release_feed

click node_app "https://github.com/fjenn/wispr-bro/blob/main/src/App.tsx"
click node_bindings "https://github.com/fjenn/wispr-bro/blob/main/src/bindings.ts"
click node_settings_ui "https://github.com/fjenn/wispr-bro/blob/main/src/hooks/useSettings.ts"
click node_shortcut "https://github.com/fjenn/wispr-bro/blob/main/src-tauri/src/fork/shortcut/engine.rs"
click node_coordinator "https://github.com/fjenn/wispr-bro/blob/main/src-tauri/src/transcription_coordinator.rs"
click node_recorder "https://github.com/fjenn/wispr-bro/blob/main/src-tauri/crates/wb-handy-recorder/src/capture/engine.rs"
click node_transcription "https://github.com/fjenn/wispr-bro/blob/main/src-tauri/src/managers/transcription.rs"
click node_audio_tools "https://github.com/fjenn/wispr-bro/tree/main/src-tauri/src/audio_toolkit"
click node_cleanup "https://github.com/fjenn/wispr-bro/tree/main/src-tauri/src/fork/llm"
click node_api_cleanup "https://github.com/fjenn/wispr-bro/blob/main/src-tauri/src/llm_client.rs"
click node_insertion "https://github.com/fjenn/wispr-bro/tree/main/src-tauri/src/fork/insert"
click node_dictionary "https://github.com/fjenn/wispr-bro/tree/main/src-tauri/src/fork/dictionary"
click node_snippets "https://github.com/fjenn/wispr-bro/tree/main/src-tauri/src/fork/snippets"
click node_context "https://github.com/fjenn/wispr-bro/tree/main/src-tauri/src/fork/context"
click node_history "https://github.com/fjenn/wispr-bro/tree/main/src-tauri/src/fork/db"
click node_models "https://github.com/fjenn/wispr-bro/tree/main/src-tauri/src/fork/models"
click node_settings "https://github.com/fjenn/wispr-bro/blob/main/src-tauri/src/settings.rs"
click node_sync "https://github.com/fjenn/wispr-bro/tree/main/src-tauri/src/fork/sync"
click node_updates "https://github.com/fjenn/wispr-bro/tree/main/src-tauri/src/fork/update"

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_app,node_bindings,node_settings_ui,node_shortcut,node_user toneBlue
class node_coordinator,node_recorder,node_transcription,node_audio_tools,node_local_models toneAmber
class node_cleanup,node_api_cleanup,node_insertion,node_dictionary,node_snippets,node_context toneMint
class node_history,node_models,node_settings,node_sync toneRose
class node_updates,node_active_app,node_release_feed toneIndigo
```

## Components

### App interaction

- [App shell](https://github.com/fjenn/wispr-bro/blob/main/src/App.tsx): `src/App.tsx`
- [Tauri bindings](https://github.com/fjenn/wispr-bro/blob/main/src/bindings.ts): `src/bindings.ts`
- [Settings UI](https://github.com/fjenn/wispr-bro/blob/main/src/hooks/useSettings.ts): `src/hooks/useSettings.ts`
- [Shortcut engine](https://github.com/fjenn/wispr-bro/blob/main/src-tauri/src/fork/shortcut/engine.rs): `src-tauri/src/fork/shortcut/engine.rs`

### Dictation pipeline

- [Transcription coordinator](https://github.com/fjenn/wispr-bro/blob/main/src-tauri/src/transcription_coordinator.rs): `src-tauri/src/transcription_coordinator.rs`
- [Audio capture](https://github.com/fjenn/wispr-bro/blob/main/src-tauri/crates/wb-handy-recorder/src/capture/engine.rs): `src-tauri/crates/wb-handy-recorder/src/capture/engine.rs`
- [Speech transcription](https://github.com/fjenn/wispr-bro/blob/main/src-tauri/src/managers/transcription.rs): `src-tauri/src/managers/transcription.rs`
- [Audio processing](https://github.com/fjenn/wispr-bro/tree/main/src-tauri/src/audio_toolkit): `src-tauri/src/audio_toolkit`

### Writing tools

- [Text cleanup](https://github.com/fjenn/wispr-bro/tree/main/src-tauri/src/fork/llm): `src-tauri/src/fork/llm`
- [Provider cleanup](https://github.com/fjenn/wispr-bro/blob/main/src-tauri/src/llm_client.rs): `src-tauri/src/llm_client.rs`
- [Text insertion](https://github.com/fjenn/wispr-bro/tree/main/src-tauri/src/fork/insert): `src-tauri/src/fork/insert`
- [Dictionary](https://github.com/fjenn/wispr-bro/tree/main/src-tauri/src/fork/dictionary): `src-tauri/src/fork/dictionary`
- [Snippets](https://github.com/fjenn/wispr-bro/tree/main/src-tauri/src/fork/snippets): `src-tauri/src/fork/snippets`
- [Context awareness](https://github.com/fjenn/wispr-bro/tree/main/src-tauri/src/fork/context): `src-tauri/src/fork/context`

### Local state

- [History](https://github.com/fjenn/wispr-bro/tree/main/src-tauri/src/fork/db): `src-tauri/src/fork/db`
- [Model management](https://github.com/fjenn/wispr-bro/tree/main/src-tauri/src/fork/models): `src-tauri/src/fork/models`
- [Settings storage](https://github.com/fjenn/wispr-bro/blob/main/src-tauri/src/settings.rs): `src-tauri/src/settings.rs`
- [Sync](https://github.com/fjenn/wispr-bro/tree/main/src-tauri/src/fork/sync): `src-tauri/src/fork/sync`

### Platform services

- [App updates](https://github.com/fjenn/wispr-bro/tree/main/src-tauri/src/fork/update): `src-tauri/src/fork/update`

### Other components

- **User**
- **Active app**
- **On-device models**
- **Signed release feed**

## Connections

- User → Shortcut engine: invokes
- Shortcut engine → Transcription coordinator: dispatches commands (evidence: `src-tauri/src/fork/shortcut/engine.rs`)
- User → Audio capture: speaks
- Transcription coordinator → Audio capture: starts capture
- Audio capture → Speech transcription: provides audio
- Speech transcription → Audio processing: processes audio
- Speech transcription → Text cleanup: produces transcript
- Text cleanup → Provider cleanup: uses provider (evidence: `src-tauri/src/llm_client.rs`)
- Text cleanup → On-device models: uses local models
- Transcription coordinator → Text insertion: delivers text
- Text insertion → Active app: inserts text
- App shell → Tauri bindings: invokes commands (evidence: `src/App.tsx`)
- Tauri bindings → Settings UI: serves settings (evidence: `src/hooks/useSettings.ts`)
- Settings UI → Settings storage: reads and updates
- Text cleanup → Dictionary: uses vocabulary
- Text cleanup → Context awareness: uses context
- App shell → Snippets: offers snippets
- Speech transcription → History: stores results
- App shell → Model management: manages models
- App shell → Sync: supports sync
- App shell → App updates: checks updates
- App updates → Signed release feed: checks signed feed
