Inspiration
Most coding practice sites hand you a problem and leave you alone with it. You either grind in silence or give up and read the solution. We wanted something closer to a sparring partner: a place where you write real code against a clock or an opponent, and where help makes you think instead of giving you the answer. CodeClash is our attempt at that. It treats learning to code as a competitive game with a ladder to climb.
What it does
CodeClash is a competitive coding arena with two modes:
- Solo Dojo: Pick a difficulty and topic (arrays, strings, loops, dictionaries, math, logic) and write real Python in an in-browser editor. Run your code against test cases and see exactly which ones pass or fail, along with runtime. Problems come from a curated bank and from AI-generated challenges.
- Clash (1v1 PvP): A real-time duel where two players race on the same problem. This is our next milestone (see below).
Players progress through Elo-based tiers (Apprentice → Challenger → Grandmaster) that map to Easy, Medium and Hard problems. Accounts persist your rating and progress.
How we built it
- Frontend: React 19 + Vite, with a feature-based folder structure (
landing,solo,clash,auth). Pages are auto-registered routes, so teammates could work in parallel without merge conflicts. - Editor: Monaco (the engine behind VS Code) for a familiar coding experience.
- Code execution: Python runs in the browser with Pyodide inside a Web Worker, with a 5-second timeout. Player code never touches our server, which keeps execution safe and removes the need for a sandbox service.
- AI problem generation: A serverless endpoint calls Google Gemini with a strict JSON schema (title, description, constraints, examples, starter code, function name), so every generated problem drops straight into the editor and test runner.
- Auth and data: Express + serverless handlers, bcrypt-hashed passwords, JWT sessions, and a TigerData (Postgres) database for users and Elo.
- Deployment: Vercel, using the same handler code locally and in production.
Built With
- bcrypt
- css3
- express.js
- google-gemini
- html5
- javascript
- jwt
- monaco-editor
- node.js
- postgresql
- pyodide
- python
- react
- react-router
- tigerdata
- vercel
- vite
- webassembly
Log in or sign up for Devpost to join the conversation.