System Overview
High-level architecture
Loading diagram…
Key design decisions
Offline-first with local state as primary
The client Zustand store is the source of truth for the UI. IndexedDB backs it for persistence across page reloads. The server is consulted for reconciliation, not for every read.
Push-on-mutation, pull-on-focus sync
- Push: triggered by local mutations, batched and debounced.
- Pull: happens once on load and again when the browser tab regains focus. No background polling timer.
This eliminates idle network traffic while still keeping multiple clients in sync.
Layered storage with clear role separation
Each storage layer (IDB, D1, KV, R2) has a distinct job. See Storage Layers for details.
AI is split into focused endpoints
Each AI workflow has its own API route with appropriate safety controls. See AI Overview.
Optimistic updates throughout
All user actions update local state immediately, then push to the server asynchronously. The UI never blocks on a network round-trip.
Component map
| Component | Description |
|---|---|
BoardCanvas | 6000×30000 canvas with draggable note cards |
DocumentEditor | Primary editing surface (note + Jira item editors) |
SidebarShell | Left sidebar: Board / Jira Backlog / Notes Directory tabs |
AiPanel | Right slide-out AI chat drawer |
SubagentNote | Floating AI assistant panel |
BoardHydrator | Initialises local state from IDB and D1 on mount |
D1SyncManager | Handles push/pull sync lifecycle |
ChangeLogger | Debounced changelog writer to R2 |
See also
- State Management — Zustand store and optimistic update pattern
- Sync Engine — How push/pull sync works in detail
- Storage Layers — Role of each storage tier