The ultimate 1v1 battleground for competitive programmers. Challenge peers, solve unique puzzles, and climb the leaderboard to prove your coding supremacy.
- About The Project
- ✨ Features
- 📸 Screenshots
- 🛠️ Tech Stack
- 🏗️ Project Structure
- 🚀 Getting Started
- 🚢 Deployment
- 🤝 Contributing
- 📄 License
Code Arena is a real-time, web-based platform tailored for competitive programmers seeking head-to-head battles. Beyond traditional algorithmic challenges, we introduce unique puzzle formats—debugging, syntax corrections, and optimization tasks—to test every aspect of your coding prowess. Whether you crave a quick rated match, a private duel with friends, or a daily brain-teaser, Code Arena delivers a fast, polished, and feature-rich experience. Powered by Socket.IO for real-time events and Redux Toolkit for state management, every match is seamless and thrilling.
-
1v1 Rated Matches
- Queue for 10, 25, or 40-minute duels.
- ELO-based matchmaking, enhanced with your Codeforces rating.
- Match win/loss system
-
Custom Rooms
- Create private rooms or mini-tournaments.
- Customize rules: rating brackets, problem types (DP, Graphs, Greedy, Trees).
- Invite peers with a simple room code.
-
Daily Puzzles
- Fresh, unique challenges each day.
- Debug solutions, fix syntax errors, or optimize inefficient code.
-
Personalized Dashboard
- Monitor rating, win/loss ratio, and streaks.
- Interactive rating progression chart.
- Detailed match history and activity log.
-
Codeforces Integration
- Sync your Codeforces profile for accurate matchmaking.
- Enhanced initial pairing based on external stats.
-
Leaderboard
- See where you stand among the best on Code Arena.
| Category | Technology |
|---|---|
| Frontend | Next.js, React, TypeScript, Tailwind CSS |
| State Management | Redux Toolkit |
| Backend | Node.js, Express.js, TypeScript |
| Database | MongoDB (Mongoose) |
| Real-time | Socket.IO |
| Authentication | Clerk |
| Deployment | Vercel (Frontend), Render (Backend) |
| Version Control | Git, GitHub |
| Package Manager | npm |
/code-arena
├── /client # Next.js frontend
│ ├── /app
│ ├── /components
│ ├── /hooks
│ ├── /lib
│ └── /redux
└── /server # Node.js backend
├── /src
│ ├── /controllers
│ ├── /models
│ ├── /routes
│ ├── /utils
│ └── index.ts
- Node.js v18+
- npm (included with Node.js)
- Git
- MongoDB (local or Atlas)
-
Clone the repository
git clone https://github.com/your-username/code-arena.git cd code-arena -
Install dependencies
cd server npm install cd ../client npm install
-
Create
.envin/server:MONGO_URI=your_mongo_connection_string CLERK_SECRET_KEY=your_clerk_secret_key PORT=8000 CLIENT_URL=http://localhost:3000 JWT_SECRET=your_jwt_secret -
Create
.env.localin/client:NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your_publishable_key CLERK_SECRET_KEY=your_clerk_secret_key NEXT_PUBLIC_SIGN_IN_URL=/sign-in NEXT_PUBLIC_SIGN_UP_URL=/sign-up NEXT_PUBLIC_AFTER_SIGN_IN_URL=/home NEXT_PUBLIC_AFTER_SIGN_UP_URL=/home NEXT_PUBLIC_API_URL=http://localhost:8000
-
Backend
cd server npm run dev -
Frontend
cd client npm run dev
Visit http://localhost:3000 to explore Code Arena.
-
Backend (Render)
- Build:
npm install && npm run build - Start:
npm start - Add environment variables in Render dashboard.
- Build:
-
Frontend (Vercel)
- Connect GitHub repo.
- Set Next.js environment variables under Project Settings.
Contributions are welcome! Please follow these steps:
- Fork the repo
- Create a feature branch (
git checkout -b feature/YourFeature) - Commit your changes (
git commit -m 'Add YourFeature') - Push to branch (
git push origin feature/YourFeature) - Open a Pull Request



