Skip to content

An interesting decentralized app keeps track on deliveryman to keep customers safe from COVID19.

Notifications You must be signed in to change notification settings

tin0819tin/No-Covid

Repository files navigation

Food No-Covid



🛵 An interesting decentralized app keeps track on delivery man to keep customers safe from COVID-19.


🏁 Getting start

To learn more about this project please check this demo video and slide.

Prerequisite

  • Install Ganache and Truffle suite as local blockchain.
  • Install Metamask extension and import accounts from Ganache by private key.
  • Sign up in Google Cloud and get API key to enable Map Javascript API.
  • Create an environment setting file .env under react/deliveryman/src and put the API key under it.
REACT_APP_API_KEY_1={Your_API_Key}

⚒️ Build from source

First clone the project to local.

$ git clone https://github.com/tin0819tin/No-Covid.git

Ganache Setup

  1. First open Ganache in your local or enable Ganache-cli.
  2. Create a workspace in Ganache and upload truffle-config.js.

Metamask Setup

  1. Open the Metamask Setting and select Network to add a new one.
  2. Enter the following parameters for connecting Metamask with Ganache.

Build Smart Contract

Build the truffle contract.

$ truffle compile

Migrate the contract to Ganache.

$ truffle migrate

Then put the directory build/contract under react/deliveryman/src.

Frontend Decentralized React App(Dapp)

Build the required package through npm

$ cd react/deliveryman
$ npm install

Start the Dapp

$ npm start

See the Landing Page on http://localhost:3000 or http://localhost:3000/landing

📚 Usage

Pick your identity on the Landing Page.

Delivery man

  1. /login : Login and upload health status.
  2. /action : Wait for delivery match.
  3. /action : Start deliver!
  4. /arrive : Upload food image after delivered.

Customer

  1. /order : Make the order.
  2. /confirmDelivery : Confirm delivery man.
  3. /clientAction : Wait for the meal.
  4. /clientAction : Get the meal and rate the delivery man:star2:.

📍 Features

  • Store the health status of delivery man on Blockchain(Ganache).
  • Store the delivery details on Blockchain(Ganache).
  • Render the geolocation of delivery man, restaurant and customer using Google Map API.
  • Decide whether delivery man is risky by measuring delivery history with latest COVID hot spots.
  • Utilize IPFS to store images on IPFS node.

About

An interesting decentralized app keeps track on deliveryman to keep customers safe from COVID19.

Resources

Stars

Watchers

Forks

Packages

No packages published