A powerful AI-powered development platform with specialized agents for building full-stack applications using Google Gemini API.
- Node.js 18+ installed
- npm or yarn package manager
# Install all dependencies (root, backend, and frontend)
npm run install:all
# Start both backend and frontend in development mode
npm run dev
Terminal 1 - Backend:
cd backend
npm run dev
# Backend runs on http://localhost:3001
Terminal 2 - Frontend:
cd frontend
npm run dev
# Frontend runs on http://localhost:3000
# Build both backend and frontend
npm run build
# Start production servers
npm start
ai_platform/
βββ backend/ # Node.js + TypeScript backend
β βββ src/
β β βββ agents/ # AI Agents (Coordinator, Frontend, Backend)
β β βββ config/ # Settings and environment
β β βββ context/ # Context management
β β βββ database/ # SQLite database
β β βββ models/ # Type definitions
β β βββ services/ # Gemini API client
β β βββ tools/ # File and command tools
β β βββ server.ts # Express server
β βββ data/ # Database files
β βββ .env # Environment variables (API keys)
β βββ package.json
β
βββ frontend/ # Tauri + React + TypeScript
β βββ src/
β β βββ components/ # React components
β β βββ hooks/ # Custom React hooks
β β βββ services/ # API service
β β βββ types.ts
β βββ src-tauri/ # Tauri Rust backend
β βββ package.json
β
βββ package.json # Root package.json (runs both servers)
βββ README.md # This file
βββ IMPLEMENTATION_COMPLETE.md # Detailed implementation docs
- Coordinator Agent: Breaks down project briefs into technical tasks
- Frontend Agent: Generates React/TypeScript UI components
- Backend Agent: Creates REST APIs and database schemas
- Per-project and per-chat context isolation
- Real-time token counting (up to 1M tokens)
- Automatic summarization at 90% capacity
- Preserves recent messages after summarization
- File Management: Read, write, replace, search, analyze files
- Command Execution: Safe command execution with confirmation dialogs
- Project Analysis: AI-powered project structure analysis
- Chat sessions and message handling
- Project management
- AI agent coordination
- File operations
- Command execution with safety checks
npm run dev
- Start both servers in development modenpm start
- Start both servers in production modenpm run install:all
- Install all dependenciesnpm run build
- Build both backend and frontendnpm run dev:backend
- Start only backendnpm run dev:frontend
- Start only frontend
npm run dev
- Start backend development servernpm run build
- Build backend for productionnpm start
- Start production backend server
npm run dev
- Start frontend development servernpm run build
- Build frontend for productionnpm run tauri dev
- Start Tauri desktop app
Create /backend/.env
file:
# Gemini API Keys (Already configured)
GEMINI_API_KEY=AIzaSyDxVRu3UzqCWYSC82xiHpYioMJqGRoIZS8
GEMINI_API_KEY_SECONDARY=AIzaSyBkiGL0ckCIibHtH8P4QrqEd6mHFDOkfNc
# Server Configuration
PORT=3001
NODE_ENV=development
API_BASE_URL=http://localhost:3001
FRONTEND_URL=http://localhost:3000
# Context Configuration
MAX_CONTEXT_TOKENS=1000000
CONTEXT_SUMMARIZATION_THRESHOLD=0.9
MIN_CONTEXT_TOKENS_AFTER_SUMMARY=100000
# Rate Limiting
RATE_LIMIT_WINDOW_MS=900000
RATE_LIMIT_MAX_REQUESTS=100
# Database
DATABASE_PATH=./data/ai_platform.db
# Logging
LOG_LEVEL=info
LOG_FILE=./logs/backend.log
// Send project brief to Coordinator Agent
POST http://localhost:3001/api/agent/analyze
{
"projectBrief": "Build a task management app with user authentication",
"sessionId": "session-123"
}
// Response: Tasks breakdown with architecture
{
"analysis": "...",
"tasks": [...],
"architecture": {...}
}
// Execute task with Frontend or Backend agent
POST http://localhost:3001/api/agent/execute-task
{
"taskId": "task-1"
}
// Response: Generated code
{
"agent": "frontend",
"content": "...",
"code": [...]
}
// Request command execution
POST http://localhost:3001/api/commands/request
{
"command": "npm install react",
"workingDirectory": "/project/path"
}
// Confirm and execute
POST http://localhost:3001/api/commands/execute
{
"commandId": "cmd_123",
"confirmed": true
}
β
AI Coordinator Agent that breaks down projects
β
Frontend Agent for React UI generation
β
Backend Agent for APIs and database schemas
β
Context management per-project and per-chat
β
Token counting with automatic summarization
β
File tools (read, write, replace, analyze)
β
Command execution with confirmation
β
Full REST API with 40+ endpoints
β
Frontend-backend integration ready
β
Comprehensive documentation
Full API documentation available at: http://localhost:3001/health
Key endpoints:
POST /api/chat/sessions
- Create chat sessionPOST /api/chat/sessions/:id/messages
- Send messagePOST /api/agent/analyze
- Analyze projectPOST /api/agent/execute-task
- Execute taskPOST /api/commands/request
- Request commandPOST /api/files/read
- Read filePOST /api/files/write
- Write file
- Runtime: Node.js with TypeScript
- Framework: Express.js
- AI: Google Gemini API (@google/genai v1.3.0)
- Database: SQLite (better-sqlite3)
- Security: Helmet, CORS, Rate Limiting
- Framework: React 18 with TypeScript
- Desktop: Tauri (Rust)
- Styling: CSS with CSS Variables
- Icons: Lucide React
- Backend: Add endpoints in
backend/src/server.ts
- Frontend: Add API methods in
frontend/src/services/aiPlatformApi.ts
- Components: Create React components in
frontend/src/components/
- Hooks: Add custom hooks in
frontend/src/hooks/
SQLite tables:
chat_sessions
- Chat sessions with messagesprojects
- Project metadatacontexts
- Context managementtasks
- Task tracking
- Check if port 3001 is available
- Verify Gemini API keys in
.env
- Run
npm install
in backend directory
- Check if port 3000 is available
- Run
npm install
in frontend directory - Clear cache:
rm -rf node_modules package-lock.json && npm install
- Delete
backend/data/ai_platform.db
to reset - Database will be recreated automatically
MIT License - See LICENSE file for details
Contributions welcome! Please read CONTRIBUTING.md first.
For issues and questions, please open an issue on GitHub.
Built with β€οΈ using Google Gemini API, TypeScript, and modern best practices.