Skip to the content.

A Blockchain Based Supply Chain Management System

Hardhat Migration

In light of Truffle and Ganache’s sunset, the project has been migrated to Hardhat. The old Truffle code can be accessed from the truffle_version branch in this repository.

Dependencies

Built upon the Hardhat boilerplate code, which helps integrate ReactJs with blockchain smart contracts.

Tools and versions used -

Code Structure

The ReactJs part of the code goes under appfrontend, smart contracts under contracts, and deployment configurations for these smart contracts under scripts.

Frontend uses the compiled contracts to interact with them. The compiled contracts are stored in appfrontend/src/contracts/ (as configured in the deploy.js file) and are accessed directly from the .json files.

Frontend images for current state of the application are stored in the images/currentstate folder.

To know more about what’s part of the frontend code, check out the README file in appfrontend/.

Getting Started

Install the Required Dependencies

Configure the Project

For more commands, please refer to Hardhat’s guides and tutorials.

Get the Frontend Running

Navigate to the appfrontend folder and run npm start. This should start the application and open it up in localhost:3000. Register with one of the MetaMask accounts as either a producer, distributor, or a retailer.

Web Application GIF

Current Functionalities

Currently integrates with the available wallet address to carry out these functionalities and works only for one producer, distributor and retailer user accounts.

In general, users can -

Producers can create batches of products and the rest of the users can buy and sell them.

Enhancements

Please check the repository’s project board for ongoing and future enhancements.

Target State

Supply Chain Flow

Supply Chain Flow - BSCM

User Actions

User Actions - BSCM