Skip to the content.

A Blockchain Based Supply Chain Management System

Dependencies

Built upon one of the Truffle boxes; drizzle, which helps integrate ReactJs with blockchain smart contracts.

Tools and versions used -

Additionally, the frontend is powered by material-ui v4.x.

Code Structure

The ReactJs part of the code goes under appfrontend, smart contracts under contracts, and migration configurations for these smart contracts under migrations. Configurations for connecting to local blockchain - Ganache, and compiling the contracts are written in the truffle-config.js file.

Frontend uses the compiled contracts to interact with them. The compiled contracts are stored in appfrontend/src/contracts/ (as configured in the truffle-config.js file), and are read internally in the appfrontend/src/drizzleOptions.js file. The expected contracts and events are configured here.

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 Truffle’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 uses the first available 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