QuizRoom Hub is a versatile educational platform designed to enhance online learning and classroom management. Inspired by Google Classroom, this API empowers users to register with distinct roles—either as teachers or students—allowing for a personalized experience tailored to their needs. Teachers can effortlessly create, update, and delete classrooms, and share courses and quizzes, fostering an engaging educational environment. Students can join these classrooms, participate in discussions, take quizzes, and receive instant feedback with their marks. Built with Python, Django, and Django Rest Framework, and leveraging a MySQL database.
- Installation
- Usage
- Features
- Role Management and Permissions
- API Endpoints
- Database Schema
- Testing
- Contributing
- License
- Contact
- Python 3.x
- MySQL
- Django
- Django Rest Framework
-
Clone the repository:
git clone https://github.com/AyKrimino/QuizRoom-Hub.git cd QuizRoom-Hub
-
Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install the required packages:
pip install -r requirements.txt
-
Create a
.env
file in the root directory and add the following environment variables:SECRET_KEY=your_secret_key DATABASE_USER=your_database_user DATABASE_PASSWORD=your_database_password
-
Set up the MySQL database and update the
settings.py
file with your database configuration. -
Apply the migrations:
python manage.py migrate
-
Create a superuser:
python manage.py createsuperuser
-
Run the development server:
python manage.py runserver
- Ensure your virtual environment is activated.
- Run the development server:
python manage.py runserver
- Open your browser and go to
http://127.0.0.1:8000/
.
- Read and update their profiles.
- Create, read, update, and delete classrooms.
- Post courses and quizzes in their classrooms.
- Comment on their own posts.
- Delete any comment on their posts.
- Read and update their profiles.
- Join classrooms created by teachers.
- Read and comment on posts in the classrooms they have joined.
- Create, read, update, and delete their own comments.
- Take quizzes and receive marks.
Role management and permissions are a crucial part of QuizRoom Hub. The platform uses JWT authentication, and all endpoints (except for registration and login) require an access token to access.
Each view is protected with specific permissions to ensure that only authorized users can perform certain actions. For example:
- Only authenticated teachers who own a classroom can delete it.
- Only authenticated students who are members in a classroom can view it
- Students can only update or delete their own comments on posts.
- Teachers can delete any comment on their own posts.
Detailed information about these permissions and role management can be found in the API schema documentation (Swagger UI or ReDoc).
For a comprehensive list of API endpoints and their details, please refer to the automatically generated API documentation:
- Schema: http://127.0.0.1:8000/api/schema/
- Swagger UI: http://127.0.0.1:8000/api/schema/swagger-ui/
- ReDoc: http://127.0.0.1:8000/api/schema/redoc/
These documentation tools provide a detailed and interactive interface for exploring the API endpoints, parameters, and request/response formats.
- Ensure your virtual environment is activated.
- Run the tests:
python manage.py test
We welcome contributions to the QuizRoom Hub project.
This project is licensed under the MIT License.
For questions or feedback, please reach out to ayoub.krimi14@gmail.com or open an issue on GitHub.