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 devIn a second terminal, run the type checker in watch mode:
pnpm run typecheck:watchRequirements#
| Requirement | Version |
|---|---|
| Node.js | 22+ |
| pnpm | 9+ |
| OS | Windows or macOS (Linux experimental) |
Development Commands#
| Command | Description |
|---|---|
pnpm run dev | Start dev server with hot reload |
pnpm run typecheck | Run TypeScript checks |
pnpm run test | Run the test suite |
pnpm run build | Production build |
pnpm run package | Create distributable (.exe / .dmg) |
pnpm run rebuild | Rebuild 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 rebuildArchitecture#
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 suitesRules#
- All DB access stays in the main process. Renderer uses IPC only
- All IPC handlers use
IpcHandlerFactoryand 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#
| Prefix | Use |
|---|---|
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