Decentralized application, which manages the course evaluation by students, based on blockchain technology. This is a sample implementation for Karlsruhe University Of Applied Sciences (HSKA).
To function well, evalDapp relies on some actions in real world. Such actions are marked with (*).
Prerequisites: each student has his HSKA-Blockchain account already. (only for convenience purposes)
- The admin migrates the evaluation contract to the blockchain. The registration for evaluation now begins.
- Each course lecturer gives the list preferably with N blank rows for classroom with N people.*
- Each student writes his existing account into blank space.*
- After it is done, the lecturer checks if number of attendants is equal to the number of accounts written.*
- Each course lecturer gives the list of attendant accounts to the evaluation contract admin.*
- According to list, the admin registers students for course evaluation and gives them (internal) Ethereum to cover up gas costs.
- Registered students evaluate the courses.
- After the evaluation is expired, admin may end the evaluation process.
- The evaluation results will be presented only after the evaluation ends, to avoid influence of current evaluation results.
Q: But, what if admin won't send you funds for evaluation?
A: Yes, it is a known design problem: we need to trust admins. It's still not clear how to make the whole process of evaluation without any communications in real world and trusting to anyone. Someone still needs to authenticate the student, if he allowed to vote for lecturer :(
This app requires Node.js and its components to be installed.
So firstly make sure you have installed Node.js
Now having Node.js installed, install Truffle
To prevent some dependency problems in future it is recommended to install Web3 aswell:
npm install web3
It is good to start with the Ganache-Cli for local blockchain development.
This app is configured to run localy. So if there is a need to use it on the real blockchain network, consider changing the truffle.js settings.
Metamask is a good tool to use normal Web-Browser as an web3-Browser.
This is a browser plugin which serves as a good tool to perform transactions on the blockchain.
The first step would be to compile solidity contracts via truffle framework.
Using terminal execute the following command in project folder:
truffle compile
This will create the binary versions of contracts in .json format and place it in app/src/contracts/ directory.
The next step would be to install all the required node.js dependencies for the app according to package.json file in /app directory:
cd app
npm install
So by now we are ready to deploy our contracts to the blockchain. Let's say we want to test it locally. Open the terminal somewhere and type in:
ganache-cli
This will start the local Etherium blockchain. Now it is time to migrate our contracts to the blockchain. Open the terminal and execute the following command in the main directory of the application:
truffle migrate
Now we are ready to start the application:
cd app
npm start
This will start the frontend on localhost:3000 by default. Don't forget to use Metamask, if you want to use a normal Web Browser.
- Npm - main package manager
- React - serves as frontend
- Web3 - library for the decentralized communication between frontend and blockchain
- Truffle - development framework for solidity contracts and deploy management
Alexandr Timchenko
Aziz Shaumarov
See also the list of contributors who participated in this project.
This project is licensed under the Apache 2.0 License - see the LICENSE.md file for details