Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/apoorvlathey/mask-chain
Verify Authenticity of Masks using Blockchain and IoT
https://github.com/apoorvlathey/mask-chain
arduino blockchain iot nodejs react solidity web3
Last synced: about 1 month ago
JSON representation
Verify Authenticity of Masks using Blockchain and IoT
- Host: GitHub
- URL: https://github.com/apoorvlathey/mask-chain
- Owner: apoorvlathey
- Created: 2020-07-25T20:01:21.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-06-03T10:26:57.000Z (over 2 years ago)
- Last Synced: 2024-11-26T04:17:37.602Z (about 1 month ago)
- Topics: arduino, blockchain, iot, nodejs, react, solidity, web3
- Language: JavaScript
- Homepage:
- Size: 448 KB
- Stars: 9
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Mask-Chain
Mask Chain is a Supply Chain utilizing RSK Blockchain and IoT.### Problem
In the current times of pandemic, it is very important that the people wear masks to safeguard themselves. But many scammers have popped up to sell fake and non-standard masks that can be fatal to the innocent public.
So to have a decentralized verification mechanism to combat this, I have created Mask Chain.### Walk through
1. ![](https://i.imgur.com/QqaYnfb.png)
The **Manufacturer** produces a new Mask. It is then put onto the weight measuring sensor, that transmits the data to computer from Arduino board via USB. The data is logged by the server. The webpage fetches this data from server.
The Manufacturer inputs the price as well as the transporter's Wallet Address.
An image is taken of the mask, which gets uploaded to the IPFS decentralized storage. The buyer can verify that the mask he/she receives is the same one that was sent.
On clicking the button, the data is stored onto the smart contract on blockchain, along with additional data like location and time.2. ![](https://i.imgur.com/6uRFM76.png)
The **Transporter** on successfully delivering the package, scans the QR code to get MaskID. He/she then inputs the transportation fees and this data is then recorded onto the smart contract.3. ![](https://i.imgur.com/rPaPJJe.png)
The buyer scans the QR code on the package received.
The Application fetches the data from blockchain and displays it to the buyer.![](https://i.imgur.com/K8w3LbK.png)
The Buyer can see the entire history of the package and hence verify its authenticity.To pay the parties involved, the buyer clicks on Pay button and sends the transaction in form of R-BTC.
Due to the peer-to-peer nature, the amount is split up and sent to the individual wallets of Manufacturer and Transporter without any Middlemen taking a cut.
Here you can see it on blockexplorer:![](https://i.imgur.com/IU1corI.png)
### Setup
1. **Arduino**
Setup the circuit as shown:
![](https://i.imgur.com/xnZqOZp.png)Upload the code from `./arduino/weight.ino` and upload it to the Arduino. Connect USB to receive sensor Data to Serial Monitor via port `COM17` (might be different for different computers).
2. **Server**
a) In `server` directory, run `npm install` to install the required dependencies. It is a Express Node server.
b) `node server.js` to start the server on Port 5000. The server listens to data sent by Arduino and makes it accessible via API endpoint.3. **Client**
a) The frontend is in React.js and available in `client` directory.
b) Use `npm install` to install required packages.
c) `npm run start` to start react application on Port 3000.
d) Grant webcam permissions to the application in browser and switch to RSK Testnet (network id: 31) via MetMask to interact with the DApp.