npm installThis will install all required packages including:
- Electron and electron-vite for the app framework
- React and TypeScript for the UI
- Tailwind CSS for styling
- React Flow for graph visualization
- Zustand for state management
- SQLite for data persistence
- Anthropic SDK for AI integration
npm run devThis will:
- Start the Electron main process
- Launch the React dev server with hot reload
- Open the application window
- Enable DevTools automatically in development mode
# Build the app
npm run build
# Package for your platform
npm run package
# Or package for specific platforms
npm run package:mac # macOS (arm64 + x64)
npm run package:win # Windows
npm run package:linux # Linux (AppImage, deb, rpm)cc-exp/
├── src/
│ ├── main/ # Electron main process (Node.js)
│ │ ├── index.ts # Main entry point with window creation
│ │ ├── services/ # Business logic (orchestrator, ralph engine)
│ │ ├── database/ # SQLite setup and repositories
│ │ └── ipc/ # IPC handlers for renderer communication
│ │
│ ├── preload/ # Secure IPC bridge
│ │ └── index.ts # contextBridge API exposure
│ │
│ └── renderer/ # React frontend (browser)
│ ├── components/ # UI components
│ ├── hooks/ # Custom React hooks
│ ├── stores/ # Zustand state stores
│ ├── styles/ # Global CSS and Tailwind
│ ├── index.html # HTML entry point
│ ├── main.tsx # React entry point
│ └── App.tsx # Root React component
│
├── resources/ # App icons and build assets
├── docs/ # Documentation and PRD
│
├── package.json # Dependencies and scripts
├── electron.vite.config.ts # Build configuration
├── electron-builder.yml # Packaging configuration
├── tailwind.config.js # Theme and styling
└── tsconfig*.json # TypeScript configs
- Context Isolation: Renderer has no direct Node.js access
- Preload Script: Safe IPC bridge via
window.api - Security Policies: CSP headers, no external navigation
- Process Separation: Main (Node.js) and Renderer (Browser) are isolated
- Custom Tailwind theme with:
- Electric blue primary (#3B82F6)
- Purple secondary (#8B5CF6)
- Near-black background (#0A0A0F)
- Starfield gradient effects
- Smooth animations with Framer Motion
- Glassmorphism cards and effects
- Responsive and accessible components
- Hot Reload: Changes reflect instantly during development
- TypeScript: Full type safety across main and renderer
- Path Aliases: Clean imports with
@/,@main/,@preload/ - Linting: ESLint + Prettier for code quality
- Testing: Vitest (unit) + Playwright (E2E)
- Component library structure ready
- Store setup with Zustand
- Database schema defined (to be implemented)
- Event bus architecture planned
- IPC handlers stubbed for future APIs
# Development
npm run dev # Start dev server with hot reload
npm run preview # Preview production build
# Building
npm run build # Build for production
npm run typecheck # Type-check without emitting
# Code Quality
npm run lint # Check for linting errors
npm run format # Format code with Prettier
npm test # Run all tests
npm run test:watch # Run tests in watch mode
# Packaging
npm run package # Package for current platform
npm run package:mac # macOS universal (arm64 + x64)
npm run package:win # Windows installer
npm run package:linux # Linux (AppImage, deb, rpm)The foundation is complete. Next steps according to the SPARC methodology:
- Database Layer: Implement SQLite schemas and repositories
- Event Bus: Build the throttled pub/sub system
- Ralph Engine: Create the continuous agent loop with circuit breaker
- Agent Orchestrator: Manage agent lifecycle and spawning
- IPC Handlers: Wire up renderer-to-main communication
- UI Components: Build out the graph, inspector, and dashboard views
- State Management: Implement Zustand stores with event subscriptions
- Testing: Add unit and E2E tests
See docs/plan/prd/ for the complete implementation plan.
If you see "port already in use" error:
# Kill the process on port 5173 (Vite default)
lsof -ti:5173 | xargs kill -9If better-sqlite3 fails to build:
npm run rebuild-native
# or
npm rebuild better-sqlite3Ensure all configs are in sync:
npm run typecheck- Electron Documentation
- React Flow Documentation
- Tailwind CSS Documentation
- Zustand Documentation
- Anthropic SDK
MIT - See LICENSE file for details