Skip to content

Repo for BootDev hackathon 2025 project - code off (now code duel). MonkeyRacer x jstris type project where users fight each other or practice coding on their own.

Notifications You must be signed in to change notification settings

noazlee/code_off

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

89 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

http://codeduel.io -> Click to play!

This project got second place at the Boot.dev 2025 hackathon (https://blog.boot.dev/news/hackathon-2025/)

Code Duels - Real-time Competitive Programming Game

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.

Game Overview

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

Tech Stack

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

Setup Instructions

Prerequisites

  • Docker and Docker Compose
  • Node.js
  • PostgreSQL (handled by Docker)

Setup

  1. Navigate to root directory:

  2. Start with Docker Compose:

    docker compose up --build

Deployment Steps (On Google Cloud)

blog. 0. Get on GCP terminal

  1. npm install -> npm run build (in /client) -> production ready in /build
  2. 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

Acknowledgements:

About

Repo for BootDev hackathon 2025 project - code off (now code duel). MonkeyRacer x jstris type project where users fight each other or practice coding on their own.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •