Coder Social home page Coder Social logo

techragesh / blockchain-hyperledger-fabric-demo Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 1.16 MB

This project explains how blockchain works in IBM Hypledger Fabric with simple application

JavaScript 5.86% TypeScript 52.96% CSS 14.01% HTML 27.18%

blockchain-hyperledger-fabric-demo's Introduction

blockchain-hyperledger-fabric-demo

This project explains how blockchain works in IBM Hypledger Fabric with simple application

In this demo project, I have taken a simple transcation. For example PersonA transfer some amount to Person B an viceversa.

Hyperledger Fabric Installation

Follow the below link to install hyperledger fabric

pre-requisites:

https://hyperledger.github.io/composer/latest/installing/installing-prereqs

Development Environment

https://hyperledger.github.io/composer/latest/installing/development-tools

Demo Application

  1. Start the Fabric Server
Open Terminal and Go to fabric-dev-servers location and run ./startFabric.sh
 
  1. Run the docker container

  2. Run this command to create the busniess network

    composer-playground
    
    
  3. Deploy a new busniess network

    Here I have created demo-test-network

    fabric-network-demo.png

  4. Create an asset in the business network

    Here I am creating simple asset, Participant and transcation in model like below

    In this application asset is Account, participant is Customer and transcation is AccountTransfer

    fabric-model.png

  5. Create busniess logic for the transcation between PersonA and PersonB.

    fabric-script.png

  6. Make Permissions for the Asset, Participant and Transcation

    fabric-permission.png

  7. Deploy the changes.

  8. Test the changes.

    • Create Customer

    fabric-test-model.png

    • Create Account for the customer

    fabric-test-account.png

    • Create Transcation between PersonA and PersonB

    Here I have transferred some amount from PersonA to PersonB and viceversa.

    fabric-test-transcation.png

  9. Export the busniess nextwork from the composer playground portal. Click Export link

    demo-test-network.bna
    
  10. Export the busniess card for network install from the composer playground.

    In this application, I have created busniess card name as admin@demo-test-network initally.

    Also I have created the card from PeerAdmin@hlfv1

    demo-test.card
    
  11. Install the busniess network by using this command

    composer network install --card PeerAdmin@hlfv1 --archiveFile /path/demo-test-network.bna
    
    
  12. Run the below command to check the busniess card using REST API.

    composer-rest-server
    
    

    composer-rest.png

  13. Access the busniess card from the frontend. Hyperledger fabric support angular for the frontend.

    hyperledger-angular.png

    blockchain-ang-account.png

    blockchain-ang-participant.png

    blockchain-ang-transcation.png

Happy Coding

blockchain-hyperledger-fabric-demo's People

Contributors

techragesh avatar

Watchers

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