A game about multiple robots trying to get from A to B on a map with quadratic tiles. The first robot which reaches the target tile wins!
Get in the game by controlling your robot via REST calls and try to find the fastest way. Or block the others.
And more technical:
For an easy setup, a docker-compose file is provided in the deploy
folder.
It is just a basic setup with traefik as reverse proxy on http
.
Depending on the environment a certificate for TLS is recommended.
PLAUSIBLE_DOMAIN
: The tracked domain for Plausible.PLAUSIBLE_API_HOST
(optional): An alternative Plausible api host. If not set https://plausible.io is used.SPRING_DATASOURCE_*
: Those environment variables are used to connect to an external database.SPRING_PROFILES_ACTIVE
: Set this environment variable to prod
to disable some dev features.
It will also hide the OpenApi Docs for all internal interfaces.INITIAL_ROOT_PASSWORD
(optional): The initial root user password.
If not set a random one is generated at first start and output in the backend log.AUTH_ISSUER
(optional): Set an explicit issuer string for the auth tokens.
This can be useful for parallel instances and should be set in production-like envs.AUTH_KEY
(optional): Set the input for the JWT signing key.
This should be a random string with the length of 64. If changed every user needs to re-login to make auth work correctly again.At the first start the user root
is created with a random password which gets displayed one-time at the first backend start in the start logs.
The password can also be specified via an environment variable, but keep it mind it will only be used one-time at the first start.
The admin user can never participate in a game!
If configured the application can be monitored with Plausible. So far only page calls are tracked.
To enable this set the environment variable PLAUSIBLE_DOMAIN
and if you are running on a self-hosted instance PLAUSIBLE_API_HOST
.
An example is shown in the deployment docker-compose.
Please create the following goals to also get the events:
User logged in
User registered
This software will get no versioning and lives on the bloody main branch.
The basics will be here in this README, but there are more diagrams and documents in the docs
and maps
folder.
Have a Java 21 LTS, node 20 and python 3.10 installation is required to make it all run. Make sure you have podman and podman-compose (or docker and docker-compose) installed on your system, since the dev environment runs on a container-based reverse proxy.
[!INFO] Make sure to have also git lfs installed on your system! Some files are stored in the large file system.
For the database test testcontainers is used. So make sure you make the podman socket available.
(See here for more)
As a second step the used builder ryuk
needs to be disabled, since it doesn't play well with podman right now.
For this set the environment variable TESTCONTAINERS_RYUK_DISABLED
to true
.
For development there is a little script in the project root named start_dev_env.(sh|bat)
(according to your OS).
Execute this first, before you do anything else.
To comply to the coding style, there are some pre-commit rules.
Those should be automatically executed before every git commit.
To make this happen automatically, make sure to have pre-commit
installed on your machine (pip install pre-commit
)
and set up your git hooks (pre-commit install
| from project root).
Navigate to the Application.kt
file and click on the green play button beside the main method. The backend is now running.
For the frontend open up the package.json
file and click the green play button to the left of the dev
script.
Make sure you have all dependencies installed via the Intellij UI or install them with npm install --dev
from terminal.
Now the application can be reached by http://localhost:8888 and http://localhost:8888/api/swagger-ui.
Then run ./gradlew backend:bootRun
(from project root) (or execute it through your IDE) to start your backend.
For the frontend install all packages with npm install --dev
and run the VUE app with npm run dev
(from the frontend
folder).
Now the application can be reached by http://localhost:8888 and http://localhost:8888/api/swagger-ui.
Also, a "secure" version is available via port 8889
as https://localhost:8888.