GithubHelp home page GithubHelp logo

qiyd81 / coffee-supply-chain Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rusposevkin/coffee-supply-chain

0.0 1.0 0.0 1.12 MB

Ethereum DApp that demonstrates a Coffee Supply Chain flow.

License: MIT License

HTML 1.58% JavaScript 98.09% CSS 0.34%

coffee-supply-chain's Introduction

Coffee Supply Chain

Description

Ethereum DApp that demonstrates a Supply Chain flow between a Seller and Buyer. The user story is similar to any commonly used supply chain process. A Seller can add items to the inventory system stored in the blockchain. A Buyer can purchase such items from the inventory system. Additionally a Seller can mark an item as Shipped, and similarly a Buyer can mark an item as Received.

Actors

  • Farmer
  • Distributor
  • Retailer
  • Consumer

Actions

  • Farmer – harvest coffee beans, process coffee beans, pack coffee bags, add coffee palettes, ship coffee palettes
  • Distributor – buy coffee palettes
  • Retailer – receive coffee palettes
  • Consumer – buy coffee items

Different steps that coffee beans goes through until it be bought by consumer showed in activity diagram.

User Interface

Product Overview Section

User can fetch information about concrete product. Product Overview

Farm Details Section

Farmer with concrete ID, Name, coordinates (Long and Lat), and some extra information can harvest coffee beans → process coffee beans → pack coffee bags → prepare them for sale. Farm Details

Product Details Section

In this section prepared for sale coffee palettes can be bought by distributor. Then coffee palettes shiped by farmer to Retailer. Then Retailer received these palettes. And finally Consumer bought Coffee items from Retailer. Product Details

Transaction History Section

This section contains IDs of all transactions that was produced with concrete product. Transaction History

UML Diagrams

Activity Diagram

Activity Diagram

Sequence Diagram

Sequence Diagram

State Diagram

State Diagram

Data Model Diagram

Data Model Diagram

Prerequisites

  • Truffle v5.0.3 (core: 5.0.3)
  • Solidity - ^0.4.25 (solc-js)
  • Node v10.14.1

How To Start

  1. Clone this repository
git clone https://github.com/RusPosevkin/coffee-supply-chain.git
  1. Change directory to app folder and install all requisite npm packages:
cd app
npm install
  1. Launch ganache:
npm run ganache 
  1. In a separate terminal window, Compile smart contracts:
npm run compile 
  1. Migrate smart contracts to the locally running blockchain, ganache-cli:
npm run migrate 
  1. Test smart contracts:
npm run test 
  1. In a separate terminal window, launch the DApp:
npm run dev

Deployed contract (Rinkeby)

Transaction History

  • Harvested - 0x79338dbcd5f64687ef4c76fd50e1dcfc9d824d12924e2cddc50bd91f5e968056
  • Processed - 0xaa6e965bc2a8c24060f6cbea026880e2f2443cf1bc77597fe9962d905d45d68b
  • Packed - 0x5d87743c96787b24e152d50e8726d04de19385817fc8af49c6569d410a1ef95c
  • ForSale - 0x1c61c31c776fc6262a5cef560d2f8902b16b6a3903c6000c79fb980d263a02dc
  • Sold - 0xc56300d6256497c3a1a76266a39497f92c1a0c240b2bd77fb3d3efd6abefffda
  • Shipped - 0x27e3709d9361b03fdfb9b498475cf1bad61f28fefe9618c60bb23aef5caad0f8
  • Received - 0x8dbcd41fed3473d377901891d964ade32c64755d7764450e58ca24d508319b1e
  • Purchased - 0xd609c47455d202a919566ab608f27a1c1bbdda56f4c9deb8ac4460953f39fc08

License

MIT

coffee-supply-chain's People

Contributors

rusposevkin avatar

Watchers

 avatar

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.