Skip to content

icpc/balloons

 
 

Repository files navigation

Balloons Manager

Requirements

  • Java 17

Setup

Use the same configs as in ICPC Live Overlay v3. That's all!

Launch

java -jar balloons.jar -c path/to/config

You can customize a few options:

  • All customization supported by Overlay are supported! You likely want to set problem colors and add custom fields — it's custom-fields.csv file in config directory that contain columns team_id,hall,place.

  • By default, port is 8001, but you can set another one via --port=1234.

  • By default, registration is enabled (but you still need to approve everyone), you can block self-registration using --disable-registration.

Then navigate in your browser to http://{ip}:{port}/ (by default and from the same machine, http://localhost:8001/). If this service is exposed to the internet, it's strictly recommended to use some reverse proxy like nginx.

Don't forget to add admin user (see below).

We create H2 database that contains a few files. They are created in config directory and start with h2, e.g. h2.trace.db. Read more about database files.

You may want to .gitignore them if you're committing configs to some repository.

CLI

# Create a volunteer
java -jar balloons.jar -c config volunteer create login password

# Create an admin
java -jar balloons.jar -c config volunteer create --admin login password

# Make the volunteer an admin
java -jar balloons.jar -c config volunteer update login --make-admin

# Change password
java -jar balloons.jar -c config volunteer update login --new-password=password

# Database SQL shell
java -jar balloons.jar -c config h2shell

Important

When specifying flags, make sure that -c / --config-directory is set before command (h2shell / volunteer) and other options (username, password) are set after command.

Development

Frontend

You can launch frontend in development mode:

cd frontend/
pnpm run dev

It will start at port 5173. To avoid CORS-tricks, it proxies /api/ to http://localhost:8001. If backend is located somewhere else, set BACKEND_URL environment variable. See vite.config.ts for details.

Build

This task should do the trick.

gradle shadowJar

Translation Guide

  1. Add frontend/src/i18n/<your-lang-code>.ts file. Use the same structure as other localization files.
  2. Add your language in src/main/kotlin/org/icpclive/balloons/BalloonOptions.kt.

Voilà! I'm waiting for your pull requests.

License

You may use this repository code according to The MIT License terms.

Credits

This project is inspired by previous versions — neerc/balloons and nikkirche/balloons-reborn.

All of this wouldn't work without ICPC Live tools.

TODO

  • Frontend: implement some pings to detect connectivity issues (??)
  • Store time of run and delivery and show it in interface
  • Show number of balloons remaining
  • Tests
  • Some docs on how to develop it
  • i18n

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 51.8%
  • Kotlin 41.5%
  • CSS 5.0%
  • JavaScript 1.4%
  • HTML 0.3%