Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Build Blockchain Insurance App | 715 | 7 months ago | 37 | apache-2.0 | JavaScript | |||||
Sample insurance application using Hyperledger Fabric | ||||||||||
Awesome Hyperledger Fabric | 431 | 4 months ago | ||||||||
A curated list of resources for creating applications with hyperledger fabric | ||||||||||
Non Profit Blockchain | 355 | 3 months ago | 50 | apache-2.0 | SCSS | |||||
Builds a blockchain network and application to track donations to non-profit organizations, using Amazon Managed Blockchain | ||||||||||
Minifabric | 281 | a month ago | 64 | apache-2.0 | Jinja | |||||
Do fabric network the right and easy way. | ||||||||||
Blockchain Application Using Fabric Java Sdk | 263 | a year ago | 8 | apache-2.0 | Java | |||||
Create and Deploy a Blockchain Network using Hyperledger Fabric SDK Java | ||||||||||
Blockchain Network On Kubernetes | 256 | 2 years ago | 8 | apache-2.0 | Shell | |||||
Demonstrates the steps involved in setting up your business network on Hyperledger Fabric using Kubernetes APIs on IBM Cloud Kubernetes Service. | ||||||||||
Heroes Service | 234 | 3 years ago | 3 | July 13, 2018 | 13 | apache-2.0 | Go | |||
Short tutorial to build a blockchain application in Go with Hyperledger Fabric | ||||||||||
Fabric Starter | 229 | 6 months ago | 33 | apache-2.0 | Shell | |||||
Starter Application and Deployment Scripts for Hyperledger Fabric | ||||||||||
Blockchainnetwork Compositejourney | 211 | 3 years ago | 6 | apache-2.0 | Shell | |||||
Part 1 in a series of patterns showing the building blocks of a Blockchain application | ||||||||||
Fabric Test | 150 | a month ago | 13 | April 01, 2021 | 56 | apache-2.0 | Go | |||
A collection of utilities used to test the core Hyperledger Fabric projects |
Read this in other languages: 中文.
A key application of Blockchain being currently explored is a Decentralized Energy network. The idea stems from a neighborhood where certain Residents are producing energy through Solar panels or other means, and can sell excess energy to Residents needing energy. The transactions would be based on coins in each Resident's account. As per a pre-determined contract and rate, the coins would be debited from the consumer and credited to the producer, for a certain billing period. Each transaction would need to be atomic and added to a Blockchain ledger for trust and verification. The network can include Banks to transact coins for Fiat currency (USD). The network can have Utility Company who can buy or provide energy through the network.
In this code pattern, we will create such a Blockchain application using Hyperledger Composer. The network consists of Residents, Banks and Utility Companies. Residents can exchange coins for energy among each other. The application assumes a pre-paid system where transactions occur after the energy is consumed and the values are updated. The Resident can exchange coins for Fiat money (USD) with Banks on the network. The Residents can also transact coins for energy with a Utility company on the network.
This code pattern is for developers looking to start building Blockchain applications with Hyperledger Composer. When the reader has completed this code pattern, they will understand how to:
Follow these steps to setup and run this code pattern. The steps are described in detail below.
npm install -g [email protected]
npm install -g [email protected]
npm install -g [email protected]
Clone the Decentralized-Energy-Composer code
locally. In a terminal, run:
git clone https://github.com/IBM/Decentralized-Energy-Composer
cd Decentralized-Energy-Composer
These commands will kill and remove all running containers, and should remove all previously created Hyperledger Fabric chaincode images:
docker kill $(docker ps -q)
docker rm $(docker ps -aq)
docker rmi $(docker images dev-* -q)
Set the fabric version to v1.2:
export FABRIC_VERSION=hlfv12
All the scripts will be in the directory /fabric-tools
. Start fabric and create peer admin card:
cd fabric-dev-servers/
./downloadFabric.sh
./startFabric.sh
./createPeerAdminCard.sh
Next generate the Business Network Archive (BNA) file from the root directory:
cd ../
npm install
The composer archive create
command in package.json
has created a file called [email protected]
.
Now, we are ready to deploy the business network to Hyperledger Fabric. This requires the Hyperledger Composer chaincode to be installed on the peer, then the business network archive (.bna) must be sent to the peer, and a new participant, identity, and associated card must be created to be the network administrator. Finally, the network administrator business network card must be imported for use, and the network can then be pinged to check it is responding.
First, install the business network:
composer network install --card [email protected] --archiveFile [email protected]
Start the business network:
composer network start --networkName decentralized-energy-network --networkVersion 0.1.15 --networkAdmin admin --networkAdminEnrollSecret adminpw --card [email protected] --file networkadmin.card
Import the network administrator identity as a usable business network card:
composer card import --file networkadmin.card
Check that the business network has been deployed successfully, run the following command to ping the network:
composer network ping --card [email protected]
First, go into the angular-app
folder and install the dependency:
cd angular-app/
npm install
To start the application:
npm start
The application should now be running at:
http://localhost:4200
The REST server to communicate with network is available here:
http://localhost:3000/explorer/
Once the application opens, create participants and fill in dummy data. Create Residents, Banks and Utility Companies.
Execute transactions manually between Residents, Resident and Bank, and Resident and Utility Company. After executing transactions, ensure the participants account values are updated.
At the end of your session, stop fabric:
cd ~/fabric-tools
./stopFabric.sh
./teardownFabric.sh
This application demonstrates a basic idea of a decentralized energy network using Blockchain and can be expanded in several ways:
The blockchain network can be deployed to IBM Cloud.
You can use the IBM Blockchain platform and start for free under Starter Membership Plan
. Follow these instructions to deploy the business network to IBM Blockchain platform.
This code pattern is licensed under the Apache Software License, Version 2. Separate third party code objects invoked within this code pattern are licensed by their respective providers pursuant to their own separate licenses. Contributions are subject to the Developer Certificate of Origin, Version 1.1 (DCO) and the Apache Software License, Version 2.