AI-powered code editor built with Electron, React, and Gemini AI.
codeflow/
├── frontend/ # Electron app + React renderer
│ ├── electron/ # Main process (TypeScript)
│ │ ├── main.ts # Entry point
│ │ ├── preload.ts # Context bridge
│ │ ├── ipc.ts # IPC handlers
│ │ └── menu.ts # Application menu
│ ├── renderer/ # React frontend
│ └── package.json
│
├── backend/ # Express API server
│ ├── src/
│ │ ├── server.ts # Entry point
│ │ ├── routes/ # API routes
│ │ ├── services/ # Business logic
│ │ └── prompts/ # AI prompt templates
│ └── package.json
│
├── shared/ # Shared types & constants
│ ├── types/
│ └── constants/
│
└── package.json # Workspaces root
- Node.js 18+
- npm 9+
# Install all dependencies
npm run install:all# Run both backend and frontend
npm run dev
# Or run separately:
npm run dev:backend # Start backend server on :3001
npm run dev:frontend # Start Electron + ViteCreate a .env file in the root:
GEMINI_API_KEY=your_api_key_here
BACKEND_PORT=3001
BACKEND_URL=http://localhost:3001# Build all packages
npm run build
# Build frontend for distribution
cd frontend && npm run dist- Frontend (Electron): Desktop app with file system access, forwarding AI requests to backend
- Backend (Express): Handles AI requests using Gemini API
- Shared: Common types and constants used by both packages
MIT