TraceIt aims to revolutionize Poultry Market using Ethereum blockchain which provides transparent, secure data storage and transfer technology with no intermediary. This means that each member can check the validity of the chain. Producers will post data online and stick a QR code to products and consumers will be able to scan that QR code to get all the details about product.
MetaMask : An Ethereum Wallet in your Browser
To connect your web3 js to the locally hosted truffle development we need metmask. You can download its Chrome Extension At MetaMask Chrome Extension.
Other Browser Users can find MetaMask Extension/AddOn On their respective browser stores.
After installing click on add new network and set your new network to localhost:3000 And also Add the account key to the first account that is account[0] with the respective secret key.
Note: Every time you start from fresh always remember to reset your metmask acount as your localhost starts from zero but the metmask always stores some cached data therefore it will thow error as the nonce would not match.
- Go to the blockchain folder by entering
cd blockchain
- Enter
truffle complile
to compile the contracts - Enter
truffle develop
. It will start the development server. - Enter
migrate --reset
to migrate the contracts. - After you have entered the
truffle compile
command in 2nd step, a build/contracts folder will be generated inside the blockchain folder. Go to the project.json in the build folder and copy theabis
array. - Now Go to client/Abis.js and paste the array in
Projectabis
variable and save it.
To run the frontend go to the client folder cd client and type npm start
This will start a new development server at localhost:3000
- Add
.env
file- Add PORT ,MONGODB_URl,JWT_SECRET
- Enter npm install in cmd to download all dependencies
node index.js
to start the server
Any Doubts regarding Project can be addressed to any of the Contributors Any type of collabration and suggestions are also Welcomed 😁
This concept can further be applied to the whole consumer-producer market supply chain.