Coder Social home page Coder Social logo

supplychaindapp2's Introduction

Project6 - Blockchain Supply Chain Project

Installation

Install project dependencies:

$ npm install -g [email protected]
$ npm install --save [email protected]

npm install webpack-dev-server -g
npm install web3

$ npm build

Deployed to Rinkeby:

Transaction Hash:

0xff1381a874476b36410e050c45d36aca5c111e2971364f01ae01cce6c2d3c662

Contract

0xd248575517C76D61Fd6d5e4505DC9fe57fca4B2a

Other Rubric Requirements:

Is IPFS Used:

No

Node Version:

v14.16.1

Truffle Version:

v5.3.9

Truffle provides much of the functionality possible of this app. Truffle facilitates testing, deployment, and development. Furthermore, it helps to provide a fully integrated test environment so that it does not need to be done manually. It is used in this project specifically to create a development enironment so that I can test the application functionality. It is also used to run the test cases.

Web3 Version:

v1.3.6

Web3 is a collection of javascript libraries that allow an application to interact with an ethereum network. It is being used extensively in this application to encapsulate much of the logic around the etherum blocchain. For example, it is used to convert wei to ethereum and back, it is used to encapsulate logic of big numbers, and also allows us to interact with Metamask.

How To Run Tests:

$ truffle develop
$ truffle test

How To Run Front End:

I use the Live Server Visual Studio extension. Install the extension, select the index.html file, and click 'Go-Live' in the bottom right

How To Use the Front End:

I have already set the wallet addresses the following items below. These are from my personal Metamask, you can change this if you would like.

  1. Current Ownser ID
  2. Farmer ID
  3. Distributor ID
  4. Retailer ID
  5. Distributor ID

You will also need to enter a SKU, UPC, Farm Name, Farm Info, and Product Price in the fields on the website. You can also enter data for Farm Information, latitude, and longitude if you would like.

Once this is done, you can invoke the workflow at any time by clicking the following buttons IN ORDER.

  1. Harvest
  2. Process
  3. Pack
  4. For Sale
  5. Buy
  6. Sell
  7. Receive
  8. Purchase

At any time, you can use the 'Fetch Data 1' and 'Fatch Data 2' buttons to get data from the blockchain.

supplychaindapp2's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.