CodeArena is a high-octane, real-time multiplayer competitive coding platform. Think of it as a battleground where developers go head-to-head to solve Data Structures & Algorithms (DSA) problems. But there's a twist: An AI Interviewer is watching.
Mid-battle, the AI analyzes your code and injects dynamic, real-time constraints (e.g., "Solve this without using any built-in methods!"), pushing your adaptability and problem-solving skills to the absolute limit.
| Feature | Description |
|---|---|
| ⚔️ Live 1v1 Battles | Real-time matchmaking and bidirectional code execution powered by Socket.io. See your opponent's progress live. |
| 🤖 AI Interviewer | Integrated with Groq & Google Gemini API to analyze code logic and throw sudden constraints mid-game. |
| 🏆 ELO Ranking System | A highly competitive global leaderboard. Start at Bronze and fight your way up to Grandmaster (4000+ ELO). |
| 💻 Pro-Grade Editor | Embedded Monaco Editor (the engine behind VS Code). Supports JavaScript, Python, C++, and Java with auto-complete. |
| 🧠 Practice Mode | Not ready for ranked? Spar against a smart AI Bot to warm up your logic before hitting the live arena. |
A clean, decoupled, and highly scalable architecture built for speed and real-time synchronization.
CODE ARENA/
├── 🌐 client/ # React, Vite, Monaco Editor
│ └── src/components/ # BattleRoom, Timer, WinnerScreen
└── ⚙️ server/ # Node.js, Express, Socket.io
├── controllers/ # Auth, User Stats, ELO Match Updates
├── models/ # MongoDB Schemas (User, Problem)
├── services/ # AI Logic (Gemini/Groq), Code Execution
└── socket/ # Real-time game state management
Want to run the battleground on your local machine? Let's get you set up.
git clone [https://github.com/Prajwal-Dhande/CodeArena.git](https://github.com/Prajwal-Dhande/CodeArena.git)
cd CodeArenacd server
npm installCreate a .env file in the /server directory:
PORT=5000
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_super_secret_jwt_key
GROQ_API_KEY=your_groq_api_key
GEMINI_API_KEY=your_google_gemini_api_keyStart the server:
npm run devOpen a new terminal window:
cd client
npm install
npm run devNavigate to http://localhost:5173 and enter the arena.
Prajwal Dhande
B.Tech Artificial Intelligence Student | Full-Stack & AI Developer Building scalable architectures and real-time systems that push the boundaries of the web.