Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Fabric | 14,623 | 113 | 6 hours ago | 255 | March 22, 2022 | 154 | apache-2.0 | Go | ||
Hyperledger Fabric is an enterprise-grade permissioned distributed ledger framework for developing solutions and applications. Its modular and versatile design satisfies a broad range of industry use cases. It offers a unique approach to consensus that enables performance at scale while preserving privacy. | ||||||||||
Fabric Samples | 2,505 | 2 | 5 days ago | 42 | April 23, 2021 | 84 | apache-2.0 | TypeScript | ||
Samples for Hyperledger Fabric | ||||||||||
Fabric Sdk Java | 1,097 | 92 | 9 | a month ago | 49 | July 07, 2022 | 3 | apache-2.0 | Java | |
Docker Compose Files | 920 | a month ago | 1 | Go | ||||||
Some typical docker compose templates. | ||||||||||
Fabric Sdk Go | 845 | 35 | 58 | 8 months ago | 39 | February 11, 2022 | 37 | apache-2.0 | Go | |
Fabric Sdk Node | 773 | 1,043 | 76 | 20 days ago | 821 | July 05, 2022 | 5 | apache-2.0 | JavaScript | |
Hyperledger Fabric SDK for Node https://wiki.hyperledger.org/display/fabric | ||||||||||
Build Blockchain Insurance App | 715 | 7 months ago | 37 | apache-2.0 | JavaScript | |||||
Sample insurance application using Hyperledger Fabric | ||||||||||
Hyperledger_code_fabric | 618 | 2 years ago | other | |||||||
Code analysis on hyperledger fabric project | ||||||||||
Blockchainer Roadmap | 478 | 3 months ago | 1 | |||||||
Roadmap of learning blockchain technology and business knowledge summarized by ZJUBCA(浙大区块链协会总结的区块链知识学习路线). Welcome to contribute!!! | ||||||||||
Awesome Hyperledger Fabric | 431 | 4 months ago | ||||||||
A curated list of resources for creating applications with hyperledger fabric |
Demonstrate the use of Hyperledger Fabric for building a collaborative crowdfunding platform
Crowdfunding is practice of funding that operates independently of any government and is a way for people, businesses and charities to raise money. It is a way of raising finance by asking a large number of people each for a small amount of money. People invest simply because they believe in the cause. There are several types of crowdfunding (donation based, rewards based, debt, equity) but not all types of crowdfunding are regulated by government organizations like the UK's Financial Conduct Authority.
Crowdfunding has many benefits, but it also comes with a substantial risk of fraud -- as well as a number of potential risks, such as loss of money, locked-in investment, lack of income, and lack of information. Many people worry about being scammed by a fraudulent request, due in large part to crowdfunding's lack of transparency and trust. There have been few reported cases of fraud in crowdfunding -- particularly when compared to the number of transactions and amounts involved -- however as the number of crowdfunding platforms grows, so does the risk that platform operators themselves may engage in or enable fraud.
This code pattern showcases blockchain-enabled crowdfunding by showing you how to use a Hyperledger Fabric network to build a platform to aid crowdfunding. This network provides a holistic view of the requirement and its current status -- which helps to address the need more efficiently, and reduces the problems of over-collection or under-collection for a need. All of this means that the platform creates trust, accountability, and operational transparency.
In this code pattern, we have taken an example of the crowdfunding event - "Raise funds to increase Green Cover".
When the reader has completed this code pattern, they will understand how to:
If you want to deploy this code pattern using IBP extension on VSCode, please refer README-VSCodeDeploy.md.
Follow these steps to setup and run this code pattern. The steps are described in detail below.
Clone the repo using the below command.
git clone https://github.com/IBM/blockchain-enabled-crowdfunding
In this repository,
Create IBM Kubernetes Service
Create a Kubernetes cluster with Kubernetes Service using IBM Cloud Dashboard. This pattern uses the free cluster.
Note: It can take up to 15-20 minutes for the cluster to be set up and provisioned.
Create IBM Blockchain Platform Service
Create IBM Blockchain Platform service instance using IBM Cloud Dashboard.
In this step, we will setup the Hyperledger Fabric network using IBM Blockchain Platform as explained below.
Follow this tutorial to create fabric network using IBM Blockchain Platform. The blockchain network should consist of two organizations with single peer each and an orderer service for carrying out all the transactions.
Smart contract(chaincode) is available here.
Package the smart contract
To package follow the instructions provided here as step 12. For your convenience, packaged smart contract(.cds) is also provided in repo under chaincode
directory. You can use this file directly to install smart contract.
Install and Instantiate smart contract
.cds
file generated/downloaded as explained in previous step.init
and no parameters OR we can leave it blank as we are using the default function name (init) only.Download connection profile
Instantiation of smart contract has to be followed by integrating the blockchain network with Fabric Java SDK. Follow the below steps to download Connection Profile
.
Under Instantiated smart contracts
section, click on the three vertical dots for your smart contract as shown. Click on Connect with SDK
option.
Provide the MSP name
and Certificate Authority
. Scroll down and click on Download Connection Profile
.
Rename the downloaded json file as connection_profile.json
.
Place this file in fabric-java-sdk-app/src/main/resources/
. It gets loaded through ConnectionProfileLoader.java
Here, we use the Fabric Java SDK App to build a client to invoke and query chaincode on the hyperledger fabric network.
Open the manifest.yml
file under fabric-java-sdk-app
directory. Under env
section, provide the valid credentials for an user who can execute transactions in the network. Also update Organization Affiliation and Chaincode name.
applications:
- name: blockchain-enabled-crowdfunding-java
random-route: true
memory: 1024M
path: target/crowdfunding-java.war
buildpack: java_buildpack
env:
admin: <admin-username>
adminpw: <admin-password>
OrgAffiliation: <affiliation>
ChainCodeName: <Chaincode-Name>
Note: In this pattern, we are using admin credentials directly for executing transactions.
Next, on the command terminal go to blockchain-enabled-crowdfunding
directory, and execute the below commands:
cd fabric-java-sdk-app
mvn clean install
ibmcloud cf push
Login to IBM Cloud
. On the Dashboard
, verify that an app blockchain-enabled-crowdfunding-java
is running fine.
Make a note of this Fabric Java SDK client application's url. On IBM Cloud dashboard, click on the application. When application page opens, click on Visit App URL
. Now make a note of the url, as shown on the browser, even if the page shows some error. If the url ends with a /
then remove the trailing forward slash. This url should be provided in web application that interacts with this Fabric Java SDK client application.
A web application is provided to perform various operations like Donate
, View Supporters
etc. Web application code can be found under webapp
directory.
This web application invokes rest interfaces implemented in Fabric Java SDK client application as explained above. Hence the web application needs Fabric Java SDK client application url for rest invocations.
Perform the following steps:
Run the below command.
cd webapp
Update the Java application url (as noted in section 3) in config.js
file of webapp
directory.
Deploy the application to IBM Cloud using the command:
ibmcloud cf push
Deployment might take a few minutes to complete. Ensure that there are no errors while deploying the application.
Login to IBM Cloud
. On the Dashboard
, verify that an app blockchain-enabled-crowdfunding-webui
is running fine. Click on the web application entry. When application page opens, click on Visit App URL
. Web application page opens.
It shows the crowdfunding project details, current status of funds raised and the tasks that you can perform. To donate, click on Donate
. Provide the required details and click on Donate Now
to donate. Click on View Supporters
to view the list of supporters who have donated.
Note: The images used in UI are downloaded from internet which are free to use and share.
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.