IBM Z Day on Nov. 21: Discover the ideal environment for modern, mission-critical workloads. Learn more

Deploy a blockchain network to regulate food shipments along a supply chain

Summary

Food suppliers in the U.S. must comply with U.S. Food and Drug Administration (FDA) Foreign Supplier Verification Program regulatory requirements before they can ship their products to market. In this developer code pattern, you’ll learn how to use a Hyperledger Fabric network to model food supplier verification regulatory requirements for a distributed business network.

Description

Regulatory compliance is a high-focus area in which developers are looking to build applications that automate and standardize processes used to enforce and execute compliance. Blockchain presents an opportunity to do just that. You can use the Hyperledger Fabric SDK along with Vue.js to easily build a regulatory compliance application and build logic into a smart contract that is deployed on a business network. This pattern focuses on an FDA compliance use case. Get creative and apply it to your own use case for managing regulatory compliance.

For this use case, imagine that a supplier is transferring the food products to an importer who verifies that the supplier, country, and food type all match the correct identifiers. At the port of entry, the supplier is again checked against a list of known suppliers in a database (managed by the regulator). If the supplier is of type exempt, then the products are transferred to the retailer. If the supplier is non-exempt, the products are checked against a list of known food products in a database (managed by the regulator). If the food is an exempt product, then it is transferred to the retailer. If the food is non-exempt, the importer must conduct the hazard analysis (either independently or by using a third party). The supplier provides the hazard analysis report to the regulator. The regulator reviews compliance and transfers the products to the retailer. This pattern captures the regulatory compliance logic for the FDA Foreign Supplier Verification Program in a smart contract that’s deployed on a business network.

Flow

flow

  1. Deploy the Hyperledger network as a group of Docker containers (Kubernetes if hosted).
  2. Install the smart contracts on Hyperledger containers.
  3. The Express backend uses Fabric SDK to create and enroll the blockchain user.
  4. The user submits transactions through the Vue UI.
  5. The Vue UI forwards requests to the Express backend, which executes requests on the ledger with Fabric SDK.
  6. The ledger state is retrieved by the SDK and displayed in the Vue UI.

Instructions

Find the detailed instructions in the README. These steps show you how to:

  1. Clone the git repository.
  2. Package the smart contract.
  3. Deploy the local blockchain.
  4. Start the Node server.
  5. Populate the ledger and simulate transactions.
Kalonji Bankole