Skip to content

Contributing

This guide covers what you need to get started contributing to Kangentic. For detailed architecture documentation, see the Architecture page or the repo docs.

PlatformRequired
WindowsVisual Studio Build Tools (for better-sqlite3 native compilation)
macOSXcode Command Line Tools
Linuxbuild-essential, python3
Terminal window
git clone https://github.com/kangentic/kangentic.git
cd kangentic
npm install
npm start

The dev server starts three parallel processes: Vite (renderer HMR), esbuild (main/preload watch), and Electron.

src/
main/ # Electron main process (Node.js)
agent/ # Agent adapters (per-agent subfolders) with detection, command building, hooks, trust
config/ # Three-tier config: global → project → effective
db/ # SQLite database layer + migrations
engine/ # Transition engine, session recovery
git/ # Worktree creation and cleanup
ipc/ # IPC handler registration + handlers/
pty/ # Terminal session management + queue
preload/ # Context bridge (window.electronAPI)
renderer/ # React UI
components/ # Board, dialogs, layout, terminal
hooks/ # React hooks (useTerminal, etc.)
stores/ # Zustand state management
shared/ # Shared types, IPC channels, path utilities
tests/
unit/ # Vitest — pure logic, no browser
ui/ # Playwright + Chromium — mock electronAPI
e2e/ # Playwright + real Electron
ModeCommandWhat Runs
Developmentnpm start or npm run devVite dev server + esbuild watch + Electron
Productionnpm run buildtsc --noEmit → Vite build → esbuild (minified)
Packagenpm run packageBuild + create platform installer
Makenpm run makeBuild + create distributable
Publishnpm run publishBuild + upload to GitHub Releases

In development, native modules (better-sqlite3, node-pty, simple-git) are marked external in esbuild and loaded at runtime from node_modules.

Kangentic uses electron-builder for creating platform installers, configured via electron-builder.yml in the project root.

PlatformFormatNotes
WindowsNSIS installer (.exe)Signed via Azure Trusted Signing
macOSDMG (.dmg)Hardened runtime + notarization
Linux.deb, .rpmNo auto-update support

Native modules (better-sqlite3, node-pty) are rebuilt for the target Electron version during packaging. The bridge script is selectively unpacked from the ASAR archive to allow process spawning.

Production builds enable Electron security fuses:

  • RunAsNode — disabled (prevents ELECTRON_RUN_AS_NODE)
  • NodeOptions — disabled (prevents NODE_OPTIONS injection)
  • Inspection — disabled (prevents --inspect debugging)
  • Cookie encryption — enabled
  • ASAR integrity — enabled

First-time contributors must sign a Contributor License Agreement (CLA) before their pull request can be merged. When you open your first PR, the CLA Assistant bot will post a comment — you sign by adding a comment to the PR. It takes about 30 seconds and only needs to be done once.

Kangentic is dual-licensed: the public version uses AGPLv3, and commercial licenses are available for organizations that need proprietary modifications. The CLA (modeled after the Apache ICLA) grants VORPAHL LLC a non-exclusive license to distribute your contribution under any license, while you retain full copyright to your work.

  • TypeScript strict modenoImplicitAny enabled, no any types
  • Icons — Lucide React only, no inline SVGs
  • Test selectorsdata-testid attributes on interactive elements
  • IPC channelssrc/shared/ipc-channels.ts is the single source of truth
  • Commit messagesConventional Commits format, enforced by commitlint