The critical bridge between orchestration and implementation environments.
bolt.diy-impl is the Integration Layer (Layer 2) of the AI-AutoCoding-DAO four-layer architecture. It serves as the critical bridge between the Orchestration Layer (Layer 1) and the Implementation Environment (Layer 3), handling API communication, authentication, and data management.
The Integration Layer facilitates seamless communication between the strategic orchestration capabilities of Layer 1 and the execution environment of Layer 3, enabling the 5-7x token efficiency improvement that is the core value proposition of the AIACD system.
AI-AutoCoding-DAO Ecosystem
├── Layer 1: AIACD Core (Orchestration Layer)
│ ├── Task Analyzer
│ ├── Template Manager
│ ├── Token Tracker
│ ├── Quality Analyzer
│ ├── Metrics Dashboard
│ └── Integration Layer API Client
├── Layer 2: bolt.diy-impl (Integration Layer) ← THIS REPOSITORY
│ ├── API Endpoints
│ ├── Authentication System
│ ├── bolt.diy WSL Client
│ ├── Template Management
│ ├── Streaming Support
│ └── Token Metrics Service
├── Layer 3: bolt.diy-standalone (Implementation Environment)
│ ├── Full IDE Environment
│ ├── Web Container
│ ├── Code Execution Engine
│ ├── Error Detection
│ └── Deployment Pipeline
└── Layer 4: MetaGipsy (Interaction Analysis Layer)
├── Conversation Analyzer
├── Pattern Recognition
├── User Profiling
└── Prediction Engine
- RESTful API: Comprehensive API endpoints for Layer 1 communication
- Authentication System: Secure API key authentication with rate limiting
- bolt.diy WSL Client: Communication with Layer 3 running in WSL
- Template Management: Storage and management of task templates
- Streaming Support: Real-time updates during task processing
- Token Metrics Service: Tracking and analysis of token usage efficiency
- Supabase Integration: Persistent data storage and authentication
- File Operations: Management of project files through storage buckets
The Integration Layer provides the following key API endpoints:
| Endpoint | Method | Description |
|---|---|---|
/api/v1/tasks |
POST |
Create a new task |
/api/v1/tasks/{id}/status |
GET |
Check the status of a task |
/api/v1/tasks/{id}/implementation |
GET |
Get the implementation result |
/api/v1/tasks/{id} |
PUT |
Update a task |
/api/v1/tasks/{id} |
DELETE |
Delete a task |
/api/v1/tasks/{id}/stream |
GET |
Connect to task event stream |
/api/v1/templates |
GET |
List all templates |
/api/v1/templates/{id} |
GET |
Get a specific template |
/api/v1/templates |
POST |
Create a new template |
/api/v1/templates/{id} |
PUT |
Update a template |
/api/v1/templates/{id} |
DELETE |
Delete a template |
/api/v1/metrics/efficiency |
GET |
Get token efficiency metrics |
/api/v1/metrics/timeseries |
GET |
Get time-series metrics |
/api/v1/metrics/trend |
GET |
Get efficiency trend data |
For detailed API documentation, see the API Reference.
- Node.js 18+
- npm or pnpm
- Supabase account
- WSL (Windows Subsystem for Linux) for Layer 3
- bolt.diy-standalone running in WSL
-
Clone the repository:
git clone https://github.com/MaksimYurchanka/boltdiy-impl.git cd boltdiy-impl -
Install dependencies:
npm install # or pnpm install -
Set up Supabase:
- Create a new Supabase project
- Run the migrations from
supabase/migrations/ - Set up storage buckets as specified
-
Configure environment variables:
cp .env.example .env
Edit the
.envfile with your credentials:SUPABASE_URL=your_supabase_project_url SUPABASE_ANON_KEY=your_supabase_anon_key SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key ANTHROPIC_API_KEY=your_anthropic_api_key BOLT_DIY_URL=your_bolt_diy_url AIACD_API_KEY=your_aiacd_api_key -
Deploy the Edge Function to Supabase:
npm run deploy:functions
Run the development server:
npm run devThis will start a local server at http://localhost:5173 where you can test API endpoints.
Run tests:
npm testThe Integration Layer uses the following key database tables:
tasks: Stores task details and implementation resultstemplates: Stores task templates for different typesapi_keys: Manages authentication keysmetrics: Stores token usage and efficiency metrics
For database schema details, see the migrations in supabase/migrations/.
All API endpoints require authentication using an API key:
Authorization: Bearer YOUR_API_KEY
API keys are stored in the api_keys table with hashed values for security.
The token metrics system provides comprehensive tracking of token usage efficiency:
- Token Usage: Tracks prompt, completion, and total tokens
- Template Efficiency: Measures efficiency gains from using templates
- Time-series Analysis: Tracks efficiency over time
- Trend Visualization: Provides data for dashboard visualizations
The bolt.diy WSL Client communicates with Layer 3 (bolt.diy-standalone) running in WSL through:
- REST API communication for task submission
- File operations using Supabase Storage
- Streaming updates for real-time feedback
The streaming system provides real-time updates during task processing:
- Server-Sent Events (SSE) for one-way streaming
- Multiple event types for different update categories
- Connection management and reconnection handling
- Progress reporting and completion notifications
Contributions are welcome! Please check out our Contributing Guide for guidelines on how to proceed.
- Fork the repository
- Create your feature branch:
git checkout -b feature/amazing-feature - Install development dependencies:
npm install - Make your changes
- Run tests:
npm test - Commit your changes:
git commit -m 'Add some amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Supabase - Database and authentication
- Claude Sonnet - AI model for fallback implementation
- AIACD Core - Orchestration Layer