The healthcare industry has seen many technological advancements, but supply chain management is still based on pen-and-paper management or, with some development, a digital method of managing inventory online and tracking it effectively, which is still not up to par and completely dependable. In order to solve this problem, we are utilising blockchain technology, which provides a superior method of tracking and tracing information through a peer-to-peer distributed, secure, and shared ledger of the blockchain network.
- Install Metamask as Google Chrome extension.
- "Truffle" v5.4.29
- "Node" v16.15.0
Move to the Project Directory and Install Following with npm
- "bootstrap": "^5.1.3",
- "truffle-hdwallet-provider": "^1.0.17"
Move to the client directory and Install Following with npm
- "antd": "^3.9.0",
- "axios": "^0.19.2",
- "bootstrap": "^4.4.1",
- "bs58": "^4.0.1",
- "ipfs-api": "^26.1.2",
- "js-file-download": "^0.4.12",
- "react": "16.11.0",
- "react-bootstrap": "^1.0.0",
- "react-dom": "16.11.0",
- "react-router-dom": "^5.3.0",
- "react-scripts": "3.2.0",
- "web3": "1.2.2"
- Create an Account on Infura .It will be used to deploy smart contract to Ethereum testnets by using truffle.
- Create a new project, change the endpoint to Rinkeby and copy the URL of the endpoint for Rinkeby.
- Edit truffle-config.js to set up the truffle-hdwallet-provider and the connection to the Rinkeby network. Then paste the phrase of your metamask Account & Infura Access Token
var HDWalletProvider = require("truffle-hdwallet-provider");
var mnemonic = "orange apple banana ...";
const path = require("path");
module.exports = {
contracts_build_directory: path.join(__dirname, "client/src/contracts"),
networks: {
development: {
host: "127.0.0.1",
port: 8545,
network_id: "*"
},
rinkeby: {
provider: () => new HDWalletProvider(mnemonic, "https://rinkeby.infura.io/v3/<INFURA_Access_Token>"),
network_id: 4,
}
}
};
- Goto Project Directory and run "truffle migrate --network rinkeby" on command prompt.
- Goto Client directory and run "npm start" to start react server.
- Project will be open in your browser.
Execution will start from App.js file in client directory.