Architecture
Not a fork. Not a wrapper. A standalone Electron app built intentionally for Solana development.
Core Principles#
1. Process Isolation
All database and filesystem access runs in the main process. The renderer never touches SQLite directly. Everything flows through typed IPC handlers. This ensures stability, security, and clean separation of concerns.
2. Typed IPC Contract
Every IPC handler returns { ok, data } or { ok, error }. No raw throws across the Electron bridge. There are 20 IPC modules covering agents, wallet, git, terminals, and more.
3. Offline First
The Monaco editor runs through a custom protocol handler registered in Electron's main process. Zero network requests for core editing. Your code stays on your machine.
4. Native Modules
better-sqlite3 and node-pty are unpacked from ASAR for production builds. Real PTY sessions, real database. Not browser polyfills pretending to be native.
Tech Stack#
| Layer | Technology | Detail |
|---|---|---|
| Shell | Electron 33 | Chromium + Node in one process |
| Build | Vite | Sub-second HMR |
| UI | React 18 + TypeScript | Strict types, zero any |
| Editor | Monaco Editor | Custom protocol, fully offline |
| Terminal | node-pty + xterm.js | Real PTY, not emulated |
| State | Zustand | One store per domain |
| Database | better-sqlite3 | WAL mode, main process only |
| Git | simple-git | Branch, stash, tag, push |
| Package | electron-builder | .exe + .dmg, auto-update |
Project Structure#
electron/
main/ App entry, windows, protocols
ipc/ One handler per domain (20 modules)
services/ Business logic layer
db/ SQLite schema, migrations, WAL
shared/ Types shared between main and renderer
src/
panels/ One directory per UI panel (21 panels)
store/ Zustand state management
plugins/ Plugin registry + lazy loading
components/ Shared UI primitives
styles/ Global CSS tokens and base styles
test/ Vitest test suitesIPC Architecture#
The IPC layer bridges the renderer (UI) and main process (backend). Each domain has its own handler file:
agents.ts Agent spawning and management
wallet.ts Wallet operations and Helius API
git.ts Git operations via simple-git
terminal.ts PTY session management
editor.ts File operations and Monaco protocol
deploy.ts Vercel and Railway deployment
settings.ts User preferences and configuration
tokens.ts Token tracking and PumpFun integration
... (20 modules total)State Management#
DAEMON uses Zustand with one store per domain:
useEditorStorefor open files, active tab, and editor stateuseWalletStorefor wallet connection, balances, and tokensuseAgentStorefor active agents, sessions, and Grind Mode stateuseGitStorefor branch, status, diff, and stashuseTerminalStorefor terminal sessions, splits, and history
Database#
DAEMON uses better-sqlite3 in WAL (Write-Ahead Logging) mode for fast concurrent reads. The database runs exclusively in the main process and stores user settings, agent session history, token tracking data, project configurations, and the MCP server registry.