Create a fair trade supply chain network

Get the code Video: Cloud deployment Video: Local deployment Try the app!

Summary

The journey from mountaintop to countertop is long. Gaps in accountability and transparency open the door to delays and fraud. Enter IBM Blockchain. In this developer code pattern, we will create a blockchain app that increases visibility and efficiency in the supply chain of a coffee retailer, giving you a taste of traceable, trackable coffee trade. See how blockchain can help farmers, roasters, and everyone in between bring you a fresher, fairer cup.

Description

This code pattern shows you how to create a blockchain app that increases visibility and efficiency in the supply chain of a coffee retailer using IBM Blockchain Platform V2 Beta. You will use different transactions to show different possible actions for each of the participants in the supply chain. This sample application will record all transactions on the IBM Blockchain Platform V2 Beta, and enable a coffee retailer to ensure customers that their coffee is organic and fair-trade. This code pattern can be useful to developers who are looking to learn more about creating applications that integrate supply chains with Hyperledger Fabric.

When you have completed this code pattern, you will understand how to:

  • Create and use a (free) Kubernetes Cluster
  • Build a blockchain back-end using Hyperledger Fabric
  • Deploy a Node.js app in the cloud that interacts with your smart contract
  • Interact with the (free) IBM Blockchain Platform V2 Beta

Flow

flow

  1. The blockchain operator sets up the IBM Blockchain Platform service.
  2. The IBM Blockchain Platform creates a Hyperledger Fabric network on an IBM Kubernetes Service, and the operator installs and instantiates the smart contract on the network.
  3. The Node.js application server uses the Fabric SDK to interact with the deployed network on IBM Blockchain Platform and creates APIs for a web client.
  4. The Loopback 4 client uses the Node.js application API to interact with the network.
  5. The user interacts with the Loopback 4 web interface to update and query the blockchain ledger and state.

Instructions

Find the detailed steps for this pattern in the README. The steps will show you how to deploy on the cloud:

  1. Clone the repo
  2. Install the dependencies
  3. Package the contract
  4. Create the IBM Cloud services
  5. Build a network
  6. Deploy the Blockchainbean2 smart contract on the network
  7. Connect the application to the network
  8. Run the application