Contributing

How to set up DAEMON for local development and submit contributions.

Getting Started#

Terminal
git clone https://github.com/nullxnothing/daemon.git
cd daemon
pnpm install
pnpm run dev

In a second terminal, run the type checker in watch mode:

pnpm run typecheck:watch

Requirements#

RequirementVersion
Node.js22+
pnpm9+
OSWindows or macOS (Linux experimental)

Development Commands#

CommandDescription
pnpm run devStart dev server with hot reload
pnpm run typecheckRun TypeScript checks
pnpm run testRun the test suite
pnpm run buildProduction build
pnpm run packageCreate distributable (.exe / .dmg)
pnpm run rebuildRebuild native modules

Native Modules#

better-sqlite3 and node-pty are C++ native modules rebuilt automatically via postinstall. If you hit issues after pnpm install:

pnpm run rebuild

Architecture#

electron/          Main process - IPC handlers, services, database
  ipc/             One handler file per domain
  services/        Business logic (never imported from renderer)
  db/              SQLite schema + migrations
  shared/          Types shared between main and renderer

src/               Renderer - React 18 + TypeScript
  panels/          One directory per panel
  store/           Zustand stores
  components/      Shared UI components

styles/            Global CSS tokens and base styles
test/              Vitest test suites

Rules#

  • All DB access stays in the main process. Renderer uses IPC only
  • All IPC handlers use IpcHandlerFactory and return { ok, data/error }
  • CSS Modules only, no Tailwind. Follow existing token system
  • No emoji in UI chrome. Status via colored dots only
  • Test with pnpm run package before PRs that touch native modules

Commit Convention#

PrefixUse
feat:New feature
fix:Bug fix
refactor:Code change (not a fix or feature)
docs:Documentation only
test:Adding or updating tests
chore:Maintenance tasks

Pull Requests#

  • Keep PRs focused. One feature or fix per PR
  • Include screenshots for UI changes
  • Ensure pnpm run typecheck and pnpm run test pass
  • Fill out the PR template