Table of Contents
PS6: Polyquiz
π Description
Polyquiz is a school project for the course PS6 at Polytech Nice Sophia. It is a quiz game which aims to be used by nursing residents to test their physical and mental capabilities.
As an admin or nurse, you can create quizzes, add questions and answers, and assign them to residents. The residents can then play the quizzes and see their results.
The whole project is being supervised by the Amadeus company.
π₯ Demo
π‘ How to use
Prerequisites
- Node.js (v16.13.0+)
- Get a copy of the Project. Assuming you have git installed, open your Terminal and enter:
&& && && && &&
- If you want to run the tests, run:
Note for teachers: here is our current progress for Docker:
- β Step 1
- β Step 2
- Step 3 (in progress, not completed yet)
- Step 4
This Docker Compose configuration is composed of two separate service compositions. Both configurations use version "3.8" of the Docker Compose specification. Here is a list of observations and explanations about this configuration:
First Configuration:
Healthchecks: There are two services with health checks defined in this configuration, 'backend' and 'frontend'. They use
curl
to check the health of the services by trying to access their respective HTTP endpoints on localhost (http://localhost:9428
for the backend andhttp://localhost:4200
for the frontend). If the HTTP requests fail, the services are considered unhealthy. Health checks are performed every 30 seconds with a timeout of 10 seconds and up to 3 retries.User: Both backend and frontend are using a user (appuser) to run the services in a more securized environement.
Accessible Services and URLs:
- 'backend' service: This service can be accessed on port 9428 of the host machine. As per the configuration, the backend service exposes itself on the 'app-network' network.
- 'frontend' service: This service can be accessed on port 4200 of the host machine. Like the backend, it also uses the 'app-network' network.
Volumes: Both 'frontend' and 'backend' services use bind mounts to map code from the host into the service containers. They also have volume mounts for
/app/node_modules
which seem to be aimed at persisting installed node modules across container restarts.Networks: Both 'frontend' and 'backend' services are part of a user-defined network named 'app-network'.
Second Configuration:
Healthcheck: The 'front-back-test' service uses
nc
(netcat) to check the health of the service by testing whether port 4200 is open.User: Both backend and frontend are using a user (appuser) to run the services in a more securized environement.
Accessible Services and URLs:
- 'front-back-test' service: This service can be accessed on ports 4200 and 9428 of the host machine. It is also a part of the 'app-network' network.
- 'frontend-test-e2e' service: As per the configuration, it doesn't expose any ports and thus won't be directly accessible from the host machine.
Volumes: 'frontend-test-e2e' service uses a named volume 'test-results' to presumably store the test results.
Networks: Both 'front-back-test' and 'frontend-test-e2e' services are part of the 'app-network' network.
Continuous Integration
The project uses GitHub Actions to run the tests and build the project. The husky post-merge hook will also install the dependencies for you when you pull from the repository (only if there are newly added ones).
βοΈ Authors
- Marc Pinet - marcpinet
- Thi Thanh Tu Duong - luvluvdt3
- ClΓ©ment Remy - ClementREMY2
- LoΓ―c Pantano - loicpantano
- LoΓ―c Palayer - loicpalayer
π License
Distributed under the Mozilla Public License Version 2.0 - see the LICENSE file for details