Giter VIP home page Giter VIP logo

car-lease-demo's Introduction

Car Lease Demo

##Deploying the demo## To deploy to Bluemix simply use the button below then follow the instructions. This will generate the NodeJS server and the Blockchain service for you.

Deploy to Bluemix

To deploy the demo locally follow the instructions [here](Documentation/Installation Guide.md#deploying-locally)

##Application overview## This application is designed to demonstrate how assets can be modeled on the Blockchain using a car leasing scenario. In the scenario vehicles are modeled using Blockchain technology with the following attributes:

Attribute Type
V5cID Unique string formed of two chars followed by a 7 digit int, used as the key to identify the vehicle
VIN 15 digit int
Make String
Model String
Colour String
Reg String
Owner Identity of participant
Scrapped Boolean
Status Int between 0 and 4
LeaseContractID ChaincodeID, currently unused but will store the ID of the lease contract for the vehicle

The application is designed to allow participants to interact with the vehicle assets creating, updating and transferring them as their permissions allow. The participants included in the application are as follows:

Participant Permissions
Regulator Create, Read (All vehicles), Transfer
Manufacturer Read (Own vehicles), Update (VIN, Make, Model, Colour, Reg), Transfer
Dealership Read (Own vehicles), Update (Colour, Reg), Transfer
Lease Company Read (Own vehicles), Update (Colour, Reg), Transfer
Leasee Read (Own vehicles), Update (Colour, Reg), Transfer
Scrap Merchant Read (Own vehicles), Scrap

The demonstration allows a view of the ledger that stores all the interactions that the above participants have has with their assets. The ledger view shows the regulator every transaction that has occurred showing who tried to to what at what time and to which vehicle. The ledger view also allows the user to see transactions that they were involved with as well as showing the interactions with the assets they own before they owned them e.g. they can see when it was created.

Note: The demo currently does not include the ability to lease cars however shows the process of what would happen once the lease has ended and the final payment has been made showing the lease company transferring full ownership of the asset to the leasee.

##Application scenario## The scenario goes through the lifecycle of a car which has the following stages:

Application scenario overview

####Stages:####

  1. Vehicle is created as a template by the regulator.
  2. Vehicle template is transferred to the manufacturer.
  3. Manufacturer updates the vehicle template to define it as a vehicle giving it a make, model, reg etc.
  4. Manufacturer transfers the vehicle to dealership to be sold.
  5. Dealership transfers the vehicle to a lease company.
  6. Lease company transfers the vehicle to a leasee. The vehicle is not leased instead the application is showing what would happen if the lease were to have come to an end and the leasee activated the purchase option.
  7. Leasee transfers the vehicle to a scrap merchant so that it can be scrapped.
  8. Scrap merchant scraps the vehicle.

##Component model## The demo is built using a 3 tier architecture. The user interacts with the demo using a web front end that is provided by the NodeJS server in the middle tier. This web front end uses JavaScript to make HTTP requests to the NodeJS server which has an API ([defined here](Documentation/API Methods.md)) which in turn makes calls via HTTP to the HyperLedger fabric to get details about the blockchain and also interact with the chaincode. Information on the chaincode interface can be found [here](Documentation/Chaincode Interface.md)

Technical Component Model

car-lease-demo's People

Contributors

mrshah-at-ibm avatar nickgaski avatar

Watchers

 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.