Giter VIP home page Giter VIP logo

asahelcode / supply-chain Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lakshya-20/supply-chain

0.0 0.0 0.0 13.32 MB

Decentralised food supply chain to trace products from end to end and provide a smart and reliable way of providing information to the customers.

Home Page: food-supply-chain.vercel.app

License: GNU Affero General Public License v3.0

JavaScript 82.99% CSS 3.98% HTML 1.62% Solidity 11.41%

supply-chain's Introduction

Authenticity in Food Supply Chain Using Blockchain

Solidity Ethereum Javascript React

GitHub code size in bytes GitHub last commit

Project description

Introduction

The food supply chain is a complex but necessary food production arrangement needed by the global community to maintain sustainability and food security. The supply chain has been extended geographically involving many more stakeholders, making the supply chain longer and complicated and thus involving many challenges.

Some of the challenges that are commonly faced in food supply chains are

  • Lack of traceability and communication.
  • Rising supply chain costs.
  • Supply of fraudulent food products.
  • Failure in monitoring warehouses.

Objectives

The project aims to design a decentralized food supply chain to trace products from end to end and provide a smart and reliable way of providing information to the customers.
Features

  • Platform to trace food products worldwide.
  • Restricting duplicate and unauthentic products.
  • Proper food distribution.
  • Reducing the supply chain costs.

System Architecture

The application follows the layered architecture where components which similar functionality are organized into horizontal layers and each layer has a specific role within the application.
The system architecture consists of three layers:

  • Application Layer
  • Blockchain Layer
  • Infrastructure Layer

Methodology

The project is build on three core modules: Traceability System, Trading Mechanism and Reputation System.

  1. Traceability System

    • Each product is marked with unique serial code which is onwed by an externally owned account on Ethereum.
    • Every product transaction is recorded and stored in smart contract and linked with product's serial code.
    • This comes with Access Control Strategy which allows only authentic users to make specific transactions.
  2. Trading Mechanism

    • The process of delivering goods from one entity to another is tracked and recorded on the blockchain.
    • The consumers first register themselves on the system and request to purchase the product with a serial number.
    • The purchase request is sent to the product owner who updates the product ownership with the new owner.
    • This process ensures that retailers do not sell products with duplicate serial codes.
  3. Reputation System

    • This system adds a layer of trust between customers and retailers.
    • This mechanism allows only actual customers of the product to post feedback about the product.
    • The reviews on the blockchain are immutable which does not allow any merchant or retailer to delete or update bad reviews to increase their overall ratings.
    • And in this way this mechanism maintains the complete integrity of the retailer and let the customer know about the seller before making the transaction.

Development Setup

Requirements

  • NodeJS >= 10.16 and npm >= 5.6 installed.
  • Git installed in the system.
  • Truffle, which can be installed globally with npm install -g truffle
  • Metamask extension added to the browser.
  • Ganache development network.

Clone the repository

git clone https://github.com/lakshya-20/supply-chain

Setting Up Truffle Project

Smart contracts or blockchain codes are necessary config files for developing, testing and deploying application business logic are present inside src/Smart-Contract directory.

Checkout smart contracts directory

cd src/Smart-Contract

Install Truffle

npm install -g truffle

Compile Smart Contracts

truffle compile

Deploy Smart Contract on Ganache's development Network

truffle migrate --reset

Run Test Coverage

truffle test

Setting up Client Application

Create .env file to setup environment variables

REACT_APP_NFT_STORAGE_APIKEY=<https://nft.storage APIKEY>

Install Dependencies

npm install

Start Client

npm start

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -m 'Add some feature')
  4. In case of multiple commits squash them. You can find guide here: how to squash commits
  5. Run the tests with (npm run test) and make sure all tests are passed.
  6. Push your branch (git push origin my-new-feature)
  7. Create a new Pull Request, following the template

supply-chain's People

Contributors

lakshya-20 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.