Git Product home page Git Product logo

trade-finance-logistics's Introduction

(This branch corresponds to the instructions given in the book. It depends on the release-1.1 branches of Hyperledger Fabric and Fabric-CA)

Trade Application

This is a use case on trade finance and logistics, designed to demonstrate the capabilities of Hyperledger (mainly Fabric) blockchain tools.

Use Case Scenario Overview

The trade scenario consists of 6 participants:

  • Exporter: An entity that is selling goods
  • Importer: An entity that is buying goods from an exporter in exchange for money
  • Importer's Bank: Maintains a bank account for an importer, and issues a Letter of Credit on its behalf
  • Exporter's Bank: Maintains a bank account for an exporter, and handles L/Cs and payments on its behalf
  • Carrier: Entity that ships goods from exporter's to importer's location.
  • Regulatory Auhority: Public or governmental body that approves the export of goods, and audits the process

The flow diagam below illustrates the steps from a trade agreement to the final payment settlement. (For more details, see the full description.

alt text

Application folder structure

./
├── chaincode
├── middleware
└── application
└── composer
└── network
└── docs
└── README.md

The chaincode folder contains the source code for all versions of the chaincode.

The middleware folder contains wrapper functions that use the Fabric SDK library to implement channel and chaincode operations.

The application folder contains code to start a web server and offer a REST API for users to register, login, set up the channel and application, and run trade operations.

The network folder contains configurations and code to launch a single-machine Docker network setup corresponding to a minimal version of the trade application scenario.

The docs folder contains more documentation on the use case.

Testing and Running the Application

To test and run the complete application, you will need to perform the following steps in sequence:

  • Test the chaincode (smart contract): Navigate to the chaincode folder for instructions.
  • Launch a trade network: Navigate to the network folder for instructions.
  • Test Attribute Based Access Control(ABAC): Follow these instructions: Testing ABAC
  • Prepare the middleware: Navigate to the middleware folder for instructions.
  • Start and exercise the application server: Navigate to the application folder for instructions.

Augmenting the Application

Two kinds of augmentation are currently supported:

Add a New Organization and Peers

  • See instructions in network to create configuration files for the new organization and peers.
  • See instructions in middleware to update the running application to incorporate the new organization and peers.
    • Alternatively, see instructions in application to upgrade chaincode through the application server.

Upgrade Chaincode

  • (Note: the upgrade version of the chaincode in this repository assumes that the new organization has already been added above.
    • To test chaincode upgrade without new organizations, modify and test the upgrade version of the chaincode suitably.)
  • See instructions in chaincode to validate the upgrade version, or apply custom modifications followed by unit testing.
  • See instructions in middleware to upgrade chaincode in a running trade application.
    • Alternatively, see instructions in application to upgrade chaincode through the application server.

trade-finance-logistics's People

Contributors

vramakrishnasg avatar ldesrosi avatar vramakrishna avatar pnovotnyic avatar

Watchers

James Cloos avatar  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.