A platform for competitive programming battles where players can create, join and compete in solving Codeforces problems. Problems are randomly selected from the Codeforces problemset and players must solve them within a time limit.
This project uses a Node.js backend and a React frontend. The backend is responsible for managing battles, users, and problem selection, while the frontend provides the user interface for players to interact with the platform. It requires two databases - one PostgreSQL database for main data storage, and one MongoDB database for managing scheduled tasks.
- Set up a PostgreSQL database and a MongoDB database.
- Create a database named
cpbattlesin PostgreSQL. - Run the SQL script located in
init.sqlto set up the initial database schema.
- Go to the
backenddirectory. - Install dependencies:
npm install
- Copy the
.env.samplefile to.envand fill in the required environment variables. - Start the backend server:
npm run dev # or npm run build && npm start
- Go to the
frontenddirectory. - Install dependencies:
npm install
- Fill in the
.envfile with the required environment variables. - Start the frontend server:
npm run dev
This project is licensed under the MIT License. See the LICENSE file for details.