Part of the FiTech Web Software Development class.
Explore a world of knowledge by crafting and exchanging questions across diverse subjects. Challenge yourself with quizzes featuring both your own and community-crafted questions.
The application has the following functionalities:
- Authentication and authorization
- Add or delete topics as an admin
- Add or delete questions and corresponding answer options for topics
- Quiz yourself on a topic on the web or via the API
GET /api/questions/random
recieve a random quiz question in format:{ "questionId": 1, "questionText": "How much is 1+1?", "answerOptions": [ { "optionId": 1, "optionText": "2" }, { "optionId": 2, "optionText": "4" }, { "optionId": 3, "optionText": "6" }, ] }
POST /api/questions/answer
check your answer by sending a JSON in format:{ "questionId": 1, "optionId": 3, }
To test the application online visit https://wsd-project-2.fly.dev/
For testing admin functionality, use the login email [email protected] with password 123456
Running the application requires a Docker and Docker Compose installation on your machine.
To start the application and a Postgresql database, run the following command
docker-compose up
and access the application at http://localhost:7777
The Playwright E2E tests can be executed by running the following command from the root directory:
docker-compose run --entrypoint=npx e2e-playwright playwright test && docker-compose rm -sf
In case of any errors such as Flyway migrations not completing, run docker-compose down
and try again.
Note that the database is not setup and torn for individual test runs and test database entries remain after the tests.