Inspiration
If you are a computer science student, you know the grind. You sit in your dorm room at 2 AM, staring at LeetCode in total isolation. There is no crowd, there is no adrenaline, and there is no school pride.
Furthermore, traditional hackathons and algorithmic competitions suffer from a fatal flaw: static problem sets. Organizers spend weeks writing problems that are instantly Googled by participants, completely ruining the competitive integrity of the event.
We realized that competitive programming shouldn't feel like taking a standardized test in a silent room. It should feel like a high-stakes esports arena. We wanted to build a platform that turns algorithmic problem-solving into a massive multiplayer battleground where rival colleges fight for global dominance, while simultaneously using bleeding-edge AI to completely eliminate cheating.
What it does
ClashCode is a real-time, 1v1 competitive coding platform designed specifically for university students. We've gamified the entire coding interview process:
- Instant Matchmaking & College Wars: Students represent their college on a global leaderboard. When you hit "Quick Battle", our system instantly pairs you with a rival online. Better yet, from the leaderboard, you can "Declare War" directly on rival colleges to open a dedicated War Room for scheduled, high-stakes bouts.
- Infinite Novelty (Zero Cheating): To completely eliminate plagiarism, we integrated GPT-5.6 to dynamically synthesize completely unique, novel algorithmic coding problems on the fly. The exact millisecond the match starts, GPT-5.6 generates the backstory, the constraints, and the perfectly deterministic edge-case test inputs/outputs. You literally cannot Google this problem, because it didn't exist 5 seconds ago.
- The Hidden Sandbox Judge: Both players share a live timer and submit their code (Python, JS, Java, C++) to a hidden, secure execution sandbox.
- Sub-Second Real-Time Sync: Because we built on Socket.io, the state is synced in real-time. When your opponent submits their code to the judge, your screen flashes, adding massive psychological pressure. The first player to pass all hidden test cases instantly wins, earning points for their college.
- Post-Match AI Mentorship: Winning isn't enough; students must improve. After a battle, we feed the user's submitted code directly back into GPT-5.6. It acts as a senior engineer, analyzing their specific implementation and providing a detailed breakdown of their Big O time/space complexity, alongside actionable refactoring advice.
How we built it
Building a real-time, full-stack application in a single weekend is incredibly difficult. We relied heavily on Codex to act as our senior pair programmer, dramatically accelerating our velocity.
- Frontend: React, Vite, TypeScript, and TailwindCSS for a highly responsive, glassmorphism-inspired esports UI.
- Backend: Node.js, Express, and TypeScript.
- Real-Time Sync: Socket.IO to handle sub-second state updates, matchmaking queues, and War Room presence tracking.
- Database: PostgreSQL (via Supabase) to manage the relational data between users, colleges, battle histories, and global leaderboards.
- AI Engine: The OpenAI API (GPT-5.6) powering the infinite problem generation pipeline and the post-match debriefs.
Where Codex Accelerated Our Workflow:
Codex architected the complex Socket.io event synchronization, handling matchmaking, presence tracking, and real-time battle state across clients seamlessly. When we ran into complex TypeScript generic constraints and type-mismatches between our shared data models, Codex instantly identified and resolved them across the monorepo. Right before submission, we realized the core "College War" declaration UI was missing. Codex immediately mapped out the missing UI components, added the "Declare War" functionality to our Leaderboard, and perfectly hooked it into the existing backend routes without breaking the build!
Challenges we ran into
The most difficult challenge was ensuring that the AI-generated problems were mathematically sound and deterministic. Early iterations of the GPT prompt would occasionally hallucinate impossible constraints or malformed JSON test cases, which would crash our execution sandbox. We had to heavily iterate on our Prompt Engineering to force GPT-5.6 into outputting strict, deterministic JSON structures that our judge could safely parse and execute.
Additionally, managing the complex async race conditions between two players submitting code at the exact same millisecond required a robust locking mechanism in our Socket.io event handlers to ensure the victor was declared accurately.
Accomplishments that we're proud of
We are incredibly proud of the College War feature. The fact that you can hover over a rival university on the global leaderboard, hit a glowing "Declare War" button, and seamlessly transition into a dedicated real-time socket room to schedule battles is the exact competitive gaming experience we set out to build.
What we learned
We learned the sheer power of combining real-time WebSockets with generative AI. While most people use LLMs for chat interfaces, we learned how to use GPT-5.6 as a massive, invisible engine running in the background to dynamically synthesize game logic and level design (the coding problems) in real-time.
What's next for ClashCode
- Spectator Mode: We want to allow hundreds of students to join a battle room purely as spectators, watching the live keystrokes of their college champions in real-time.
- Sandbox Hardening: Migrating the code execution environment from basic Node isolation to strict AWS Firecracker microVMs to prevent sandbox escapes at global scale.
- Redis Scaling: Moving the Socket.IO memory adapter to a centralized Redis cluster to allow the backend to scale horizontally across multiple instances to support thousands of concurrent players.
Built With
- c++
- codex
- css3
- express.js
- git
- github
- gpt-5.6
- html5
- java
- javascript
- node.js
- openai
- playwright
- postgresql
- python
- react
- socket.io
- supabase
- tailwindcss
- typescript
- vite
- vitest
- websockets


Log in or sign up for Devpost to join the conversation.