MCQ is an API by which admin can create, edit and delete topics, question related and choices for every question, he can also view the scores of every student or topic and average/max scores as well. Students can enroll in any topic and submit their answers.
- Django (3.2.13)
- Django Rest framework (3.13.1)
- MySQL (5.7.X)
- Kafka (2.13-2.6.1)
- Zookeeper (3.5.8)
This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.
- Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- MySQL
brew install mysql
- kafka
brew install kafka
-
Contact a developer to get envirnoment variables
-
Create a virtual envirnoment
python -m venv env
-
Install packages
pip install -r requirements.txt
-
change the user and password of the DB in settings file to your local ones
-
Create a Mysql database named "mcq" and run:
python manage.py migrate
-
run the server using
python manage.py runserver
-
add Kafka topic to you local kafka environment using
kafka-topics --bootstrap-server localhost:9092 --topic mcq --create
-
run Kafka consumer using
python scoring/consumer.py
-
Go to Swagger Docs to view all endpoints and try them as well.