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#

LayerTechnologyDetail
ShellElectron 33Chromium + Node in one process
BuildViteSub-second HMR
UIReact 18 + TypeScriptStrict types, zero any
EditorMonaco EditorCustom protocol, fully offline
Terminalnode-pty + xterm.jsReal PTY, not emulated
StateZustandOne store per domain
Databasebetter-sqlite3WAL mode, main process only
Gitsimple-gitBranch, stash, tag, push
Packageelectron-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 suites

IPC Architecture#

The IPC layer bridges the renderer (UI) and main process (backend). Each domain has its own handler file:

electron/ipc/
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:

  • useEditorStore for open files, active tab, and editor state
  • useWalletStore for wallet connection, balances, and tokens
  • useAgentStore for active agents, sessions, and Grind Mode state
  • useGitStore for branch, status, diff, and stash
  • useTerminalStore for 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.