Development Setup
Prerequisites
- macOS 13+ on Apple Silicon
- Node.js 18+
- Python 3.10+
- Git
Clone and Install
bash
git clone https://github.com/fabriziosalmi/silicondev.git
cd silicondev
# Frontend
npm install
# Backend
cd backend
python -m venv .venv
source .venv/bin/activate
pip install -c constraints.txt -e ".[dev]"
cd ..Run Development Mode
bash
npm run devThis runs concurrently:
dev:renderer— Vite dev server on port 5173dev:electron— waits for Vite, compiles TypeScript, launches Electron
The backend is started as a subprocess by the Electron main process. It binds to 127.0.0.1 on port 8000 by default; if 8000 is busy it scans 8001–8099 for a free port and signals the chosen port to Electron via stdout (SILICON_PORT=<port>).
Build
bash
npm run buildCompiles:
- Renderer: TypeScript check + Vite production build to
dist/renderer/ - Main: TypeScript compilation to
dist/main/
Package for Distribution
bash
npm run package- Builds frontend and main process
- Builds backend via PyInstaller (
backend/spec/silicon_server.spec) - Packages everything with electron-builder into
release/
Output: .dmg and .zip in release/.
Backend Development
Run the backend standalone:
bash
cd backend
source .venv/bin/activate
uvicorn main:app --reload --port 8000Tests
bash
cd backend
pytestUses pytest-asyncio for async endpoint tests. Test files are in backend/tests/.
Linting
bash
cd backend
black app/ tests/
isort app/ tests/Frontend uses TypeScript strict mode. The build fails on type errors.
Key Directories
| Path | Purpose |
|---|---|
src/main/ | Electron main process |
src/renderer/src/ | React application |
src/renderer/src/components/ | UI components |
src/renderer/src/api/client.ts | API client |
src/renderer/src/context/ | React context providers |
backend/app/ | FastAPI application |
backend/app/api/ | API route handlers |
backend/app/engine/ | MLX engine service |
backend/app/rag/ | RAG service |
backend/app/mcp/ | MCP integration |
backend/tests/ | Backend tests |
resources/ | App icon, entitlements |
assets/ | Screenshots |