icpc / balloons

MIT License
3 stars 0 forks source link

Balloons Manager

Requirements

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:

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