Blockchain-Based Vote Application On Hyperledger Composer

All the things we should install are finish. Now we can develop a web page and connect to the REST Server. There are 2 versions of the application (one of them developed with jQuery framework and the other one developed with React framework) and they will be explained separately. The source code is available here;

jQuery Version:

According to the official site, jQuery is a fast, small, and feature-rich JavaScript library. It was used to make post and get requests to the REST Server presented by Hyperledger Composer.

The result is shown whenever any candidate is selected as a vote as you see below;

Here is the jQuery Code;

React Version:

According to the official site, React is a JavaScript library for building user interfaces. It is declarative and component-based. It was used to develop the web page and make post and get requests to the REST Server presented by Hyperledger Composer.

The result is shown below. Users can sign into the system and select which candidate they want. Creating a new candidate or deleting an existing candidate are exist in the Candidate tab. Since the user needs to login system, Candidate and Vote tabs redirect to Login screen if the user doesn’t authenticate to the system.

In this project, the vote-react directory is where all React codes and files are placed in and it is available here;

来源

What do you think?

发表评论

电子邮件地址不会被公开。 必填项已用*标注

Loading…

0

Comments

0 comments

Create your first Hyperledger Fabric blockchain network in less than five minutes

7 Crypto Trading Rules for Beginners