A utility for managing balloon delivery in Codeforces contests using the Codeforces API.
- Fetches delivered submissions from Codeforces API.
- Facilitates balloon delivery tracking for contests.
- Node.js (latest LTS recommended)
- npm or yarn
git clone https://github.com/MohanadKh03/balloon-contest.git
cd balloon-contest- Navigate to the
serverdirectory:cd server - Copy the example environment file and create your own
.envfile:cp .env.example .env
- Open
.envand configure it with the necessary credentials and API keys.- CODEFORCES_KEY and CODEFORCES_SECRET: your codeforces account credentials (must use the contest manager's credentials for private contests/mashups)
- MONGO_URI
npm installnpm run start- Navigate to the
clientdirectory:cd ../client - Install dependencies:
npm install
npm run dev/
├── client/ # Frontend application
├── server/ # Backend server
├── README.md # Project documentation
-
server/src/contestants-importer.ts: A utility script for importing contestant data from an Excel file into the MongoDB database. It reads contestant information such as Codeforces handles, seat positions, and locations from a spreadsheet (default:lvl1.xlsx), processes the data, and inserts it into the database after clearing any existing contestant records.How to use:
- Ensure the Excel file (e.g.,
lvl1.xlsx) is in theserverdirectory with columns for "Codeforces Handle", "Bench (down to up)", "Position (right to left)", and "Hall". - Set up the
.envfile withMONGO_URI. - Run the script:
npx ts-node src/contestants-importer.ts(from the server directory).
- Ensure the Excel file (e.g.,
Once both the server and client are running, open the client in your browser and follow the interface to manage balloon deliveries for a contest.