Coder Social home page Coder Social logo

supply-chain-dapp's Introduction

Supply-Chain-DApp

A blockchain based supply chain dapp for tracking medicines. Smart Contract based Supply Chain Management for Data Integrity and Anti-Tampering.

SMART CONTRACT --> https://mumbai.polygonscan.com/address/0xfff6649d1b6d9407d41cc1e8772cbc3bbdd810c9

Tech Stack

  • Blockchain --> Ethereum, Solidity and hardhat
  • Backend --> Fastapi
  • Frontend --> Reactjs and Ethers.js

How to run

1.Run every service seperately

Project is divided into two parts i.e client(frontend) , backend

Backend

  • So first setup metamask wallet and enable testnet
  • get some test ethers from this webiste
  • now deploy this contract to polygon mumbai testnet via remix ide or hardhat or using any other tool . This might help
  • go to alchemy.com and create a app and select mumbai testnet and get the key it will look like this --> https://polygon-mumbai.g.alchemy.com/v2/<your_key>
  • Then go to contract.py on line 9 you see w3 so change the url there
  • after that change the account address ,key(private_key) and contract address in contract.py
  • key = '<account-private-key>'
  • account = w3.toChecksumAddress('<your-account-address>')
  • address = w3.toChecksumAddress('<contract-address>')
  • then run this command pip install -r requirements.txt (its better if you create virtual environment)
  • now everything is done so just run this command uvicorn main:app --reload this will start the backend server
  • Now go to http://localhost:8000/docs and add workers,products and status etc

Client/Frontend

  • Go to client folder and run this command npm install
  • Then go to componenst folder which is inside client folder and change contract address which is there 4 display file
  • its like const ContractAddress = '<your_contract_address>'
  • you can change contents of home page by editing home.js file
  • now everything is done you can run the command npm start
  • now your app is runnng on port 300

supply-chain-dapp's People

Contributors

rtiwary-1 avatar

Stargazers

 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.