Backend application for quizreo application : API and services are stored there
This application is the backend of the quizreo application. It is a REST API that provides services to the quizreo application. It is written in python with fastAPI framework.
The application is divided into 6 parts:
* [app](app/): contains the main application
* [auth](app/auth/): contains the authentication services
* [core](app/core/): contains the core services
* [database](app/db/): contains the database services
* [endpoints](app/endpoints/): contains the endpoints of the API
* [models](app/models/): contains the models of the database
* [routes](app/routes/): contains the routes of the API
* __init__.py
* dependencies.py
* main.py
* test_main.py
Services provided by the API:
- Authentication : login, logout, register, reset password, change password
- User management : get user, update user, delete user
- Quiz management : create quiz, get quiz, update quiz, delete quiz
- Survey management : create survey, get survey, update survey, delete survey
- Answer management : create answer, get answer, update answer, delete answer
- Party management : create party, get party, update party, delete party
- Trial management : create trial, get trial, update trial, delete trial
- login: login a user
- logout: logout a user
- register: register a user
- reset_password: reset the password of a user
- get_user: get a user
- update_user: update a user
- delete_user: delete a user
- get_users: get all users
- get_user_by_username: get a user by username
- create_quiz: create a quiz
- get_quiz: get a quiz
- update_quiz: update a quiz
- delete_quiz: delete a quiz
- get_quizzes: get all quizzes
- get_quiz_by_name: get a quiz by name
- get_quiz_by_user: get all quizzes of a user
- create_survey: create a survey
- get_survey: get a survey
- update_survey: update a survey
- delete_survey: delete a survey
- get_surveys: get all surveys
- get_survey_by_name: get a survey by name
- get_survey_by_user: get all surveys of a user
- create_answer: create an answer
- get_answer: get an answer
- update_answer: update an answer
- delete_answer: delete an answer
- get_answers: get all answers
- get_answer_by_user: get all answers of a user
- get_answer_by_quiz: get all answers of a quiz
- create_party: create a party
- get_party: get a party
- update_party: update a party
- delete_party: delete a party
- get_parties: get all parties
- get_party_by_name: get a party by name
- get_party_by_user: get all parties of a user
- create_trial: create a trial
- get_trial: get a trial
- update_trial: update a trial
- delete_trial: delete a trial
- get_trials: get all trials
- get_trial_by_name: get a trial by name
- get_trial_by_user: get all trials of a user
If you want to use this project as a template, you can clone it and start working on it. You can also use it as a reference to learn how to build a FastAPI project. If you want to see a demo of the various features follow these steps:
- Clone the project
-
git clone https://github.com/Pericles001/Quizreo_backend.git
-
cd Quizreo_backend
- Create a virtual environment
-
python3 -m venv venv
-
source venv/bin/activate
- Install the requirements
-
pip install -r requirements.txt
-
pip install -r requirements-dev.txt
- Run the project
-
uvicorn app.main:app --reload
- Go to the Swagger UI and try the endpoints
- Go to the ReDoc UI and try the endpoints
If you wish to contribute to the application , you can fork the project and submit a pull request. If you find any bugs or have any suggestions, you can open an issue.