# fastrepl/anarlog architecture

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

- Interactive diagram: https://gitdiagram.com/fastrepl/anarlog
- Repository: https://github.com/fastrepl/anarlog
- Video tour (about a minute): https://gitdiagram.com/fastrepl/anarlog/video

## Overview

Anarlog is a local-first desktop meeting notepad: it captures device audio, transcribes it, stores sessions and notes locally, then supports note editing, AI summaries/chat, and export. CloudSync, sharing, hosted AI, integrations, and companion clients extend that workflow but are optional. The README documents the product stages; source excerpts show selected implementation details, so edges for unsampled subsystems are limited to documented relationships.

Main entry points: [`apps/desktop/src/session/components/note-input/index.tsx`](https://github.com/fastrepl/anarlog/blob/main/apps/desktop/src/session/components/note-input/index.tsx) (Session notes and transcripts), [`crates/listener-core/src/actors/source/pipeline.rs`](https://github.com/fastrepl/anarlog/blob/main/crates/listener-core/src/actors/source/pipeline.rs) (Device audio capture), [`apps/desktop/src/ai`](https://github.com/fastrepl/anarlog/tree/main/apps/desktop/src/ai) (Transcription providers), [`apps/desktop/src/main.tsx`](https://github.com/fastrepl/anarlog/blob/main/apps/desktop/src/main.tsx) (Desktop workspace)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_capture["Capture and transcription"]
  node_audio["Device audio capture<br/>[pipeline.rs]"]
  node_transcription["Transcription providers"]
  node_diarization["Speaker diarization<br/>[pipeline.rs]"]
end

subgraph group_workspace["Local meeting workspace"]
  node_desktop["Desktop workspace<br/>[main.tsx]"]
  node_localdb[("Local SQLite and files<br/>[index.ts]")]
  node_notes["Session notes and transcripts<br/>[index.tsx]"]
  node_editor["Note editor and tasks<br/>[tasks.ts]"]
  node_calendar["Calendar and sessions<br/>[index.tsx]"]
end

subgraph group_intelligence["AI and automation"]
  node_ai["Summary and chat"]
  node_providers["Local and hosted AI providers"]
  node_automations["Workflow automations<br/>[engine.ts]"]
  node_export["Markdown export<br/>[markdown-export.ts]"]
end

subgraph group_cloud["Cloud services"]
  node_sync["Encrypted CloudSync<br/>[cloudsync.ts]"]
  node_sharing["Session sharing<br/>[index.tsx]"]
  node_hosted["Hosted API services<br/>[main.rs]"]
end

subgraph group_clients["Companion clients"]
  node_cli["CLI and MCP server<br/>[main.rs]"]
  node_mobile["Mobile client<br/>[controller.ts]"]
  node_watch["Watch companion"]
end

node_person(("Meeting user"))

node_person -->|"starts recording"| node_audio
node_audio -->|"transcribes audio"| node_transcription
node_transcription -->|"produces transcript"| node_notes
node_notes -->|"stores locally"| node_localdb
node_person -->|"uses workspace"| node_desktop
node_desktop -.->|"edits sessions"| node_notes
node_notes -.->|"opens for editing"| node_editor
node_notes -->|"provides meeting context"| node_ai
node_ai -->|"uses selected model"| node_providers
node_person -.->|"connects calendar"| node_calendar
node_notes -.->|"triggers workflows"| node_automations
node_automations -->|"exports Markdown"| node_export
node_localdb -->|"syncs when enabled"| node_sync
node_notes -->|"shares when enabled"| node_sharing
node_providers -.->|"calls hosted AI"| node_hosted
node_person -->|"uses local tools"| node_cli
node_person -->|"uses beta client"| node_mobile
node_person -->|"uses companion"| node_watch
node_audio -.->|"identifies speakers"| node_diarization

click node_audio "https://github.com/fastrepl/anarlog/blob/main/crates/listener-core/src/actors/source/pipeline.rs"
click node_transcription "https://github.com/fastrepl/anarlog/tree/main/apps/desktop/src/ai"
click node_diarization "https://github.com/fastrepl/anarlog/blob/main/crates/pyannote-local/src/pipeline.rs"
click node_desktop "https://github.com/fastrepl/anarlog/blob/main/apps/desktop/src/main.tsx"
click node_localdb "https://github.com/fastrepl/anarlog/blob/main/apps/desktop/src/db/index.ts"
click node_notes "https://github.com/fastrepl/anarlog/blob/main/apps/desktop/src/session/components/note-input/index.tsx"
click node_editor "https://github.com/fastrepl/anarlog/blob/main/packages/editor/src/tasks.ts"
click node_calendar "https://github.com/fastrepl/anarlog/blob/main/apps/desktop/src/calendar/index.tsx"
click node_ai "https://github.com/fastrepl/anarlog/blob/main/apps/desktop/src/chat/context/use-chat-context-pipeline.ts"
click node_providers "https://github.com/fastrepl/anarlog/blob/main/apps/desktop/src/ai/hooks/useLLMConnection.ts"
click node_automations "https://github.com/fastrepl/anarlog/blob/main/apps/desktop/src/automations/engine.ts"
click node_export "https://github.com/fastrepl/anarlog/blob/main/apps/desktop/src/automations/markdown-export.ts"
click node_sync "https://github.com/fastrepl/anarlog/blob/main/apps/desktop/src/auth/cloudsync.ts"
click node_sharing "https://github.com/fastrepl/anarlog/blob/main/apps/desktop/src/session-sharing/index.tsx"
click node_hosted "https://github.com/fastrepl/anarlog/blob/main/apps/api/src/main.rs"
click node_cli "https://github.com/fastrepl/anarlog/blob/main/apps/cli/src/main.rs"
click node_mobile "https://github.com/fastrepl/anarlog/blob/main/apps/mobile/src/sync/controller.ts"
click node_watch "https://github.com/fastrepl/anarlog/blob/main/apps/watch/apple/AnarlogWatch/WatchSyncController.swift"

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_audio,node_transcription,node_diarization,node_person toneBlue
class node_desktop,node_localdb,node_notes,node_editor,node_calendar toneAmber
class node_ai,node_providers,node_automations,node_export toneMint
class node_sync,node_sharing,node_hosted toneRose
class node_cli,node_mobile,node_watch toneIndigo
```

## Components

### Capture and transcription

- [Device audio capture](https://github.com/fastrepl/anarlog/blob/main/crates/listener-core/src/actors/source/pipeline.rs): `crates/listener-core/src/actors/source/pipeline.rs`
- [Transcription providers](https://github.com/fastrepl/anarlog/tree/main/apps/desktop/src/ai): `apps/desktop/src/ai`
- [Speaker diarization](https://github.com/fastrepl/anarlog/blob/main/crates/pyannote-local/src/pipeline.rs): `crates/pyannote-local/src/pipeline.rs`

### Local meeting workspace

- [Desktop workspace](https://github.com/fastrepl/anarlog/blob/main/apps/desktop/src/main.tsx): `apps/desktop/src/main.tsx`
- [Local SQLite and files](https://github.com/fastrepl/anarlog/blob/main/apps/desktop/src/db/index.ts): `apps/desktop/src/db/index.ts`
- [Session notes and transcripts](https://github.com/fastrepl/anarlog/blob/main/apps/desktop/src/session/components/note-input/index.tsx): `apps/desktop/src/session/components/note-input/index.tsx`
- [Note editor and tasks](https://github.com/fastrepl/anarlog/blob/main/packages/editor/src/tasks.ts): `packages/editor/src/tasks.ts`
- [Calendar and sessions](https://github.com/fastrepl/anarlog/blob/main/apps/desktop/src/calendar/index.tsx): `apps/desktop/src/calendar/index.tsx`

### AI and automation

- [Summary and chat](https://github.com/fastrepl/anarlog/blob/main/apps/desktop/src/chat/context/use-chat-context-pipeline.ts): `apps/desktop/src/chat/context/use-chat-context-pipeline.ts`
- [Local and hosted AI providers](https://github.com/fastrepl/anarlog/blob/main/apps/desktop/src/ai/hooks/useLLMConnection.ts): `apps/desktop/src/ai/hooks/useLLMConnection.ts`
- [Workflow automations](https://github.com/fastrepl/anarlog/blob/main/apps/desktop/src/automations/engine.ts): `apps/desktop/src/automations/engine.ts`
- [Markdown export](https://github.com/fastrepl/anarlog/blob/main/apps/desktop/src/automations/markdown-export.ts): `apps/desktop/src/automations/markdown-export.ts`

### Cloud services

- [Encrypted CloudSync](https://github.com/fastrepl/anarlog/blob/main/apps/desktop/src/auth/cloudsync.ts): `apps/desktop/src/auth/cloudsync.ts`
- [Session sharing](https://github.com/fastrepl/anarlog/blob/main/apps/desktop/src/session-sharing/index.tsx): `apps/desktop/src/session-sharing/index.tsx`
- [Hosted API services](https://github.com/fastrepl/anarlog/blob/main/apps/api/src/main.rs): `apps/api/src/main.rs`

### Companion clients

- [CLI and MCP server](https://github.com/fastrepl/anarlog/blob/main/apps/cli/src/main.rs): `apps/cli/src/main.rs`
- [Mobile client](https://github.com/fastrepl/anarlog/blob/main/apps/mobile/src/sync/controller.ts): `apps/mobile/src/sync/controller.ts`
- [Watch companion](https://github.com/fastrepl/anarlog/blob/main/apps/watch/apple/AnarlogWatch/WatchSyncController.swift): `apps/watch/apple/AnarlogWatch/WatchSyncController.swift`

### Other components

- **Meeting user**

## Connections

- Meeting user → Device audio capture: starts recording (evidence: `README.md`)
- Device audio capture → Transcription providers: transcribes audio (evidence: `README.md`)
- Transcription providers → Session notes and transcripts: produces transcript (evidence: `README.md`)
- Session notes and transcripts → Local SQLite and files: stores locally (evidence: `README.md`)
- Meeting user → Desktop workspace: uses workspace (evidence: `README.md`)
- Desktop workspace → Session notes and transcripts: edits sessions
- Session notes and transcripts → Note editor and tasks: opens for editing
- Session notes and transcripts → Summary and chat: provides meeting context (evidence: `README.md`)
- Summary and chat → Local and hosted AI providers: uses selected model (evidence: `README.md`)
- Meeting user → Calendar and sessions: connects calendar
- Session notes and transcripts → Workflow automations: triggers workflows
- Workflow automations → Markdown export: exports Markdown (evidence: `apps/desktop/src/automations/engine.ts`)
- Local SQLite and files → Encrypted CloudSync: syncs when enabled (evidence: `README.md`)
- Session notes and transcripts → Session sharing: shares when enabled (evidence: `README.md`)
- Local and hosted AI providers → Hosted API services: calls hosted AI
- Meeting user → CLI and MCP server: uses local tools (evidence: `README.md`)
- Meeting user → Mobile client: uses beta client (evidence: `README.md`)
- Meeting user → Watch companion: uses companion (evidence: `README.md`)
- Device audio capture → Speaker diarization: identifies speakers
