This project showcases the usage of Blockchain Technology in Ration distribution. The project consists of 5 organizations, Central Government, State Government, District Office, Ration Shops ( Fair Price Shops) and Citizens. Hyperledger Fabric has been used to create the complete Blockchain Network. The organization Tree is shown in fig below.
Starting the Network & Platform
- Generate cryptographic materials & network artifacts & connection Profiles ==> backend/scripts/generate.sh
- Install dependencies in the chaincodes ==> run 'go mod vendor' in the respective chaincode folders (6 folders)
- Start the Network for the 1st Time ==> backend/scripts/run.sh
- If any errors are encountered after channel creation, related to tcp connections ==> run 'sudo bash prune.sh' and retry STEP-3.
- Install dependencies in the Node.JS API ==> run 'npm install' in middleware/
- Copy the Connection Profiles from connections/ -> middleware/fabric/ccp/
- Enroll the ADMIN's of the SDK ==> run 'node fabric/enroladmin'
- Start the API server ==> run 'npm start' in middleware/
- All set, now the Hyperledger Fabric network and the API server are up and running.
- Stop the Node.JS API server
- Stop the Blockchain Network ==> backend/scripts/stop.sh 2-A. To resume the server Later, run backend/scripts/resume.sh
To start Frontend => run npm start
in frontend/
Languages/Libraries/Frameworks used:
React : It is a JavaScript library used for the development of the frontend and user interface of the Application
Express : It is a flexible Node.js web application framework used for developing the middleware of the project.
Golang : Used for writing the chaincodes (Smart Contract) of the Blockchain Network.
Hyperledger Fabric: Hyperledger Fabric is a modular blockchain framework that acts as a foundation for developing blockchain-based products, solutions, and applications using plug-and-play components that are aimed for use within private enterprises.