Framework: Bun
The backend handles the basic game logic and manages all kicker tables and games played on them. It subscribes to hardware sensors via the MQTT broker. Conversely, the hardware subscribes to topics that allow the backend to control the LED strip and the display.
In later steps the backend will store data about the games in a simple database. Further features will be automated statistics about the games played, player registration and an Elo system.
- Implement class for game logic
- Implement class for kicker tables
- Wire it up to the MQTT Broker
- Make a websocket for the frontend (emqx already provides a feature like this)
- Create database and save games in it
- Player management (Register & Login)
- Make player rankings
Framework: Angular
The frontend mainly displays the data provided by the backend. It shows an overview of all active games and individual views of the games.
In later steps, the web application will also be used to register new players via NFC chips. New players can use their smartphone to register the ID on the chips in our database to enable features like having an Elo score or personalized stats.
- Create MockUps
- Overview of all active games
- Game view
- Statistics view
- NFC Chip register
- Player scoreboard
Our hardware will provide the backend with the given data from its sensors. The detection sensors are currently a pair of light barriers. It also provides three buttons that are used to start or cancel a game, or to manually increase or decrease the score.
-
Set up a .env-be file for the backend config
.env-be file should look like this:MQTT_LOGIN_USERNAME=MQTT_USERNAME MQTT_LOGIN_PASSWORD=MQTT_PASSWORD MQTT_HOST=localhost DATABASE_FILE_NAME=database DATABASE_FILE_SUFFIX=db
Normally the broker credentials are not set. If they are not set, they do not matter for the login.
-
Simply run backend, frontend and emqx broker with:
docker compose up