A web-based coding platform inspired by Coze Web Coding (网页编程), powered by Claude AI.
- Code Editor: Monaco-based code editor with syntax highlighting for multiple languages
- File Explorer: Visual file tree navigation
- Live Preview: Real-time preview of web applications in an iframe
- Terminal/Console: Output display for logs and errors
- AI Assistant: Claude-powered AI coding assistant for:
- Code generation
- Code explanation
- Bug fixing and suggestions
- General coding help
- Next.js 16 (App Router)
- React 19 with TypeScript
- TailwindCSS for styling
- Monaco Editor for code editing
- Zustand for state management
- Lucide React for icons
- FastAPI for REST API
- Claude AI via OpenRouter API
- Anthropic SDK for AI integration
- File system-based project storage
vibeCoding/
├── webapp/ # Next.js frontend
│ ├── app/
│ │ ├── page.tsx # Home page
│ │ └── editor/
│ │ └── page.tsx # Main editor view
│ ├── components/
│ │ ├── navbar/ # Top navigation
│ │ ├── file-explorer/ # File tree sidebar
│ │ ├── code-editor/ # Monaco editor
│ │ ├── preview-panel/ # Preview iframe
│ │ ├── terminal/ # Console output
│ │ └── ai-assistant/ # AI chat interface
│ └── lib/
│ ├── api.ts # API client
│ └── store.ts # Zustand state management
│
├── server/ # FastAPI backend
│ ├── main.py # FastAPI app entry
│ ├── routers/
│ │ ├── projects.py # Project CRUD
│ │ ├── files.py # File operations
│ │ ├── ai.py # AI assistant
│ │ └── preview.py # Preview generation
│ ├── services/
│ │ ├── project_manager.py # Project management
│ │ ├── file_manager.py # File operations
│ │ └── claude_agent.py # Claude AI integration
│ └── models/
│ └── schemas.py # Pydantic models
│
└── ARCHITECTURE.md # Detailed architecture documentation
- Node.js 18+ and pnpm
- Python 3.10+
- OpenRouter API key (for Claude AI)
-
Navigate to the server directory:
cd server -
Install Python dependencies:
pip install -r requirements.txt
-
Configure environment variables in
.env.local:OPEN_ROUTER_API_KEY=your_api_key_here -
Start the backend server:
python3 main.py
The API will be available at
http://localhost:8000
-
Navigate to the webapp directory:
cd webapp -
Install dependencies:
pnpm install
-
Start the development server:
pnpm dev
The app will be available at
http://localhost:3000
-
Access the App: Open
http://localhost:3000in your browser -
Create a Project:
- Click "新建项目" (New Project)
- Enter a project name
- Choose a template (Blank, React, HTML)
-
Edit Code:
- Navigate files in the left sidebar
- Click a file to open it in the editor
- Edit code with syntax highlighting and auto-completion
-
Preview:
- Your changes are automatically reflected in the preview panel
- Click the refresh button to reload the preview
-
AI Assistant:
- Click the AI assistant icon to open the chat
- Ask questions about your code
- Request code generation or explanations
- Get debugging help
GET /api/projects/- List all projectsGET /api/projects/{id}- Get project detailsPOST /api/projects/- Create new projectDELETE /api/projects/{id}- Delete project
GET /api/files/{path}?projectId={id}- Read filePOST /api/files/- Write fileDELETE /api/files/{path}?projectId={id}- Delete file
POST /api/ai/chat- Chat with AIPOST /api/ai/generate- Generate codePOST /api/ai/explain- Explain code
GET /health- Health checkGET /- API info
# Frontend
cd webapp
pnpm test
# Backend
cd server
pytest# Frontend
cd webapp
pnpm build
# Backend - Use a production ASGI server
cd server
uvicorn main:app --host 0.0.0.0 --port 8000- Project management (create, open, delete)
- File tree navigation
- Code editor with syntax highlighting
- Live preview
- AI assistant integration
- Multiple file tabs with proper management
- Project templates (React, Next.js, etc.)
- Git integration
- Collaborative editing
- Mobile responsiveness
- Dark/light theme toggle
- Keyboard shortcuts
- File search functionality
- Code formatting
- Linting integration
Contributions are welcome! Please feel free to submit a Pull Request.
MIT
- Inspired by Coze Web Coding
- Powered by Claude AI
- Built with Next.js and FastAPI