# michaelwilhelmsen/humla architecture

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

- Interactive diagram: https://gitdiagram.com/michaelwilhelmsen/humla
- Repository: https://github.com/michaelwilhelmsen/humla

## Overview

Humla is a local-first macOS meeting-notes app. The primary workflow is to capture microphone and system audio while taking notes, transcribe the recording, label speakers, and generate a summary combining the transcript with the user's notes. Users can then search and chat over notes, or expose read-only note retrieval through MCP. The graph combines explicit README capabilities with sampled frontend/backend wiring; unsampled subsystems are represented at their exact tree paths, and optional cloud/provider connections are marked dashed where appropriate.

Main entry points: [`src-tauri/src/commands.rs`](https://github.com/michaelwilhelmsen/humla/blob/main/src-tauri/src/commands.rs) (Tauri commands), [`src/lib/ipc.ts`](https://github.com/michaelwilhelmsen/humla/blob/main/src/lib/ipc.ts) (Frontend IPC), [`src-tauri/src/db.rs`](https://github.com/michaelwilhelmsen/humla/blob/main/src-tauri/src/db.rs) (SQLite database), [`src/pages/Note.tsx`](https://github.com/michaelwilhelmsen/humla/blob/main/src/pages/Note.tsx) (Note workspace)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Desktop app"]
  node_ui["App and routes<br/>[App.tsx]"]
  node_note_ui["Note workspace<br/>[Note.tsx]"]
  node_ipc["Frontend IPC<br/>[ipc.ts]"]
  node_commands["Tauri commands<br/>[commands.rs]"]
end

subgraph group_meeting["Meeting workflow"]
  node_recording["Audio recording<br/>[recording.rs]"]
  node_sessions["Recording sessions<br/>[sessions.rs]"]
  node_transcription["Speech transcription"]
  node_diarization["Speaker identification<br/>[diarize.rs]"]
  node_summary["Summary providers<br/>[openai.rs]"]
end

subgraph group_knowledge["Notes and retrieval"]
  node_notes["Note and folder views<br/>[AllNotes.tsx]"]
  node_chat_ui["Notes chat<br/>[Chat.tsx]"]
  node_chat["Retrieval and chat<br/>[mod.rs]"]
  node_mcp["MCP server<br/>[server.rs]"]
end

subgraph group_platform["Persistence and integrations"]
  node_database[("SQLite database<br/>[db.rs]")]
  node_cloud_commands["Cloud management<br/>[cloud.rs]"]
  node_sync_worker["Cloud sync worker<br/>[cloud_worker.rs]"]
  node_sync_engine["Sync engine<br/>[lib.rs]"]
end

node_user(("User"))
node_provider["Chosen providers"]
node_mcp_client(("MCP client"))

node_user -->|"uses"| node_ui
node_ui -->|"routes to"| node_note_ui
node_note_ui -->|"requests actions"| node_ipc
node_ipc -->|"invokes"| node_commands
node_commands -->|"starts and stops"| node_recording
node_recording -->|"stores takes"| node_sessions
node_commands -.->|"runs transcription"| node_transcription
node_commands -.->|"labels speakers"| node_diarization
node_commands -.->|"requests summary"| node_summary
node_provider -.->|"transcribes with"| node_transcription
node_provider -.->|"summarizes with"| node_summary
node_note_ui -.->|"edits and browses"| node_notes
node_notes -.->|"loads note data"| node_ipc
node_chat_ui -.->|"sends chat requests"| node_ipc
node_ipc -.->|"dispatches chat"| node_chat
node_chat -->|"searches notes"| node_database
node_mcp_client -.->|"requests note retrieval"| node_mcp
node_mcp -->|"reads notes"| node_database
node_commands -.->|"persists note data"| node_database
node_cloud_commands -.->|"calls cloud service"| node_provider
node_sync_worker -->|"starts and observes"| node_sync_engine
node_sync_worker -.->|"queues local mutations"| node_database

click node_ui "https://github.com/michaelwilhelmsen/humla/blob/main/src/App.tsx"
click node_note_ui "https://github.com/michaelwilhelmsen/humla/blob/main/src/pages/Note.tsx"
click node_ipc "https://github.com/michaelwilhelmsen/humla/blob/main/src/lib/ipc.ts"
click node_commands "https://github.com/michaelwilhelmsen/humla/blob/main/src-tauri/src/commands.rs"
click node_recording "https://github.com/michaelwilhelmsen/humla/blob/main/src-tauri/src/recording.rs"
click node_sessions "https://github.com/michaelwilhelmsen/humla/blob/main/src-tauri/src/sessions.rs"
click node_transcription "https://github.com/michaelwilhelmsen/humla/tree/main/src-tauri/src/stt"
click node_diarization "https://github.com/michaelwilhelmsen/humla/blob/main/src-tauri/src/diarize.rs"
click node_summary "https://github.com/michaelwilhelmsen/humla/blob/main/src-tauri/src/openai.rs"
click node_notes "https://github.com/michaelwilhelmsen/humla/blob/main/src/pages/AllNotes.tsx"
click node_chat_ui "https://github.com/michaelwilhelmsen/humla/blob/main/src/pages/Chat.tsx"
click node_chat "https://github.com/michaelwilhelmsen/humla/blob/main/src-tauri/src/chat/mod.rs"
click node_mcp "https://github.com/michaelwilhelmsen/humla/blob/main/src-tauri/src/mcp/server.rs"
click node_database "https://github.com/michaelwilhelmsen/humla/blob/main/src-tauri/src/db.rs"
click node_cloud_commands "https://github.com/michaelwilhelmsen/humla/blob/main/src-tauri/src/commands/cloud.rs"
click node_sync_worker "https://github.com/michaelwilhelmsen/humla/blob/main/src-tauri/src/commands/cloud_worker.rs"
click node_sync_engine "https://github.com/michaelwilhelmsen/humla/blob/main/src-tauri/crates/cloud-sync/src/lib.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_note_ui,node_ipc,node_commands,node_user,node_mcp_client toneBlue
class node_recording,node_sessions,node_transcription,node_diarization,node_summary toneAmber
class node_notes,node_chat_ui,node_chat,node_mcp toneMint
class node_database,node_cloud_commands,node_sync_worker,node_sync_engine toneRose
class node_provider toneIndigo
```

## Components

### Desktop app

- [App and routes](https://github.com/michaelwilhelmsen/humla/blob/main/src/App.tsx): `src/App.tsx`
- [Note workspace](https://github.com/michaelwilhelmsen/humla/blob/main/src/pages/Note.tsx): `src/pages/Note.tsx`
- [Frontend IPC](https://github.com/michaelwilhelmsen/humla/blob/main/src/lib/ipc.ts): `src/lib/ipc.ts`
- [Tauri commands](https://github.com/michaelwilhelmsen/humla/blob/main/src-tauri/src/commands.rs): `src-tauri/src/commands.rs`

### Meeting workflow

- [Audio recording](https://github.com/michaelwilhelmsen/humla/blob/main/src-tauri/src/recording.rs): `src-tauri/src/recording.rs`
- [Recording sessions](https://github.com/michaelwilhelmsen/humla/blob/main/src-tauri/src/sessions.rs): `src-tauri/src/sessions.rs`
- [Speech transcription](https://github.com/michaelwilhelmsen/humla/tree/main/src-tauri/src/stt): `src-tauri/src/stt`
- [Speaker identification](https://github.com/michaelwilhelmsen/humla/blob/main/src-tauri/src/diarize.rs): `src-tauri/src/diarize.rs`
- [Summary providers](https://github.com/michaelwilhelmsen/humla/blob/main/src-tauri/src/openai.rs): `src-tauri/src/openai.rs`

### Notes and retrieval

- [Note and folder views](https://github.com/michaelwilhelmsen/humla/blob/main/src/pages/AllNotes.tsx): `src/pages/AllNotes.tsx`
- [Notes chat](https://github.com/michaelwilhelmsen/humla/blob/main/src/pages/Chat.tsx): `src/pages/Chat.tsx`
- [Retrieval and chat](https://github.com/michaelwilhelmsen/humla/blob/main/src-tauri/src/chat/mod.rs): `src-tauri/src/chat/mod.rs`
- [MCP server](https://github.com/michaelwilhelmsen/humla/blob/main/src-tauri/src/mcp/server.rs): `src-tauri/src/mcp/server.rs`

### Persistence and integrations

- [SQLite database](https://github.com/michaelwilhelmsen/humla/blob/main/src-tauri/src/db.rs): `src-tauri/src/db.rs`
- [Cloud management](https://github.com/michaelwilhelmsen/humla/blob/main/src-tauri/src/commands/cloud.rs): `src-tauri/src/commands/cloud.rs`
- [Cloud sync worker](https://github.com/michaelwilhelmsen/humla/blob/main/src-tauri/src/commands/cloud_worker.rs): `src-tauri/src/commands/cloud_worker.rs`
- [Sync engine](https://github.com/michaelwilhelmsen/humla/blob/main/src-tauri/crates/cloud-sync/src/lib.rs): `src-tauri/crates/cloud-sync/src/lib.rs`

### Other components

- **User**
- **Chosen providers**
- **MCP client**

## Connections

- User → App and routes: uses
- App and routes → Note workspace: routes to (evidence: `src/App.tsx`)
- Note workspace → Frontend IPC: requests actions (evidence: `src/pages/Note.tsx`)
- Frontend IPC → Tauri commands: invokes (evidence: `src/lib/ipc.ts`)
- Tauri commands → Audio recording: starts and stops (evidence: `src-tauri/src/commands.rs`)
- Audio recording → Recording sessions: stores takes (evidence: `src-tauri/src/sessions.rs`)
- Tauri commands → Speech transcription: runs transcription (evidence: `src-tauri/src/commands.rs`)
- Tauri commands → Speaker identification: labels speakers (evidence: `src-tauri/src/commands.rs`)
- Tauri commands → Summary providers: requests summary
- Chosen providers → Speech transcription: transcribes with
- Chosen providers → Summary providers: summarizes with
- Note workspace → Note and folder views: edits and browses
- Note and folder views → Frontend IPC: loads note data
- Notes chat → Frontend IPC: sends chat requests
- Frontend IPC → Retrieval and chat: dispatches chat
- Retrieval and chat → SQLite database: searches notes (evidence: `src-tauri/src/chat/mod.rs`)
- MCP client → MCP server: requests note retrieval
- MCP server → SQLite database: reads notes (evidence: `src-tauri/src/mcp/server.rs`)
- Tauri commands → SQLite database: persists note data (evidence: `src-tauri/src/commands.rs`)
- Cloud management → Chosen providers: calls cloud service (evidence: `src-tauri/src/commands/cloud.rs`)
- Cloud sync worker → Sync engine: starts and observes (evidence: `src-tauri/src/commands/cloud_worker.rs`)
- Cloud sync worker → SQLite database: queues local mutations (evidence: `src-tauri/src/commands/cloud_worker.rs`)
