A real-time collaborative code editor where developers battle it out, practice for interviews, and write code together
Built for HackCU12 by Sneha Nagaraju, Meghasrivardhan Pulakhandam, and Gunabhiram Aruru
π Live Demo β’ π» Quick Start β’ π Documentation β’ π Deploy
π https://code-battle-grounds.vercel.app/
- βοΈ Real-time Collaborative Coding β Write code together with live cursor presence via Socket.IO
- π« Classrooms β Faculty create sessions, students join with a room code
- π Assessment Mode β Timed coding assessments with integrity tracking
- π§ AI-Powered Hints β Gemini-driven tiered hints that nudge, not spoil
- ποΈ Mock Interviews β Voice-based interview practice with ElevenLabs TTS
- π£οΈ Voice & Text Chatbot β Conversational AI assistant powered by ElevenLabs for natural speech interaction
- ποΈ Algorithm Challenges β Curated DSA problem sets (Blind 75, NeetCode, etc.)
- π Secure Auth β Google OAuth via Supabase
- π± Fully Responsive β Works seamlessly on desktop, tablet, and mobile
- πͺ Antigravity Effects β Fluid UI animations powered by the Antigravity library, bringing the interface to life
| Feature | Description |
|---|---|
| π Real-time Collaboration | Multiple users edit the same file live β code changes sync instantly via Socket.IO |
| π« Classrooms | Faculty create rooms, share codes with students β everyone sees the same editor in real-time |
| π Assessment Mode | Faculty create timed assessments; students take them with transparent integrity tracking |
| π‘οΈ Integrity Insights | Factual session timeline β tab switches, copy/paste events, neutral activity log for faculty review |
| π‘ AI Hints | Tiered hints via Gemini API + ElevenLabs TTS read-aloud β nudges, not answers |
| π£οΈ Voice & Text Chatbot | Full-featured conversational chatbot with both voice and text input/output β powered by ElevenLabs, one of the best speech-to-text and text-to-speech models available |
| ποΈ Mock Interviews | Voice-based interview simulation with AI-powered speech |
| ποΈ Algorithm Challenges | Curated problem sets β Blind 75, NeetCode 150, topic-based collections |
| πͺ Antigravity Effects | Smooth, physics-inspired UI animations via Antigravity β dramatically improved user experience and visual polish |
| β‘ Multi-Language Execution | Run Python, JavaScript, C++, Java, and C |
| ποΈ Custom stdin | Provide input to your programs before execution |
| π₯ Role-Based Access | Separate flows for students vs. faculty, professionals vs. academic users |
| π Progress Tracking | Track solved problems, streaks, and challenge completion |
| π Dark Mode | Sleek dark grayscale theme with glassmorphism UI |
βββββββββββββββββββββββββββββββ
β User Browser β
β (React 19 + TypeScript) β
β Monaco Editor Β· GSAP Β· FM β
ββββββββββββ¬βββββββββββββββββββ
β HTTP/REST + WebSocket
βΌ
βββββββββββββββββββββββββββββββββββ βββββββββββββββββββββββββββββββ
β Backend API ββββββΆβ Supabase β
β (Node.js + Express + TS) βββββββ PostgreSQL + Auth + OAuth β
β - Socket.IO (real-time sync) β βββββββββββββββββββββββββββββββ
β - Room Manager (in-memory) β
β - Rate Limiting + Validation β βββββββββββββββββββββββββββββββ
β ββββββΆβ Judge0 API β
βββββββββββββββββββββββββββββββββββ β (Code Execution Engine) β
βββββββββββββββββββββββββββββββ
βββββββββββββββββββββββββββββββ
βββββΆβ Gemini API (AI Hints) β
β ElevenLabs (Voice TTS) β
βββββββββββββββββββββββββββββββ
User Flow:
- User visits Code Battlegrounds and authenticates with Google OAuth
- Selects role β Academic (Student/Faculty) or Professional
- Chooses a feature β Classrooms, Assessments, Challenges, Interviews, Practice Sets
- Faculty creates a classroom β shares the room code β students join
- Code changes sync in real-time across all connected clients
- Execute code against Judge0, get AI hints from Gemini, hear hints read aloud
| Page | Route | Description |
|---|---|---|
| Landing | /login |
Animated landing page with Google OAuth |
| Role Selection | /role |
Choose Academic or Professional pathway |
| Academic Features | /features/academic |
Classrooms, Assessments, Integrity (faculty) |
| Professional Features | /features/professional |
Challenges, Interviews, Pair Programming, Practice Sets |
| Classrooms | /classrooms |
Faculty creates rooms, students join with code |
| Code Editor | /editor/:roomId |
Monaco editor with real-time sync, execution, AI hints |
| Assessment Mode | /assess |
Faculty creates / student takes timed assessments |
| Algorithm Challenges | /practice |
DSA problems by topic and difficulty |
| Curated Practice Sets | /sets |
Blind 75, NeetCode 150, and more |
| Mock Interviews | /interview |
Voice-based interview simulation |
| Progress Tracking | /progress |
Stats, streaks, solved problems |
| Integrity Timeline | /integrity |
Session activity log for faculty |
| Category | Technology |
|---|---|
| Frontend | React 19, TypeScript, Vite 5, SCSS (BEM) |
| Editor | Monaco Editor (VS Code engine in browser) |
| Real-time | Socket.IO (WebSocket transport) |
| Animations | Framer Motion, GSAP, Antigravity |
| Auth | Supabase (Google OAuth) |
| Styling | SCSS, CSS Variables, Glassmorphism dark theme |
| State | React Context + Hooks |
| Backend | Node.js, Express, TypeScript |
| Database | Supabase (PostgreSQL) |
| Code Execution | Judge0 API |
| AI Hints | Gemini API (gemini-3-flash) |
| Voice & Text Chatbot | ElevenLabs (industry-leading STT + TTS) + Browser SpeechSynthesis fallback |
| Antigravity | Antigravity β physics-based animation library for fluid UI interactions |
| Validation | Joi |
| Rate Limiting | rate-limiter-flexible |
| Logging | Winston |
| Testing | Vitest + Testing Library |
| Deployment | Vercel (frontend), Docker (backend) |
| Metric | Value |
|---|---|
| Page Load Time | < 2 seconds |
| First Contentful Paint | < 1.2 seconds |
| Lighthouse Score | 90+ (Performance) |
| WebSocket Latency | < 50ms (local) |
| Code Execution Roundtrip | < 3 seconds |
| Bundle Size | ~150KB (gzipped) |
| Max Clients per Room | 50 |
- Node.js 18+ and npm 9+
- A Supabase project
- A Judge0 instance (self-hosted or RapidAPI)
- A Gemini API key
- (Optional) An ElevenLabs API key for voice features
git clone https://github.com/Kanyarasi2026/code-battle-grounds.git
cd code-battle-groundscd backend
npm installCreate a .env file inside backend/:
PORT=3001
CORS_ORIGINS=http://localhost:5173
SUPABASE_URL=your_supabase_project_url
SUPABASE_ANON_KEY=your_supabase_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key
JUDGE0_URL=your_judge0_base_urlStart the backend:
npm run devcd frontend
npm installCreate a .env file inside frontend/:
VITE_SUPABASE_URL=your_supabase_project_url
VITE_SUPABASE_ANON_KEY=your_supabase_anon_key
VITE_SOCKET_URL=http://localhost:3001
VITE_GEMINI_API_KEY=your_gemini_api_key
VITE_ELEVENLABS_API_KEY=your_elevenlabs_api_keyStart the frontend:
npm run devOpen http://localhost:5173 in your browser.
In your Supabase project:
- Enable Google as an OAuth provider under Authentication > Providers.
- Add
http://localhost:5173to your allowed redirect URLs. - Run any database migrations found in
backend/migrations/.
cd frontend
npm testFor coverage:
npm run test:coveragecd backend
npm testFor coverage:
npm run test:coveragecode-battle-grounds/
βββ frontend/ React + Vite app
β βββ src/
β β βββ components/ Reusable UI (Button, Card, Input, Avatar, etc.)
β β β βββ ai/ AI hint components
β β β βββ editor/ Monaco editor integration
β β β βββ effects/ ParticleField, visual effects
β β β βββ integrity/ Integrity tracking components
β β β βββ layout/ AuthLayout, navigation
β β β βββ output/ Code execution output display
β β β βββ ui/ Button, Card, Input, Avatar, Kbd
β β βββ context/ AuthContext, RoomContext, NavigationStack
β β βββ pages/ Route-level page components
β β β βββ classrooms/ Faculty create / student join classrooms
β β β βββ assessment/ Student & faculty assessment views
β β β βββ challenges/ Algorithm challenge browser & solver
β β β βββ code-editor/ Main collaborative editor page
β β β βββ curated-practice/ Blind 75, NeetCode, practice sets
β β β βββ features/ Mock interview, pair programming, etc.
β β β βββ landing/ Landing page with OAuth
β β βββ sections/ Hero, Features, CTA sections
β β βββ services/ API service layer
β β βββ socket/ Socket.IO client + actions
β β βββ styles/ Global SCSS variables
β β βββ types/ TypeScript type definitions
β βββ public/ Static assets
β
βββ backend/ Express + Socket.IO server
β βββ src/
β β βββ controllers/ Route handlers
β β βββ middleware/ Auth, validation, rate limiting, error handling
β β βββ routes/ REST API routes
β β βββ services/ Business logic (profiles, etc.)
β β βββ utils/ RoomManager, Logger, RoleManager
β β βββ types/ TypeScript type definitions
β βββ migrations/ SQL migration files
β
βββ README.md
- π Live URL: https://code-battle-grounds.vercel.app
- π Auto-deploys on push to
mainbranch - β‘ Global CDN for optimal performance
- π Built-in analytics and monitoring
The backend can be deployed via Docker using the included Dockerfile, or on platforms like Railway, Render, or Fly.io.
The frontend communicates with the backend for:
- Real-time collaboration β Socket.IO WebSocket events (code sync, presence)
- Code execution β REST endpoint β Judge0 API
- Room management β Create/join/validate rooms
- Authentication β Supabase OAuth + JWT tokens
- AI hints β Gemini API via frontend (with ElevenLabs TTS or browser fallback)
- Assessments β CRUD operations for faculty assessment management
Contributions are welcome and appreciated! Here's how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
| Name | Links |
|---|---|
| Sneha Nagaraju | Portfolio Β· LinkedIn Β· GitHub |
| Meghasrivardhan Pulakhandam | Portfolio Β· LinkedIn Β· GitHub |
| Gunabhiram Aruru | Portfolio Β· LinkedIn Β· GitHub |
Made for HackCU12
β If you find Code Battlegrounds useful, give it a star!