Development
Building the Reeve Desktop App from source and running in dev mode.
Desktop Development
Build and run the Reeve Desktop App from source for development and testing.
Prerequisites
- Node.js 18+
- npm 9+
- Xcode Command Line Tools (macOS)
- Local clones of
reeve(gateway) andreeve-frontendrepos
Repository Structure
reeve-desktop/
├── src/
│ └── main/
│ ├── index.js ← Electron main process
│ ├── gateway.js ← Gateway child process manager
│ ├── frontend.js ← Frontend child process manager
│ └── updater.js ← Auto-update logic
├── gateway/ ← Packed gateway (gitignored)
├── frontend/ ← Packed frontend (gitignored)
├── resources/
│ ├── icon.icns ← App icon
│ └── tray-iconTemplate.png ← Menubar icon
├── scripts/
│ ├── pack-gateway.js ← Copies gateway dist
│ └── pack-frontend.js ← Builds Next.js standalone
└── package.jsonDev Mode
Run the app in development mode with hot-reload:
# Terminal 1: Start the gateway (from reeve repo)
cd ~/Coding_MM/reeve
reeve start --port 18789
# Terminal 2: Start the frontend (from reeve-frontend repo)
cd ~/Coding_MM/reeve-frontend
npm run dev
# Terminal 3: Start the desktop app in dev mode
cd ~/Coding_MM/reeve-desktop
npm run devIn dev mode:
- Gateway uses the local
reeverepo (not bundled) - Frontend uses Next.js dev server on port 3000 (hot reload)
- Changes to gateway or frontend are reflected immediately
Building for Distribution
1. Pack dependencies
# Copy gateway dist files
npm run pack:gateway
# Build Next.js standalone and copy
npm run pack:frontend
# Or do both
npm run pack:all2. Build the app
# Build .dmg for macOS
npm run build:dmg
# Build unpacked directory (for testing)
npm run build:dirThe output goes to dist/:
dist/Reeve-2026.2.27-arm64.dmg— Apple Silicon installerdist/Reeve-2026.2.27-x64.dmg— Intel installer
3. Code signing
For distribution, set these environment variables:
export CSC_LINK=path/to/certificate.p12
export CSC_KEY_PASSWORD=your-password
export APPLE_ID=your@apple.id
export APPLE_APP_SPECIFIC_PASSWORD=xxxx-xxxx-xxxx-xxxxelectron-builder handles signing and notarization automatically.
Pack Scripts
pack-gateway.js
Copies the gateway's dist/ directory, node_modules, package.json, config files, and templates:
// Simplified
const gatewayRepo = path.resolve(__dirname, "../../reeve");
const target = path.resolve(__dirname, "../gateway");
// Copy dist/, node_modules, package.json, docs/reference/templates/
fs.cpSync(path.join(gatewayRepo, "dist"), path.join(target, "dist"), { recursive: true });
fs.cpSync(path.join(gatewayRepo, "node_modules"), path.join(target, "node_modules"), { recursive: true });pack-frontend.js
Builds the Next.js frontend in standalone mode and copies the output:
// Build standalone
execSync("npm run build", { cwd: frontendRepo });
// Copy .next/standalone/ and .next/static/
fs.cpSync(standalone, target, { recursive: true });Version Bumping
The version in package.json determines the update version:
{
"version": "2026.2.27b"
}Version format: YYYY.M.DD with optional suffix letter for same-day releases.
The desktop app doesn't have its own test suite — it's tested manually. The gateway and frontend have their own test suites that run independently.