Rest API project that helps students to prepare for the national exam.
-
Windows 11/10
-
Python 3.11.4 or higher
-
MySQL 8.0 or higher
$ git clone https://gitflic.ru/project/abstract-333/university-api
$ pip install -r requirements.txt
$ alembic init alembic
$ alembic upgrade head
$ cd src
$ uvicorn app:app --reload
- This project uses MySQL.
- A main user table.
- Role table that describes the main roles included in this rest api service.
- Role has should have three roles, student, supervisor(teacher) and admin.
- User can be admin when is_superuser column is true.
- Student can't be superuser.
- Section describes how many sections could quiz have, such as IT speciality has three sections (Software Engineering, AI, Networks) or hom many sections as you consider is correct.
- University table just stores the name of universities.
- User has foreign keys from university and section tables, so every user should belong to university and specialized in specific section of the main study, whatever the user is student or supervisor.
- Question has questions that are entered by supervisors or admins, but every supervisor can only edit and delete own question.
- Feedback is provided by other users (student, admin, supervisor), note that user can't add feedback to own questions.
- Rating table stores the results of student in quizzes.
- Blacklist has users that intentionally solved many quizzes wrong in order of spamming or leveling down the university rank.
- Blocked_level describes many blocking levels that student can have.
- Supervisor didn't affect the rank of university, so when didn't mean to block him.
- All questions couldn't be deleted, user can just prevent them from being used in quizzes, this step is import because we can monitor who has good effect on system (user can't delete questions so the effect of his questions will be visible forever).
- Swagger documentation docs by url "http://127.0.0.1:8000/docs"
- Redoc documentation by url "http://127.0.0.1:8000/redoc"