http://codeduel.io -> Click to play!
This project got second place at the Boot.dev 2025 hackathon (https://blog.boot.dev/news/hackathon-2025/)
A multiplayer competitive programming game where players battle by solving coding challenges in real-time. Players take damage when their opponent solves problems correctly, with harder problems dealing more damage.
Players compete in 1v1 code duels where they:
- Select coding problems of varying difficulty (Easy, Medium, Hard)
- Write Python solutions in real-time
- Deal damage to opponents by solving problems correctly
- Turn on hard mode to challenge your focus
- Spectate matches of your friends
- Track your progress
- Win by reducing opponent's health to zero
Frontend:
- React.js with React Router
- Material-UI for components
- Monaco Editor for code editing
- Socket.io-client for web sockets
Backend:
- Flask with Flask-SocketIO
- PostgreSQL for data persistence
- Docker for secure code execution
- Docker and Docker Compose
- Node.js
- PostgreSQL (handled by Docker)
-
Navigate to root directory:
-
Start with Docker Compose:
docker compose up --build
blog. 0. Get on GCP terminal
- npm install -> npm run build (in /client) -> production ready in /build
- sudo apt-get install nginx
server { listen 80; root /home/{name}/code_off/client/build; index index.html;
location / ( try_files $uri $uri/ = 404; ) } 4. sudo apt install libpq-dev python3-dev 5. manually create psql database on server -> using init.sql 6. set up proxy: systemd -> when server starts back up - will run exec 7. gunicorn -k gevent -b 127.0.0.1:5001 app-gunicorn:app
- https://www.youtube.com/watch?v=3WfegWZzxek&pp=0gcJCfwAo7VqN5tD - hard mode sound track
- https://www.pinterest.com/pin/760897299536844192/ - hard mode visualization
- https://x.com/codeduel - this guy because we accidently took his domain lol