Thank you for your interest in contributing! This guide will help you get set up and understand our development workflow.
- Node.js v18+
- npm
- Git (with submodule support)
# Clone with submodules
git clone --recursive https://github.com/editor-code-assistant/eca-desktop.git
cd eca-desktop
# Install dependencies
npm install
# Install webview dependencies
cd eca-webview && npm install && cd ..
# Start development
npm run devUse the provided shell.nix:
nix-shell
npm install
npm run dev| Directory | Purpose |
|---|---|
src/main/ |
Electron main process — server lifecycle, IPC bridge, menu, updater |
src/preload/ |
Secure context bridge between main and renderer |
src/renderer/ |
Host HTML page, sidebar, welcome screen, styles |
eca-webview/ |
Shared React SPA (git submodule) |
resources/ |
App icons and static assets |
npm run devThis starts the webview Vite dev server on localhost:5173 and launches Electron pointing to it, with hot reload for the renderer.
You can also run the two halves independently — useful when you want a single webview shared with eca-vscode / eca-intellij instances:
npm run dev:webview # only the eca-webview Vite dev server (port 5173)
npm run dev:app # only the desktop; waits for http://localhost:5173Override the URL with ECA_WEBVIEW_URL (e.g. ECA_WEBVIEW_URL=http://localhost:6000 npm run dev:app) to point the desktop at a webview running on a non-default host/port.
npm run build # Build all (webview + main + preload + renderer)
npm run package # Build + package for current platform
npm run package:mac # Package for macOS
npm run package:linux # Package for Linuxnpm run lintWe use ESLint with typescript-eslint in strict mode. Please ensure your changes pass linting before submitting.
npm test- Fork the repository and create a feature branch from
main - Make your changes with clear, descriptive commits
- Ensure
npm run lintandnpm testpass - Open a Pull Request against
mainwith a clear description of what and why
Use clear, imperative-mood commit messages:
- ✅
Add session persistence across restarts - ✅
Fix server download retry on timeout - ❌
fixed stuff - ❌
WIP
ECA Desktop follows a three-layer architecture:
- Main Process (
bridge.ts,router.ts): Orchestrates IPC messages from the renderer and JSON-RPC messages from the ECA server. Therouter.tsdata-driven dispatch table is the central routing mechanism. - ECA Server (
server.ts,rpc.ts): Manages downloading, spawning, and communicating with the native ECA binary over stdio using JSON-RPC. - Renderer (
eca-webview): The shared React SPA communicates via the__ecaWebTransportinterface, bridged throughcontextBridgeinpreload.ts.
By contributing, you agree that your contributions will be licensed under the Apache-2.0 License.