# skye-cyber/organon architecture

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

- Interactive diagram: https://gitdiagram.com/skye-cyber/organon
- Repository: https://github.com/skye-cyber/organon

## Overview

Organon is a digital reader for Aristotle’s six-treatise Organon. Readers open the workspace, navigate and read paragraphs with Bekker references, then annotate, search, look up terms, and track reading progress. The React store coordinates reader state and persistence through a Tauri bridge to SQLite; search and dictionary features also include local/on-device and optional web-backed paths. The README documents several capabilities whose detailed implementation was not sampled, so those branches are included with documented relationships only.

Main entry points: [`src/App.tsx`](https://github.com/skye-cyber/organon/blob/main/src/App.tsx) (App shell), [`src/store/readerStore.ts`](https://github.com/skye-cyber/organon/blob/main/src/store/readerStore.ts) (Reader state), [`src/components/SearchModal.tsx`](https://github.com/skye-cyber/organon/blob/main/src/components/SearchModal.tsx) (Search dialog), [`src/components/Reader.tsx`](https://github.com/skye-cyber/organon/blob/main/src/components/Reader.tsx) (Reader)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workspace["Reader workspace"]
  node_reader["Reader<br/>[Reader.tsx]"]
  node_toc["Contents<br/>[SidebarTOC.tsx]"]
  node_header["Reader controls<br/>[Header.tsx]"]
  node_typography["Typography"]
  node_zen["Focus mode"]
  node_progress["Reading goals"]
  node_app["App shell<br/>[App.tsx]"]
end

subgraph group_study["Study tools"]
  node_notes["Notes and highlights<br/>[NotesPanel.tsx]"]
  node_selection["Text selection"]
  node_shortcuts["Shortcut reference"]
end

subgraph group_services["Search and lookup"]
  node_search["Search dialog<br/>[SearchModal.tsx]"]
  node_semantic["Semantic search<br/>[semanticSearch.ts]"]
  node_dictionary["Dictionary lookup<br/>[dictionaryApi.ts]"]
  node_dictmodal["Dictionary card"]
end

subgraph group_runtime["State and storage"]
  node_readerstate["Reader state<br/>[readerStore.ts]"]
  node_bridge["Tauri API bridge<br/>[tauriApi.ts]"]
  node_commands["Native commands<br/>[commands.rs]"]
  node_database[("SQLite persistence<br/>[db.rs]")]
  node_native["Tauri setup<br/>[lib.rs]"]
end

node_corpus["Organon text"]
node_vectors["Paragraph vectors<br/>[embeddings.json]"]
node_readeractor(("Reader"))
node_dictionaryservice["Dictionary API"]
node_wikipedia["Wikipedia"]

node_readeractor -->|"opens"| node_app
node_app -->|"renders"| node_header
node_app -->|"renders"| node_toc
node_app -->|"renders"| node_reader
node_app -->|"renders"| node_notes
node_app -->|"renders"| node_selection
node_app -->|"renders"| node_search
node_app -->|"renders"| node_dictmodal
node_app -->|"renders"| node_zen
node_app -->|"renders"| node_progress
node_reader -->|"reads state"| node_readerstate
node_toc -->|"reads state"| node_readerstate
node_header -->|"reads state"| node_readerstate
node_typography -->|"updates settings"| node_readerstate
node_notes -->|"uses state"| node_readerstate
node_selection -->|"uses state"| node_readerstate
node_search -->|"reads corpus"| node_readerstate
node_search -->|"runs semantic search"| node_semantic
node_search -->|"jumps to text"| node_reader
node_readerstate -->|"looks up terms"| node_dictionary
node_dictmodal -->|"uses state"| node_readerstate
node_dictionary -.->|"requests definitions"| node_dictionaryservice
node_dictionary -.->|"requests context"| node_wikipedia
node_readerstate -->|"uses persistence API"| node_bridge
node_bridge -->|"invokes handlers"| node_commands
node_commands -->|"uses database"| node_database
node_native -->|"registers handlers"| node_commands
node_native -->|"initializes"| node_database
node_corpus -.->|"provides text"| node_reader
node_vectors -.->|"supports similarity"| node_semantic

click node_reader "https://github.com/skye-cyber/organon/blob/main/src/components/Reader.tsx"
click node_toc "https://github.com/skye-cyber/organon/blob/main/src/components/SidebarTOC.tsx"
click node_header "https://github.com/skye-cyber/organon/blob/main/src/components/Header.tsx"
click node_typography "https://github.com/skye-cyber/organon/blob/main/src/components/TypographyPopover.tsx"
click node_zen "https://github.com/skye-cyber/organon/blob/main/src/components/ZenModeControls.tsx"
click node_progress "https://github.com/skye-cyber/organon/blob/main/src/components/ReadingProgress.tsx"
click node_app "https://github.com/skye-cyber/organon/blob/main/src/App.tsx"
click node_notes "https://github.com/skye-cyber/organon/blob/main/src/components/NotesPanel.tsx"
click node_selection "https://github.com/skye-cyber/organon/blob/main/src/components/SelectionPopover.tsx"
click node_shortcuts "https://github.com/skye-cyber/organon/blob/main/src/components/KeyboardShortcutsModal.tsx"
click node_search "https://github.com/skye-cyber/organon/blob/main/src/components/SearchModal.tsx"
click node_semantic "https://github.com/skye-cyber/organon/blob/main/src/lib/semanticSearch.ts"
click node_dictionary "https://github.com/skye-cyber/organon/blob/main/src/lib/dictionaryApi.ts"
click node_dictmodal "https://github.com/skye-cyber/organon/blob/main/src/components/DictionaryModal.tsx"
click node_readerstate "https://github.com/skye-cyber/organon/blob/main/src/store/readerStore.ts"
click node_bridge "https://github.com/skye-cyber/organon/blob/main/src/lib/tauriApi.ts"
click node_commands "https://github.com/skye-cyber/organon/blob/main/src-tauri/src/commands.rs"
click node_database "https://github.com/skye-cyber/organon/blob/main/src-tauri/src/db.rs"
click node_native "https://github.com/skye-cyber/organon/blob/main/src-tauri/src/lib.rs"
click node_corpus "https://github.com/skye-cyber/organon/blob/main/data/organon_english.json"
click node_vectors "https://github.com/skye-cyber/organon/blob/main/data/embeddings.json"

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_reader,node_toc,node_header,node_typography,node_zen,node_progress,node_app toneBlue
class node_notes,node_selection,node_shortcuts toneAmber
class node_search,node_semantic,node_dictionary,node_dictmodal,node_dictionaryservice toneMint
class node_readerstate,node_bridge,node_commands,node_database,node_native toneRose
class node_corpus,node_vectors toneTeal
class node_readeractor,node_wikipedia toneIndigo
```

## Components

### Reader workspace

- [Reader](https://github.com/skye-cyber/organon/blob/main/src/components/Reader.tsx): `src/components/Reader.tsx`
- [Contents](https://github.com/skye-cyber/organon/blob/main/src/components/SidebarTOC.tsx): `src/components/SidebarTOC.tsx`
- [Reader controls](https://github.com/skye-cyber/organon/blob/main/src/components/Header.tsx): `src/components/Header.tsx`
- [Typography](https://github.com/skye-cyber/organon/blob/main/src/components/TypographyPopover.tsx): `src/components/TypographyPopover.tsx`
- [Focus mode](https://github.com/skye-cyber/organon/blob/main/src/components/ZenModeControls.tsx): `src/components/ZenModeControls.tsx`
- [Reading goals](https://github.com/skye-cyber/organon/blob/main/src/components/ReadingProgress.tsx): `src/components/ReadingProgress.tsx`
- [App shell](https://github.com/skye-cyber/organon/blob/main/src/App.tsx): `src/App.tsx`

### Study tools

- [Notes and highlights](https://github.com/skye-cyber/organon/blob/main/src/components/NotesPanel.tsx): `src/components/NotesPanel.tsx`
- [Text selection](https://github.com/skye-cyber/organon/blob/main/src/components/SelectionPopover.tsx): `src/components/SelectionPopover.tsx`
- [Shortcut reference](https://github.com/skye-cyber/organon/blob/main/src/components/KeyboardShortcutsModal.tsx): `src/components/KeyboardShortcutsModal.tsx`

### Search and lookup

- [Search dialog](https://github.com/skye-cyber/organon/blob/main/src/components/SearchModal.tsx): `src/components/SearchModal.tsx`
- [Semantic search](https://github.com/skye-cyber/organon/blob/main/src/lib/semanticSearch.ts): `src/lib/semanticSearch.ts`
- [Dictionary lookup](https://github.com/skye-cyber/organon/blob/main/src/lib/dictionaryApi.ts): `src/lib/dictionaryApi.ts`
- [Dictionary card](https://github.com/skye-cyber/organon/blob/main/src/components/DictionaryModal.tsx): `src/components/DictionaryModal.tsx`

### State and storage

- [Reader state](https://github.com/skye-cyber/organon/blob/main/src/store/readerStore.ts): `src/store/readerStore.ts`
- [Tauri API bridge](https://github.com/skye-cyber/organon/blob/main/src/lib/tauriApi.ts): `src/lib/tauriApi.ts`
- [Native commands](https://github.com/skye-cyber/organon/blob/main/src-tauri/src/commands.rs): `src-tauri/src/commands.rs`
- [SQLite persistence](https://github.com/skye-cyber/organon/blob/main/src-tauri/src/db.rs): `src-tauri/src/db.rs`
- [Tauri setup](https://github.com/skye-cyber/organon/blob/main/src-tauri/src/lib.rs): `src-tauri/src/lib.rs`

### Other components

- [Organon text](https://github.com/skye-cyber/organon/blob/main/data/organon_english.json): `data/organon_english.json`
- [Paragraph vectors](https://github.com/skye-cyber/organon/blob/main/data/embeddings.json): `data/embeddings.json`
- **Reader**
- **Dictionary API**
- **Wikipedia**

## Connections

- Reader → App shell: opens
- App shell → Reader controls: renders (evidence: `src/App.tsx`)
- App shell → Contents: renders (evidence: `src/App.tsx`)
- App shell → Reader: renders (evidence: `src/App.tsx`)
- App shell → Notes and highlights: renders (evidence: `src/App.tsx`)
- App shell → Text selection: renders (evidence: `src/App.tsx`)
- App shell → Search dialog: renders (evidence: `src/App.tsx`)
- App shell → Dictionary card: renders (evidence: `src/App.tsx`)
- App shell → Focus mode: renders (evidence: `src/App.tsx`)
- App shell → Reading goals: renders (evidence: `src/App.tsx`)
- Reader → Reader state: reads state (evidence: `src/components/Reader.tsx`)
- Contents → Reader state: reads state (evidence: `src/components/SidebarTOC.tsx`)
- Reader controls → Reader state: reads state (evidence: `src/components/Header.tsx`)
- Typography → Reader state: updates settings (evidence: `src/components/TypographyPopover.tsx`)
- Notes and highlights → Reader state: uses state (evidence: `src/components/NotesPanel.tsx`)
- Text selection → Reader state: uses state (evidence: `src/components/SelectionPopover.tsx`)
- Search dialog → Reader state: reads corpus (evidence: `src/components/SearchModal.tsx`)
- Search dialog → Semantic search: runs semantic search (evidence: `src/components/SearchModal.tsx`)
- Search dialog → Reader: jumps to text (evidence: `README.md`)
- Reader state → Dictionary lookup: looks up terms (evidence: `src/store/readerStore.ts`)
- Dictionary card → Reader state: uses state (evidence: `src/components/DictionaryModal.tsx`)
- Dictionary lookup → Dictionary API: requests definitions (evidence: `src/lib/dictionaryApi.ts`)
- Dictionary lookup → Wikipedia: requests context (evidence: `src/lib/dictionaryApi.ts`)
- Reader state → Tauri API bridge: uses persistence API (evidence: `src/store/readerStore.ts`)
- Tauri API bridge → Native commands: invokes handlers (evidence: `README.md`)
- Native commands → SQLite persistence: uses database (evidence: `src-tauri/src/commands.rs`)
- Tauri setup → Native commands: registers handlers (evidence: `src-tauri/src/lib.rs`)
- Tauri setup → SQLite persistence: initializes (evidence: `src-tauri/src/lib.rs`)
- Organon text → Reader: provides text (evidence: `README.md`)
- Paragraph vectors → Semantic search: supports similarity (evidence: `README.md`)
