# haydenharms/plexi architecture

> Architecture diagram of the GitHub repository haydenharms/plexi, 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/haydenharms/plexi
- Repository: https://github.com/haydenharms/plexi

## Overview

Plexi is a Rust handwriting notebook with an always-on-top screen-annotation mode. The main workflow is user input through the app and canvas into a document model, with autosave/reopen and export/print as outcomes; it also supports screen snipping, PDF/image import, handwriting-font creation, recording, GIF display, and updates. The graph combines excerpted call relationships with README-documented capabilities; source files not excerpted were not inspected, so some feature links are documented rather than implementation-level.

Main entry points: [`crates/plexi/src/app.rs`](https://github.com/haydenharms/plexi/blob/main/crates/plexi/src/app.rs) (App and modes), [`crates/plexi/src/canvas.rs`](https://github.com/haydenharms/plexi/blob/main/crates/plexi/src/canvas.rs) (Canvas interaction), [`crates/plexi-core/src/export/mod.rs`](https://github.com/haydenharms/plexi/blob/main/crates/plexi-core/src/export/mod.rs) (Export formats), [`crates/plexi-core/src/model.rs`](https://github.com/haydenharms/plexi/blob/main/crates/plexi-core/src/model.rs) (Document model)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application"]
  node_app["App and modes<br/>[app.rs]"]
  node_ui["Toolbar and commands<br/>[ui.rs]"]
  node_config["Settings and paths<br/>[config.rs]"]
  node_platform["Window and hotkeys<br/>[platform.rs]"]
  node_instance["Instance handling<br/>[instance.rs]"]
  node_updater["Update checks<br/>[updater.rs]"]
end

subgraph group_doc["Notebook and drawing"]
  node_canvas["Canvas interaction<br/>[canvas.rs]"]
  node_history["Undo history<br/>[history.rs]"]
  node_model["Document model<br/>[model.rs]"]
  node_ink["Pressure ink geometry<br/>[ink.rs]"]
  node_geom["Geometry helpers<br/>[geom.rs]"]
end

subgraph group_io["Import and export"]
  node_format["Notebook persistence<br/>[format.rs]"]
  node_exportlayout["Export layout<br/>[layout.rs]"]
  node_export["Export formats<br/>[mod.rs]"]
  node_svg["SVG rendering<br/>[svg.rs]"]
  node_raster["Raster rendering<br/>[raster.rs]"]
  node_pdf["PDF output<br/>[pdf.rs]"]
  node_interop["Interchange output<br/>[interop.rs]"]
  node_textout["Text and markup<br/>[text.rs]"]
  node_pdfimport["PDF import<br/>[pdf_import.rs]"]
end

subgraph group_features["Capture and extensions"]
  node_fonts["Font services<br/>[fonts.rs]"]
  node_handwriting["Handwriting fonts<br/>[handwriting.rs]"]
  node_record["Screen recording<br/>[record.rs]"]
  node_reel["GIF playback<br/>[reel.rs]"]
  node_cutout["Image background removal<br/>[cutout.rs]"]
  node_gif["GIF decoding<br/>[gif.rs]"]
end

node_user(("User"))
node_storage[("Local note files")]
node_screen["Desktop screen"]

node_user -->|"uses"| node_ui
node_ui -->|"invokes commands"| node_app
node_app -->|"renders canvas"| node_canvas
node_canvas -.->|"edits document"| node_model
node_canvas -.->|"records changes"| node_history
node_canvas -.->|"builds strokes"| node_ink
node_ink -->|"uses geometry"| node_geom
node_app -->|"loads settings"| node_config
node_app -.->|"controls overlay"| node_platform
node_app -.->|"coordinates instances"| node_instance
node_app -.->|"checks updates"| node_updater
node_app -.->|"owns document"| node_model
node_app -.->|"saves and opens"| node_format
node_format -->|"serializes"| node_model
node_format -.->|"reads and writes"| node_storage
node_app -.->|"imports dropped PDFs"| node_pdfimport
node_pdfimport -.->|"creates pages"| node_model
node_app -.->|"starts export"| node_export
node_export -->|"plans frames"| node_exportlayout
node_export -->|"builds visual output"| node_svg
node_svg -->|"renders raster"| node_raster
node_svg -->|"renders PDF"| node_pdf
node_export -->|"writes interchange"| node_interop
node_export -->|"writes text formats"| node_textout
node_app -->|"opens font editor"| node_handwriting
node_handwriting -.->|"registers font"| node_fonts
node_handwriting -->|"loads preferences"| node_config
node_app -.->|"starts recording"| node_record
node_record -->|"captures screen"| node_platform
node_app -.->|"manages playback"| node_reel
node_app -->|"removes image background"| node_cutout
node_canvas -.->|"displays animation"| node_gif
node_user -->|"draws over"| node_screen
node_platform -.->|"hosts overlay"| node_screen

click node_app "https://github.com/haydenharms/plexi/blob/main/crates/plexi/src/app.rs"
click node_ui "https://github.com/haydenharms/plexi/blob/main/crates/plexi/src/ui.rs"
click node_config "https://github.com/haydenharms/plexi/blob/main/crates/plexi/src/config.rs"
click node_platform "https://github.com/haydenharms/plexi/blob/main/crates/plexi/src/platform.rs"
click node_instance "https://github.com/haydenharms/plexi/blob/main/crates/plexi/src/instance.rs"
click node_updater "https://github.com/haydenharms/plexi/blob/main/crates/plexi/src/updater.rs"
click node_canvas "https://github.com/haydenharms/plexi/blob/main/crates/plexi/src/canvas.rs"
click node_history "https://github.com/haydenharms/plexi/blob/main/crates/plexi/src/history.rs"
click node_model "https://github.com/haydenharms/plexi/blob/main/crates/plexi-core/src/model.rs"
click node_ink "https://github.com/haydenharms/plexi/blob/main/crates/plexi-core/src/ink.rs"
click node_geom "https://github.com/haydenharms/plexi/blob/main/crates/plexi-core/src/geom.rs"
click node_format "https://github.com/haydenharms/plexi/blob/main/crates/plexi-core/src/format.rs"
click node_exportlayout "https://github.com/haydenharms/plexi/blob/main/crates/plexi-core/src/export/layout.rs"
click node_export "https://github.com/haydenharms/plexi/blob/main/crates/plexi-core/src/export/mod.rs"
click node_svg "https://github.com/haydenharms/plexi/blob/main/crates/plexi-core/src/export/svg.rs"
click node_raster "https://github.com/haydenharms/plexi/blob/main/crates/plexi-core/src/export/raster.rs"
click node_pdf "https://github.com/haydenharms/plexi/blob/main/crates/plexi-core/src/export/pdf.rs"
click node_interop "https://github.com/haydenharms/plexi/blob/main/crates/plexi-core/src/export/interop.rs"
click node_textout "https://github.com/haydenharms/plexi/blob/main/crates/plexi-core/src/export/text.rs"
click node_pdfimport "https://github.com/haydenharms/plexi/blob/main/crates/plexi-core/src/pdf_import.rs"
click node_fonts "https://github.com/haydenharms/plexi/blob/main/crates/plexi-core/src/fonts.rs"
click node_handwriting "https://github.com/haydenharms/plexi/blob/main/crates/plexi/src/handwriting.rs"
click node_record "https://github.com/haydenharms/plexi/blob/main/crates/plexi/src/record.rs"
click node_reel "https://github.com/haydenharms/plexi/blob/main/crates/plexi/src/reel.rs"
click node_cutout "https://github.com/haydenharms/plexi/blob/main/crates/plexi-core/src/cutout.rs"
click node_gif "https://github.com/haydenharms/plexi/blob/main/crates/plexi-core/src/gif.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_app,node_ui,node_config,node_platform,node_instance,node_updater,node_user,node_screen toneBlue
class node_canvas,node_history,node_model,node_ink,node_geom,node_storage toneAmber
class node_format,node_exportlayout,node_export,node_svg,node_raster,node_pdf,node_interop,node_textout,node_pdfimport toneMint
class node_fonts,node_handwriting,node_record,node_reel,node_cutout,node_gif toneRose
```

## Components

### Application

- [App and modes](https://github.com/haydenharms/plexi/blob/main/crates/plexi/src/app.rs): `crates/plexi/src/app.rs`
- [Toolbar and commands](https://github.com/haydenharms/plexi/blob/main/crates/plexi/src/ui.rs): `crates/plexi/src/ui.rs`
- [Settings and paths](https://github.com/haydenharms/plexi/blob/main/crates/plexi/src/config.rs): `crates/plexi/src/config.rs`
- [Window and hotkeys](https://github.com/haydenharms/plexi/blob/main/crates/plexi/src/platform.rs): `crates/plexi/src/platform.rs`
- [Instance handling](https://github.com/haydenharms/plexi/blob/main/crates/plexi/src/instance.rs): `crates/plexi/src/instance.rs`
- [Update checks](https://github.com/haydenharms/plexi/blob/main/crates/plexi/src/updater.rs): `crates/plexi/src/updater.rs`

### Notebook and drawing

- [Canvas interaction](https://github.com/haydenharms/plexi/blob/main/crates/plexi/src/canvas.rs): `crates/plexi/src/canvas.rs`
- [Undo history](https://github.com/haydenharms/plexi/blob/main/crates/plexi/src/history.rs): `crates/plexi/src/history.rs`
- [Document model](https://github.com/haydenharms/plexi/blob/main/crates/plexi-core/src/model.rs): `crates/plexi-core/src/model.rs`
- [Pressure ink geometry](https://github.com/haydenharms/plexi/blob/main/crates/plexi-core/src/ink.rs): `crates/plexi-core/src/ink.rs`
- [Geometry helpers](https://github.com/haydenharms/plexi/blob/main/crates/plexi-core/src/geom.rs): `crates/plexi-core/src/geom.rs`

### Import and export

- [Notebook persistence](https://github.com/haydenharms/plexi/blob/main/crates/plexi-core/src/format.rs): `crates/plexi-core/src/format.rs`
- [Export layout](https://github.com/haydenharms/plexi/blob/main/crates/plexi-core/src/export/layout.rs): `crates/plexi-core/src/export/layout.rs`
- [Export formats](https://github.com/haydenharms/plexi/blob/main/crates/plexi-core/src/export/mod.rs): `crates/plexi-core/src/export/mod.rs`
- [SVG rendering](https://github.com/haydenharms/plexi/blob/main/crates/plexi-core/src/export/svg.rs): `crates/plexi-core/src/export/svg.rs`
- [Raster rendering](https://github.com/haydenharms/plexi/blob/main/crates/plexi-core/src/export/raster.rs): `crates/plexi-core/src/export/raster.rs`
- [PDF output](https://github.com/haydenharms/plexi/blob/main/crates/plexi-core/src/export/pdf.rs): `crates/plexi-core/src/export/pdf.rs`
- [Interchange output](https://github.com/haydenharms/plexi/blob/main/crates/plexi-core/src/export/interop.rs): `crates/plexi-core/src/export/interop.rs`
- [Text and markup](https://github.com/haydenharms/plexi/blob/main/crates/plexi-core/src/export/text.rs): `crates/plexi-core/src/export/text.rs`
- [PDF import](https://github.com/haydenharms/plexi/blob/main/crates/plexi-core/src/pdf_import.rs): `crates/plexi-core/src/pdf_import.rs`

### Capture and extensions

- [Font services](https://github.com/haydenharms/plexi/blob/main/crates/plexi-core/src/fonts.rs): `crates/plexi-core/src/fonts.rs`
- [Handwriting fonts](https://github.com/haydenharms/plexi/blob/main/crates/plexi/src/handwriting.rs): `crates/plexi/src/handwriting.rs`
- [Screen recording](https://github.com/haydenharms/plexi/blob/main/crates/plexi/src/record.rs): `crates/plexi/src/record.rs`
- [GIF playback](https://github.com/haydenharms/plexi/blob/main/crates/plexi/src/reel.rs): `crates/plexi/src/reel.rs`
- [Image background removal](https://github.com/haydenharms/plexi/blob/main/crates/plexi-core/src/cutout.rs): `crates/plexi-core/src/cutout.rs`
- [GIF decoding](https://github.com/haydenharms/plexi/blob/main/crates/plexi-core/src/gif.rs): `crates/plexi-core/src/gif.rs`

### Other components

- **User**
- **Local note files**
- **Desktop screen**

## Connections

- User → Toolbar and commands: uses (evidence: `README.md`)
- Toolbar and commands → App and modes: invokes commands (evidence: `crates/plexi/src/ui.rs`)
- App and modes → Canvas interaction: renders canvas (evidence: `crates/plexi/src/ui.rs`)
- Canvas interaction → Document model: edits document
- Canvas interaction → Undo history: records changes (evidence: `crates/plexi/src/canvas.rs`)
- Canvas interaction → Pressure ink geometry: builds strokes
- Pressure ink geometry → Geometry helpers: uses geometry (evidence: `crates/plexi-core/src/ink.rs`)
- App and modes → Settings and paths: loads settings (evidence: `crates/plexi/src/app.rs`)
- App and modes → Window and hotkeys: controls overlay (evidence: `crates/plexi/src/app.rs`)
- App and modes → Instance handling: coordinates instances (evidence: `crates/plexi/src/app.rs`)
- App and modes → Update checks: checks updates (evidence: `crates/plexi/src/app.rs`)
- App and modes → Document model: owns document
- App and modes → Notebook persistence: saves and opens
- Notebook persistence → Document model: serializes (evidence: `crates/plexi-core/src/format.rs`)
- Notebook persistence → Local note files: reads and writes
- App and modes → PDF import: imports dropped PDFs
- PDF import → Document model: creates pages (evidence: `crates/plexi-core/src/pdf_import.rs`)
- App and modes → Export formats: starts export
- Export formats → Export layout: plans frames (evidence: `crates/plexi-core/src/export/mod.rs`)
- Export formats → SVG rendering: builds visual output (evidence: `crates/plexi-core/src/export/mod.rs`)
- SVG rendering → Raster rendering: renders raster (evidence: `crates/plexi-core/src/export/raster.rs`)
- SVG rendering → PDF output: renders PDF (evidence: `crates/plexi-core/src/export/pdf.rs`)
- Export formats → Interchange output: writes interchange (evidence: `crates/plexi-core/src/export/mod.rs`)
- Export formats → Text and markup: writes text formats (evidence: `crates/plexi-core/src/export/mod.rs`)
- App and modes → Handwriting fonts: opens font editor (evidence: `crates/plexi/src/app.rs`)
- Handwriting fonts → Font services: registers font
- Handwriting fonts → Settings and paths: loads preferences (evidence: `crates/plexi/src/handwriting.rs`)
- App and modes → Screen recording: starts recording (evidence: `crates/plexi/src/app.rs`)
- Screen recording → Window and hotkeys: captures screen (evidence: `crates/plexi/src/record.rs`)
- App and modes → GIF playback: manages playback (evidence: `crates/plexi/src/reel.rs`)
- App and modes → Image background removal: removes image background (evidence: `crates/plexi/src/app.rs`)
- Canvas interaction → GIF decoding: displays animation
- User → Desktop screen: draws over (evidence: `README.md`)
- Window and hotkeys → Desktop screen: hosts overlay
