A real-time collaborative code building platform with AI assistance.
- Real-time collaboration on code projects
- AI-powered code generation and assistance
- User authentication and project management
- Live chat with AI integration
- File tree visualization
- Build and start command suggestions
- React 19
- Vite
- Tailwind CSS
- Socket.IO Client
- Axios
- Node.js
- Express.js
- Socket.IO
- MongoDB (Mongoose)
- JWT Authentication
- Google Generative AI
- Node.js 18+
- MongoDB database
- Google AI API key
-
Clone the repository
git clone <your-repo-url> cd CoBuilder
-
Set up Backend
cd backend cp env.example .env # Edit .env with your configuration npm install npm run dev
-
Set up Frontend
cd frontend cp env.example .env.local # Edit .env.local with your backend URL npm install npm run dev
-
Access the application
- Frontend: http://localhost:5173
- Backend: http://localhost:3001
PORT=3001
MONGO_URI=mongodb://localhost:27017/cobuilder
JWT_SECRET=your-super-secret-jwt-key
GOOGLE_API_KEY=your-google-ai-api-key
FRONTEND_URLS=http://localhost:5173,http://localhost:5174VITE_API_URL=http://localhost:3001This application is configured for deployment on Render. See DEPLOYMENT.md for detailed deployment instructions.
-
Deploy Backend to Render
- Connect your repository
- Set root directory to
backend - Configure environment variables
- Deploy
-
Deploy Frontend to Render
- Create a static site
- Set root directory to
frontend - Set
VITE_API_URLto your backend URL - Deploy
-
Update CORS
- Update
FRONTEND_URLSin backend with your frontend URL
- Update
CoBuilder/
├── backend/ # Backend API server
│ ├── controller/ # Route controllers
│ ├── middleware/ # Express middleware
│ ├── models/ # MongoDB models
│ ├── routes/ # API routes
│ ├── services/ # Business logic
│ ├── server.js # Socket.IO server
│ └── app.js # Express app
├── frontend/ # React frontend
│ ├── src/
│ │ ├── components/ # React components
│ │ ├── context/ # React context
│ │ ├── screens/ # Page components
│ │ └── config/ # Configuration files
│ └── package.json
├── DEPLOYMENT.md # Deployment guide
└── README.md # This file
POST /users/register- User registrationPOST /users/login- User loginGET /users/profile- Get user profile
GET /projects- Get user projectsPOST /projects- Create new projectGET /projects/:id- Get project detailsPUT /projects/:id- Update projectDELETE /projects/:id- Delete project
POST /ai/generate- Generate AI response
project-message- Send/receive project messages@ai- Trigger AI processing in messages
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the ISC License.
For deployment issues, see DEPLOYMENT.md. For general questions, please open an issue on GitHub.