technology / architecture
Architecture
Inside one desktop app, the interface, the Rust core and a sidecar divide the work. Nothing depends on an external server of ours.
process model
Processes
- webview
- The interface and document editing. Loads the statically exported Next.js app
- core (Rust)
- The app itself: database, sync, image processing and OS integration
- sidecar (Node.js)
- The AI loop and MCP server. Listens on the device loopback only
- llama-server
- Started only when local models are used
responsibilities
Layer responsibilities
- Three channels
Interface to Rust uses Tauri commands and events, interface to sidecar uses loopback HTTP and SSE, and AI clients reach the sidecar over MCP.
- Narrow write paths
The sidecar opens the document database read-only. Only the interface’s save path writes to documents.
- Heavy work in the background
Image processing and sync run on separate threads and report results through events.
image ingest
Image ingest
Pasted images are downscaled in Rust so documents stay small. On Mac, ImageIO also reads HEIC and AVIF.
image ingest
- max_edge
- 1600 px (never upscaled)
- encode
- JPEG (quality 84) when opaque; PNG when pixels are actually transparent
- passthrough
- SVG and GIF are not converted
- input limit
- 60 MiB / 120 megapixels
local ports
Local ports
All listen on 127.0.0.1 only and are not exposed outside the device.
- 8091
- Sidecar (including MCP)
- 8094
- Sidecar (App Store edition)
- 8080
- Local writing model (only when used)
- 8098
- Local template-selection model (only when used)