This is a blockchain-based repository for manufacturers and that creates a transparent system for verifying product authenticity. Each product is assigned a unique identifier recorded on the blockchain, enabling real-time tracking and traceability. System provides a comprehensive view of the entire supply chain, identifying counterfeit products.
- Truffle v5.6.7 (core: 5.6.7)
- Ganache v7.5.0
- Solidity v0.5.16 (solc-js)
- Node v15.8.0
- Web3.js v1.7.4
- npm 7.5.1
- Any chromium based browser i.e. Chrome
- Metamask browser extension
- Clone the project
git clone https://github.com/StrangerBlock/SupplyChainVerify
- Go to the project folder, open terminal there and run following command to install required node_modules:-
npm install
- Compile contract source files. (Compilation and deployment can be done using truffle migrate):-
truffle compile
- Open Ganache, (to setup local blockchain)
- crerate new workspace
- add truffle-config.js in truffle project
- change port to 7545 in server settings (same as port in truffle-config.js)
- In chrome, open metamask
- add new test network using
- NETWORK ID (i.e. 5777 ,from Ganache Server settings)
- RPC SERVER (i.e HTTP://127.0.0.1:8545 ,from Ganache Server settings)
- CHAIN CODE (i.e. 1337)
- import account using private key of any account from local blockchain available in Ganache.
- add new test network using
- In terminal, run following commands:-
- Run migrations to deploy contracts.
truffle migrate
- To start a server and it will open a homepage (index.html) file in the default browser.
npm run dev
- Login to metamask ,and connect the added account to local blockchain (i.e.localhost:3000)
- Interact with website