# indkhan/fieldnote architecture

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

- Interactive diagram: https://gitdiagram.com/indkhan/fieldnote
- Repository: https://github.com/indkhan/fieldnote

## Overview

Fieldnote is a local desktop notebook for interview projects, questionnaires, sessions, custom project fields, and recordings. Users choose a project, capture session details and answers, manage recordings, then export selected or matching sessions—or prepare a folder handoff for an external coding agent. The frontend invokes Tauri commands; the Rust backend provides domain operations over local SQLite and media files. The graph preserves documented capabilities, but several backend command implementations and frontend views were not excerpted, so those internal links are omitted where their call paths are not evidenced.

Main entry points: [`src/main.ts`](https://github.com/indkhan/fieldnote/blob/main/src/main.ts) (Desktop UI), [`src-tauri/src/lib.rs`](https://github.com/indkhan/fieldnote/blob/main/src-tauri/src/lib.rs) (Tauri command layer), [`src-tauri/src/store.rs`](https://github.com/indkhan/fieldnote/blob/main/src-tauri/src/store.rs) (SQLite workspace), [`src-tauri/src/export.rs`](https://github.com/indkhan/fieldnote/blob/main/src-tauri/src/export.rs) (Session export)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Desktop experience"]
  node_frontend["Desktop UI<br/>[main.ts]"]
  node_overview["Project overview<br/>[overview-ui.ts]"]
  node_field_ui["Field controls<br/>[property-ui.ts]"]
  node_save_queue["Save queue<br/>[save-queue.mjs]"]
  node_property_queue["Field save queue<br/>[property-queue.mjs]"]
  node_update_policy["Update policy<br/>[update-policy.mjs]"]
end

subgraph group_sessions["Projects and sessions"]
  node_domain["Notebook data model<br/>[model.rs]"]
  node_properties["Project fields<br/>[properties.rs]"]
end

subgraph group_media["Recordings and exports"]
  node_attachment["Session attachments<br/>[attachments.rs]"]
  node_recorder["Audio recording<br/>[recorder.rs]"]
  node_export["Session export<br/>[export.rs]"]
  node_handoff["Agent folder handoff<br/>[handoff.rs]"]
end

subgraph group_platform["Local platform"]
  node_tauri["Tauri command layer<br/>[lib.rs]"]
  node_sqlite[("SQLite workspace<br/>[store.rs]")]
  node_migration["Workspace migration<br/>[migrate.rs]"]
end

node_user(("Researcher"))
node_external_agent(("External coding agent"))
node_update_service(("Release service"))

node_user -->|"uses"| node_frontend
node_frontend -->|"renders"| node_overview
node_overview -->|"uses controls"| node_field_ui
node_frontend -->|"queues saves"| node_save_queue
node_frontend -->|"queues field saves"| node_property_queue
node_frontend -->|"invokes commands"| node_tauri
node_frontend -->|"applies policy"| node_update_policy
node_tauri -->|"runs database operations"| node_sqlite
node_tauri -->|"uses data types"| node_domain
node_tauri -->|"moves legacy data"| node_migration
node_tauri -->|"recovers recordings"| node_recorder
node_tauri -->|"exports sessions"| node_export
node_sqlite -->|"stores records"| node_domain
node_sqlite -.->|"stores field data"| node_properties
node_sqlite -.->|"tracks attachments"| node_attachment
node_sqlite -.->|"tracks audio metadata"| node_recorder
node_export -->|"collects session data"| node_sqlite
node_handoff -->|"formats session content"| node_export
node_tauri -->|"prepares handoff"| node_handoff
node_user -->|"pastes message"| node_external_agent
node_frontend -.->|"checks releases"| node_update_service

click node_frontend "https://github.com/indkhan/fieldnote/blob/main/src/main.ts"
click node_overview "https://github.com/indkhan/fieldnote/blob/main/src/overview-ui.ts"
click node_field_ui "https://github.com/indkhan/fieldnote/blob/main/src/property-ui.ts"
click node_save_queue "https://github.com/indkhan/fieldnote/blob/main/src/save-queue.mjs"
click node_property_queue "https://github.com/indkhan/fieldnote/blob/main/src/property-queue.mjs"
click node_update_policy "https://github.com/indkhan/fieldnote/blob/main/src/update-policy.mjs"
click node_tauri "https://github.com/indkhan/fieldnote/blob/main/src-tauri/src/lib.rs"
click node_domain "https://github.com/indkhan/fieldnote/blob/main/src-tauri/src/model.rs"
click node_sqlite "https://github.com/indkhan/fieldnote/blob/main/src-tauri/src/store.rs"
click node_migration "https://github.com/indkhan/fieldnote/blob/main/src-tauri/src/migrate.rs"
click node_properties "https://github.com/indkhan/fieldnote/blob/main/src-tauri/src/properties.rs"
click node_attachment "https://github.com/indkhan/fieldnote/blob/main/src-tauri/src/attachments.rs"
click node_recorder "https://github.com/indkhan/fieldnote/blob/main/src-tauri/src/recorder.rs"
click node_export "https://github.com/indkhan/fieldnote/blob/main/src-tauri/src/export.rs"
click node_handoff "https://github.com/indkhan/fieldnote/blob/main/src-tauri/src/handoff.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_frontend,node_overview,node_field_ui,node_save_queue,node_property_queue,node_update_policy toneBlue
class node_domain,node_properties toneAmber
class node_attachment,node_recorder,node_export,node_handoff toneMint
class node_tauri,node_sqlite,node_migration toneRose
class node_user,node_external_agent,node_update_service toneIndigo
```

## Components

### Desktop experience

- [Desktop UI](https://github.com/indkhan/fieldnote/blob/main/src/main.ts): `src/main.ts`
- [Project overview](https://github.com/indkhan/fieldnote/blob/main/src/overview-ui.ts): `src/overview-ui.ts`
- [Field controls](https://github.com/indkhan/fieldnote/blob/main/src/property-ui.ts): `src/property-ui.ts`
- [Save queue](https://github.com/indkhan/fieldnote/blob/main/src/save-queue.mjs): `src/save-queue.mjs`
- [Field save queue](https://github.com/indkhan/fieldnote/blob/main/src/property-queue.mjs): `src/property-queue.mjs`
- [Update policy](https://github.com/indkhan/fieldnote/blob/main/src/update-policy.mjs): `src/update-policy.mjs`

### Projects and sessions

- [Notebook data model](https://github.com/indkhan/fieldnote/blob/main/src-tauri/src/model.rs): `src-tauri/src/model.rs`
- [Project fields](https://github.com/indkhan/fieldnote/blob/main/src-tauri/src/properties.rs): `src-tauri/src/properties.rs`

### Recordings and exports

- [Session attachments](https://github.com/indkhan/fieldnote/blob/main/src-tauri/src/attachments.rs): `src-tauri/src/attachments.rs`
- [Audio recording](https://github.com/indkhan/fieldnote/blob/main/src-tauri/src/recorder.rs): `src-tauri/src/recorder.rs`
- [Session export](https://github.com/indkhan/fieldnote/blob/main/src-tauri/src/export.rs): `src-tauri/src/export.rs`
- [Agent folder handoff](https://github.com/indkhan/fieldnote/blob/main/src-tauri/src/handoff.rs): `src-tauri/src/handoff.rs`

### Local platform

- [Tauri command layer](https://github.com/indkhan/fieldnote/blob/main/src-tauri/src/lib.rs): `src-tauri/src/lib.rs`
- [SQLite workspace](https://github.com/indkhan/fieldnote/blob/main/src-tauri/src/store.rs): `src-tauri/src/store.rs`
- [Workspace migration](https://github.com/indkhan/fieldnote/blob/main/src-tauri/src/migrate.rs): `src-tauri/src/migrate.rs`

### Other components

- **Researcher**
- **External coding agent**
- **Release service**

## Connections

- Researcher → Desktop UI: uses (evidence: `README.md`)
- Desktop UI → Project overview: renders (evidence: `src/main.ts`)
- Project overview → Field controls: uses controls (evidence: `src/overview-ui.ts`)
- Desktop UI → Save queue: queues saves (evidence: `src/main.ts`)
- Desktop UI → Field save queue: queues field saves (evidence: `src/main.ts`)
- Desktop UI → Tauri command layer: invokes commands (evidence: `src/main.ts`)
- Desktop UI → Update policy: applies policy (evidence: `src/main.ts`)
- Tauri command layer → SQLite workspace: runs database operations (evidence: `src-tauri/src/lib.rs`)
- Tauri command layer → Notebook data model: uses data types (evidence: `src-tauri/src/lib.rs`)
- Tauri command layer → Workspace migration: moves legacy data (evidence: `src-tauri/src/lib.rs`)
- Tauri command layer → Audio recording: recovers recordings (evidence: `src-tauri/src/lib.rs`)
- Tauri command layer → Session export: exports sessions (evidence: `src-tauri/src/lib.rs`)
- SQLite workspace → Notebook data model: stores records (evidence: `src-tauri/src/store.rs`)
- SQLite workspace → Project fields: stores field data
- SQLite workspace → Session attachments: tracks attachments
- SQLite workspace → Audio recording: tracks audio metadata
- Session export → SQLite workspace: collects session data (evidence: `src-tauri/src/export.rs`)
- Agent folder handoff → Session export: formats session content (evidence: `src-tauri/src/handoff.rs`)
- Tauri command layer → Agent folder handoff: prepares handoff (evidence: `src-tauri/src/lib.rs`)
- Researcher → External coding agent: pastes message (evidence: `README.md`)
- Desktop UI → Release service: checks releases (evidence: `README.md`)
