Skip to content

Supply Chain Project for the Udacity Blockchain Developer Nanodegree

Notifications You must be signed in to change notification settings

scliff108/udacity_SupplyChain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project 6B Supply Chain

Truffle Version

Truffle v5.0.21

Node Version

node v8.11.3

web3 Version

web3@1.0.0-beta.37

Contract Address

0x80e6C3F217798eF4Ae184c75F9FCB25798e6DCC8 

Requirement 1: Project write-up - UML

Activity Diagram

Activity Diagram

Sequence Diagram

Sequence Diagram

State Diagram

State Diagram

Class Diagram (Data Model)

Class Diagram

Requirement 2: Project write-up - Libraries

I used one library called Roles which made it easier to manage AccessControl in my DAPP. It made it easy to add and remove roles in each of my AccessControl contracts (FarmerRole.sol, DistributorRole.sol, RetailerRole.sol, and ConsumerRole.sol).

Requirement 3: Project write-up - IPFS

I did not use IPFS to deliver my website for this project. However, I could have added my HTML, CSS, and JS files to IPFS in order to fully decentralize my Supply Chain DAPP.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

Please make sure you've already installed ganache-cli, Truffle and enabled MetaMask extension in your browser.

Installing

A step by step series of examples that tell you have to get a development env running

Clone this repository:

git clone https://github.com/udacity/nd1309/tree/master/course-5/project-6

Change directory to project-6 folder and install all requisite npm packages (as listed in package.json):

cd project-6
npm install

Launch Ganache:

ganache-cli -m "spirit supply whale amount human item harsh scare congress discover talent hamster"

In a separate terminal window, Compile smart contracts:

truffle compile

This will create the smart contract artifacts in folder build\contracts.

Migrate smart contracts to the locally running blockchain, ganache-cli:

truffle migrate

Test smart contracts:

truffle test

All 10 tests should pass.

In a separate terminal window, launch the DApp:

npm run dev

About

Supply Chain Project for the Udacity Blockchain Developer Nanodegree

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages