gotinho / supply-chain-dapp

Ethereum Dapp for Tracking Items through Supply Chain

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ethereum Dapp for Tracking Items through Supply Chain

Project - UML Diagram

draw.io UML diagrams

Activity

activity diagram

Sequence

sequence diagram

State

state diagram

Data Model

sequence data

Libraries Used

  • @truffle/contract 4.3.38 - Provide better contract abstraction making it easier to interact.
  • Truffle v5.4.14 (core: 5.4.14) - It is a development environment, it provides a testing framework and asset pipeline, making blockchain development easier.
  • Solidity - ^0.4.23 (solc-js) - Used for compiling solidity code.
  • Web3.js v1.5.3 - It allows us to interact with the blockchain, and it is a required dependency of Truffle.

Rinkeby Deploy

Transaction: 0xda97826ab4048d0670d603b0d9d1263e41afb48706b18457f906f6fab6e5d2b5

Contract: 0xAf445c7e4bCEfd760E1a8A362B9E68750dcAfD2F

Transaction History

How to run the tests

Make sure ganache is running on port 8545

On a terminal run the commands.

npm install
truffle test

How to run and use the Front End

Make sure ganache is running on port 8545

On a terminal run the commands.

npm install
truffle compile
truffle migrate
npm run dev

Go to http://localhost:3000/ and connect your MetaMask.

Fill in the 'UPC', 'Farm Name', 'Farm Information', 'Farm Latitude', 'Farm Longitude', 'Product Notes' and 'Product Price' inputs.

Then go through the supply chain steps by clicking the buttons on sequence: Harvest, Process, Pack, ForSale, Buy, Ship, Receive and Purchase.

Transactions hash will appear on 'Transaction History' section.

You can fetch product data stored on the blockchain by filling in the UPC input and clicking the buttons 'Fetch Data 1' and 'Fetch Data 2'.

About

Ethereum Dapp for Tracking Items through Supply Chain


Languages

Language:JavaScript 91.1%Language:Solidity 7.2%Language:HTML 1.4%Language:CSS 0.3%