CODE.co is a modern, real-time collaborative code editor that enables developers to code together seamlessly. Built with cutting-edge technologies, it offers a sleek, responsive interface with powerful collaboration features.
- Clean White Theme - Professional, eye-friendly design
- Responsive Layout - Works perfectly on desktop, tablet, and mobile
- Smooth Animations - Beautiful loading screens and transitions
- CODE.co Branding - Consistent, modern visual identity
- Live Code Editing - See changes as others type
- Real-time Chat - Communicate with your team instantly
- User Presence - See who's online and active in your room
- Synchronized Language Selection - Everyone stays on the same page
- Clerk Authentication - Secure, modern auth system
- Room Management - Create or join rooms with unique IDs
- Member Management - See all participants and manage room access
- Persistent Sessions - Your work is saved and synced
- Multi-language Support - Python, JavaScript, Java, C++
- Judge0 Integration - Reliable code execution and testing
- Real-time Results - See output instantly, shared with all users
- Error Handling - Clear error messages and debugging support
- Beautiful Page Loaders - Engaging loading experiences
- Mobile-first Design - Optimized for all screen sizes
- Intuitive Navigation - Easy-to-use interface
- Performance Optimized - Fast loading and smooth interactions
- React 18 with TypeScript
- Vite for blazing fast development
- Tailwind CSS for modern styling
- Clerk for authentication
- CodeMirror for the code editor
- React Hot Toast for notifications
- Node.js with Express
- WebSocket for real-time communication
- MongoDB Atlas for data persistence
- Redis for pub/sub and caching
- Docker containerization
- Judge0 API for code execution
- GitHub for version control
-
Clone the repository
git clone https://github.com/ak1606/CODE.co.git cd CODE.co -
Set up environment variables
Create
.envfiles in each service directory:Client/.env
VITE_REACT_APP_SERVER_URL=http://localhost:8080 VITE_CLERK_PUBLISHABLE_KEY=your_clerk_publishable_key
Server/.env
MONGO_URL=your_mongodb_atlas_connection_string REDIS_URL=redis://redis:6379
Worker/.env
X_RAPID_API_KEY=your_judge0_api_key REDIS_URL=redis://redis:6379
-
Build and run the stack of containers
docker-compose up --build
🚀 Quick Start: This single command will build and start all services (Client, Server, Worker, Redis)
-
Access the application
- Frontend: http://localhost:5173
- Backend API: http://localhost:8080
-
Install dependencies
# Server cd Server && npm install # Worker cd ../Worker && npm install # Client cd ../Client && npm install
-
Start services
# Terminal 1 - Redis docker run -p 6379:6379 redis # Terminal 2 - Server cd Server && npm start # Terminal 3 - Worker cd Worker && npm start # Terminal 4 - Client cd Client && npm run dev
CODE.co/
├── Client/ # React frontend
│ ├── src/
│ │ ├── components/ # Reusable UI components
│ │ ├── pages/ # Page components
│ │ └── ...
├── Server/ # Express backend
│ ├── src/
│ │ ├── index.ts # Main server file
│ │ └── utils/ # Utility functions
├── Worker/ # Code execution service
│ ├── src/
│ │ └── index.ts # Worker process
└── docker-compose.yml # Docker configuration
- Authentication - Users sign in through Clerk
- Room Creation/Joining - Create or join coding rooms
- Real-time Sync - WebSocket connections enable live collaboration
- Code Execution - Submit code to Judge0 API via Redis queue
- Result Broadcasting - Results are shared with all room participants
- Clerk - Get from clerk.com
- MongoDB Atlas - Get from mongodb.com
- Judge0 - Get from RapidAPI
- Client - React app (Port 5173)
- Server - Express API (Port 8080)
- Worker - Code execution service
- Redis - Pub/sub and caching (Port 6379)
We welcome contributions! Here's how to get started:
- Fork the repository
- Create a feature branch
git checkout -b feature/amazing-feature
- Make your changes
- Commit your changes
git commit -m 'Add amazing feature' - Push to the branch
git push origin feature/amazing-feature
- Open a Pull Request
🌟 Star this repository if you found it helpful!
