Note: this proejct has been migrated from GitLab
QZ is a single and multiplayer game which quizzes players to teach awareness about energy consuption. The objective of every game is to answer as many questions about energy consumption correctly as possible. To make the experience interesting, we've created a lot of features and configuration options, giving you the chance to play the game you want. QZ lets you:
- easily create accounts and log in
- play singleplayer quizz games to learn about everyday energy consumption
- make multiplayer lobbies to invite other users to play with
- answer different type of questions, including multiple choice and estimate questions
- play different types of power-ups that let you e.g. halve the remaning time to answer the question
- send cool reactions and message other people
- look up leaderboards that show how you did compared to other people
We've created this project over the duration of a 10-week introductory software engineering course at TU Delft using Spring Boot (REST & SSE) for the backend and JavaFX for the frontend. Our main goal was to learn how to conceptualize, design, and implement a fun and engaging application together, and learn how to structure our work in short, weekly sprints. From the technical side, our app was designed to be:
- engaging - we interviewed numerous stakeholders, refined requirements, and carefully designed all components to make sure the game is fun to play
- extendible - we boast a comprehensive class hierarchy that allows for quick and painless extension
- maintainable - we used style checking, static analysis, and thoroughly reviewed MRs tools to ensure high code quality
- feature-rich - we put in a lot of time to figure out and implement cool features that go beyond the course backlog
Picture | Name | |
---|---|---|
David Dinucu-Jianu | D.Dinucu-Jianu@student.tudelft.nl | |
Rok Štular | R.Stular@student.tudelft.nl | |
Paul Misterka | P.M.Misterka@student.tudelft.nl | |
Alexandru-Gabriel Cojocaru | A.G.Cojocaru-2@student.tudelft.nl | |
Giacomo Pezzali | G.Pezzali@student.tudelft.nl | |
Aakanksh Singh | A.Singh-27@student.tudelft.nl |
- Download and install prerequisites:
- Clone this repository with
git clone https://gitlab.ewi.tudelft.nl/cse1105/2021-2022/team-repositories/oopp-group-60/repository-template.git
- Initialize the project following the instructions below.
- From the repository folder, build the project with
gradlew build
to verify that the source is valid.
Additionally, these tools will aid you in development and are heavily recommended:
- Scene Builder - UI builder for
OpenJFX
frameworks. - Postman - state-of-the-art API testing tool.
The Quizzzz app consists of three components: the database, the server and the client. Each of these must be run one after another:
- Open a command line window (
cmd
from the Start menu on Windows). cd
into the repository directory.- Spin up the docker container with
docker-compose up -d
- In
Docker Desktop
you should see theoopp
container with apostgres
subcontainer running at:5432
- Verify the connection with
IntelliJ
's database module,psql
, orDBeaver
- the connection details are provided in the
docker-compose.yml
file located in the root project directory
- the connection details are provided in the
- Spin up the docker container with
docker-compose up -d
- Verify that the connection is running with
docker ps
- The output should look similar to this:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 7e917b97e54a postgres "docker-entrypoint.s…" 4 seconds ago Up 3 seconds 0.0.0.0:5432->5432/tcp, :::5432->5432/tcp repository-template-db-1
- Verify the connection with
IntelliJ
's database module,psql
, orDBeaver
- the connection details are provided in the
docker-compose.yml
file located in the root project directory
- the connection details are provided in the
- Run the server.
- If you are running the server from IntelliJ:
- Run the
Main
java file in the/server/src/main/java
directory- This may take a few minutes during the initial build/run
- The server has launched successfully if the log ends with
Started Main in ... seconds (JVM running for ...)
- if you are getting a
PSQLException
when running the server or the tests, then the database connection is failing
- if you are getting a
- Run the
- Otherwise:
- Open a command line window (
cmd
from the Start menu on Windows). cd
to the repository directory.- Execute
gradlew bootRun
(./gradlew bootRun
on Linux or MacOS).
- Open a command line window (
- If you are running the server from IntelliJ:
- If you are running the server for the first time, populate the database (see the section).
- If you are running the client from IntelliJ:
- Edit run/debug configuration the
Main
file in/client/src/main/java
- Add
--module-path="<LIB PATH IN JAVAFX FOLDER WHICH WAS DOWNLOADED>"--add-modules=javafx.controls,javafx.fxml
toVM options/arguments
- Run the
Main
file in/client/src/main/java
- Edit run/debug configuration the
- Otherwise:
- Open a new command window.
cd
to the repository directory.- Execute
gradlew run
(./gradlew run
on Linux or MacOS), the client will spawn in the background.
In order to populate the database, a helper script is provided: populate_db.py
.
To run it, you will need the activity bank (included in ./activities
directory),
as well as an emoji bank (provided in ./reactions
).
- Open a new command window.
cd
to the repository directory.- Run
pip install requests
to install therequests
library. - Run
python populate_db.py -c 100 ./activities ./reactions
. The script will import all activities (images included) and reactions.
This script supports more configuration options; for a list and a brief description of the functionality run python populate_db.py --help
.
This project has been migrated from the EWI GitLab with the consent of all team members. The issues and merge requests have been ported using this helper tool. Note that a tiny number of issues and some issue comments had to be omitted, and merge requests have been converted into issues as their respective branches don't exist anymore.
- Apache Commons (frontend)
- AssertJ (backend)
- Awaitility (backend)
- Guava (frontend + backend)
- Jackson (backend)
- ModelMapper (backend)
- Spring (backend)
- JUnit 5 (backend)
- OpenJavaFX (frontend)
- Spring Boot (backend)
- Lombok (frontend + backend)