Skip to content

Decentralized exam app built with Django and Solidity, using Web3.py for blockchain integration. Enables secure random question generation via smart contracts on a local blockchain (Ganache).

Notifications You must be signed in to change notification settings

Dhruv-Varshney-developer/exam-app-smart-contract

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

Decentralized Exam App

An exam app built using Django and Solidity. Teachers and professors can use this to generate random questions for a student from a set of question banks. Professors can upload a set of questions to this web app. The smart contract integrated into the app will upload the questions to the blockchain. The web app will then fetch the questions from the blockchain and display a different set of questions for each user (student) who logs into the platform.

Installation

  1. Clone the repo on your system.

  2. Install python3 on your system from https://www.python.org/downloads/

  3. Install pip3 from https://pip.pypa.io/en/stable/installation/

  4. Install Django from https://docs.djangoproject.com/en/4.1/topics/install/

If other things are installed correctly, you just have to run

$ python3 -m pip install Django

in terminal.

  1. Install web3.py using
$ pip3 install web3

or

$ pip install web3

Detailed documentation is available at: https://web3py.readthedocs.io/en/stable/quickstart.html

Note:

These are some modules which you might need to install after these. Install all of them using pip3 install <module name> or pip install <module name> If you still are not able to run the project, simply google up the necessary module and install it. Contact me if you are not able to run the app even after googling.

  1. Move to the exam_app project by cd exam_appin terminal.

  2. Run python3 manage.py runserver in terminal after all necessary modules and libraries are installed.

Troubleshoot:

If it gives port error , change the ganache_url in the exam_app/authentication/smart_contract_integration.py file to your ganache port.

Download ganache from https://trufflesuite.com/ganache/ , if it is not installed

Copy the code from exam_app/smart_contract and deploy it on the local blockchain created using ganache.

Steps:

  1. Open remix IDE. Copy the code from "exam_app/smart_contract". Deploy it with external http provider. Your http provider is given in Ganache app installed on your system as "RPC SERVER" at second top bar.

  2. Copy the smart contract address and abi and change the one in exam_app/authentication/smart_contract_integration.py to your address and abi. Now run python3 manage.py runserver in the terminal again.

About

Decentralized exam app built with Django and Solidity, using Web3.py for blockchain integration. Enables secure random question generation via smart contracts on a local blockchain (Ganache).

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published