MetaBBX là một webapp hoàn chỉnh kết hợp giữa AI-powered code generation (sử dụng MetaGPT) và code editor với khả năng thực thi code trực tiếp.
- Tích hợp MetaGPT workflow để tạo code tự động
- Chat interface để tương tác với AI
- Xem và tải xuống các file được tạo bởi AI
- Hỗ trợ nhiều ngôn ngữ lập trình
- Monaco Editor với syntax highlighting
- Hỗ trợ nhiều ngôn ngữ lập trình
- Thực thi code trực tiếp (Python, JavaScript)
- Lưu, copy, và clear code
- Flask API server
- Code execution endpoints
- MetaGPT workflow integration
- File management
- Python 3.8+
- Node.js 16+
- npm hoặc yarn
git clone <repository-url>
cd MetaBBXpip install -r requirements.txtcd frontend
npm install
cd ..python start_webapp.pyScript này sẽ:
- Kiểm tra dependencies
- Cài đặt frontend dependencies nếu cần
- Khởi động cả backend và frontend
- Hiển thị thông tin kết nối
cd backend
python api_server.pycd frontend
npm start- Frontend: http://localhost:3000
- Backend API: http://localhost:5000
- Health Check: http://localhost:5000/api/health
- Chọn ngôn ngữ lập trình từ dropdown
- Viết code trong editor
- Nhấn nút "Run Code" để thực thi
- Sử dụng các nút Save, Copy, Clear để quản lý code
- Nhập mô tả về ứng dụng bạn muốn tạo
- AI sẽ sử dụng MetaGPT workflow để tạo code
- Xem các file được tạo trong accordion
- Nhấn "View File Content" để xem nội dung file
- Nhấn nút "Run AI Workflow" (biểu tượng AutoAwesome)
- Code trong editor sẽ được sử dụng làm prompt
- AI sẽ tạo ứng dụng dựa trên mô tả
GET /api/health
POST /api/chat
{
"messages": [{"role": "user", "content": "Build me a todo app"}],
"language": "python"
}
POST /api/execute/python
{
"code": "print('Hello World')",
"input": ""
}
POST /api/workflow/run
{
"prompt": "Build me a todo app",
"rounds": 1,
"tokens": 1000
}
GET /api/workflow/results
GET /api/files/{filename}
MetaBBX/
├── backend/ # Python backend
│ ├── api_server.py # Flask API server
│ ├── workflow.py # MetaGPT workflow
│ ├── Utility.py # Utility functions
│ └── ...
├── frontend/ # React frontend
│ ├── src/
│ │ ├── components/ # React components
│ │ ├── services/ # API services
│ │ └── App.tsx # Main app component
│ └── ...
├── start_webapp.py # Startup script
├── requirements.txt # Python dependencies
└── README.md # This file
- Kiểm tra Python dependencies:
pip install -r requirements.txt - Kiểm tra port 5000 có đang được sử dụng không
- Xem logs trong terminal backend
- Kiểm tra Node.js và npm đã cài đặt
- Chạy
npm installtrong thư mụcfrontend - Kiểm tra port 3000 có đang được sử dụng không
- Backend đã được cấu hình CORS
- Kiểm tra URL API trong frontend services
- Kiểm tra Node.js đã cài đặt (cho JavaScript execution)
- Kiểm tra Python environment
- Xem logs trong terminal backend
- Fork repository
- Tạo feature branch
- Commit changes
- Push to branch
- Tạo Pull Request
MIT License
- Email: [your-email]
- GitHub: [your-github]
MetaBBX - AI-Powered Code Generator & Editor 🚀