LeetCode Battles. Real-Time Duels.
Turn interview prep into competitive sport. Battle friends on LeetCode problems, climb the ranks, and become a coding legend.
CodeClash is a real-time competitive coding platform that transforms LeetCode-style interview preparation into an engaging multiplayer experience. Challenge friends, track progress, and rise through the ranks from Bronze to Grandmaster.
- Real-time 1v1 Battles - Race against opponents to solve coding problems with live updates
- Multiple Authentication Methods - Support for email/password and Google OAuth integration
- User Profiles - Customizable avatars, skill tracking, and personalized coding goals
- Comprehensive Ranking System - Progress through competitive tiers from Bronze to Grandmaster
- Global Leaderboards - Track your performance against the community
- Modern Responsive UI - Clean interface built with Tailwind CSS, optimized for all devices
- React 18 - Modern React with hooks and functional components
- Tailwind CSS - Utility-first CSS framework for rapid UI development
- Socket.io Client - Real-time bidirectional event-based communication
- Lucide React - Beautiful and consistent icon library
- Node.js & Express - Fast, unopinionated web framework
- Socket.io - WebSocket library for real-time features
- JWT Authentication - Secure token-based auth with 14-day expiration
- bcryptjs - Industry-standard password hashing
- PostgreSQL - Relational database for persistent data storage
- Judge0 API - Code compilation and execution engine
- Monaco Editor - VS Code-powered code editing experience
Ensure you have the following installed:
- Node.js version 16.x or higher
- npm version 8.x or higher
-
Clone the repository
git clone https://github.com/your-username/CodeClash.git cd CodeClash -
Install root dependencies
npm install
-
Install frontend dependencies
cd client npm install cd ..
-
Install backend dependencies
cd server npm install cd ..
Create a .env.local file in the client directory:
cp client/.env.example client/.env.localCreate a .env file in the server directory:
cp server/.env.example server/.envUpdate the environment variables according to your configuration.
From the root directory, start both frontend and backend:
npm run devThe application will be available at:
- Frontend: http://localhost:3000
- Backend: http://localhost:3001
Start frontend only:
npm run clientStart backend only:
npm run server| Command | Description |
|---|---|
npm run dev |
Start both frontend and backend concurrently |
npm run client |
Start frontend development server only |
npm run server |
Start backend development server only |
| Command | Description |
|---|---|
npm start |
Start React development server |
npm run build |
Create production build |
npm test |
Run test suite |
| Command | Description |
|---|---|
npm run dev |
Start server with nodemon (auto-restart on changes) |
npm start |
Start production server |
CodeClash/
├── client/ # Frontend React application
│ ├── public/ # Static assets
│ ├── src/ # Source files
│ └── package.json # Frontend dependencies
├── server/ # Backend Node.js application
│ ├── routes/ # API routes
│ ├── middleware/ # Express middleware
│ └── package.json # Backend dependencies
├── package.json # Root package configuration
└── README.md # Project documentation
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.
Project Link: Code-Clash
Built with passion by developers, for developers
