A real-time collaborative coding platform that allows multiple users to code together, solve problems, and execute code in various programming languages.
- 🔐 Google OAuth Authentication - Secure login with Google accounts
- 💻 Multi-language Code Execution - Support for C++, Java, and Python
- 🔄 Real-time Collaboration - Code together with Socket.io powered live sync
- 📝 Problem Management - Create and solve coding problems
- 🎨 Modern UI - Built with React and NextUI components
- 🐳 Dockerized - Easy deployment with Docker Compose
- React 18 with TypeScript
- Redux Toolkit for state management
- CodeMirror for code editing
- NextUI for UI components
- Tailwind CSS for styling
- Socket.io Client for real-time communication
- Node.js with Express
- MongoDB with Mongoose ODM
- Redis for job queue management (Bull)
- Passport.js for authentication
- Socket.io for WebSocket connections
- Docker & Docker Compose
- Multi-container architecture
- Node.js (v16 or higher)
- MongoDB
- Redis
- Docker & Docker Compose (optional)
Create a .env file in the server directory:
MONGO_URI=mongodb://localhost:27017/codetogether
PORT=5000
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret-
Clone the repository
git clone https://github.com/yourusername/codetogether.git cd codetogether -
Install dependencies
# Install root dependencies npm install # Install client dependencies cd client npm install # Install server dependencies cd ../server npm install
-
Start the development servers
Using Docker Compose:
docker-compose up
Or manually:
# Start the server (from server directory) npm start # Start the client (from client directory) npm start
-
Access the application
- Frontend: http://localhost:3000
- Backend API: http://localhost:5000
CodeTogether/
├── client/ # React frontend
│ ├── public/ # Static files
│ ├── src/
│ │ ├── components/ # Reusable components
│ │ ├── pages/ # Page components
│ │ ├── store/ # Redux store
│ │ └── utils/ # Utility functions
│ └── package.json
├── server/ # Node.js backend
│ ├── config/ # Configuration files
│ ├── middleware/ # Express middlewares
│ ├── models/ # Mongoose models
│ ├── routes/ # API routes
│ ├── codes/ # Generated code files (gitignored)
│ ├── outputs/ # Execution outputs (gitignored)
│ └── package.json
├── docker-compose.yml
└── README.md
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/code |
Execute code |
| GET | /api/problem |
Get all problems |
| POST | /api/problem |
Create a problem |
| GET | /api/auth |
Authentication routes |
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- CodeMirror for the code editor
- Socket.io for real-time communication
- NextUI for beautiful UI components