Coder Social home page Coder Social logo

drug-supply-chain's Introduction

drug-supply-chain

An Ethereum DApp that demonstrates a Supply Chain flow from a Designer of a drug along to the end user Buyer(consumer). Regulator whos responsable for approve the drug. Manufacturer can act as a owner of a drug design or bulid partner contract with a designer. A Distributor should act as middleman between manufacturer to retailer to last actor in the system consumer.

Live demo on rinkeby network.

UML Architecture

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

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

npm install -g ganache-cli truffle

or use npx befor every npm package comand.

clone this repository using Git.

install project packages for blockchain and frontend project

npm i 
cd frontend && npm i

Start Development

Launch Ganache with unlimited gas (important), more balances.

npx ganache-cli --gasLimit=0x1fffffffffffff --allowUnlimitedContractSize -e 1000000000

start new terminal tab and start compiling contract codes

truffle compile

test contract using truffle

truffle test

if you want to test it using front end migrate contract to ganache local network and make sure you copy some addresses to MetaTask. hence, first account (deployer) will has all the roles and he is the only one can approve or give regulator role to another address.

truffle migrate --reset

locate to frontend project and start development

cd frontend && npm start

Libraries

  • Partnerships: library keep track partner in a partnership contract with known share. I write it to make project less smaller and to try the power of spilted payment contract.
  • Roles: library from Open Zeppelin contract thats keep track of a mapping list of address in any role based contract.

IPFS

Deployed Contract Address (Rinkeby)

0x9c9b36c9b8049eb954fc2a8d73fc900132521f21

TransctionsHash for Live Testing


Built With ❤️ Using:

  • Udacity
  • Ethereum - Ethereum is a decentralized platform that runs smart contracts.
  • Truffle - development environment, testing framework and asset pipeline for blockchains using the Ethereum Virtual Machine (EVM).
  • OpenZeppelin - A library for secure smart contract development. It provides implementations of standards like ERC20 and Ownable.
  • React - A library for secure smart contract development. It provides implementations of standards like ERC20 and Ownable.
  • OpenZeppelin - A library for secure smart contract development. It provides implementations of standards like ERC20 and Ownable.

drug-supply-chain's People

Contributors

khalidfsh 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.