Build a step-by-step, decentralized application (Ethereum Blockchain Dapp) in more than 128 words – Part 2

This article follows the first article on the subject:

Example of decentralized voting application (Dapp)

The user of the decentralized application needs a wallet that contains Ether. As stated in the first article it is possible to easily create a wallet on

First we will use the ropsten network. Ropsten Ethereum, also known as the "Ethereum Testnet", is, as the name suggests, a test network that performs the same protocol as Ethereum and is used for testing purposes before deploying on the main network (Mainnet).

The use will allow us to create and use our app for free before eventually broadcasting it on Ethereum's main network.

When the user connects to our application and the network he sends his vote and has to pay a few fees via his wallet in order to write his transaction in the Blockchain (called "Gas", this term refers to the fees to complete a transaction or execute a contract on the Ethereum blockchain).

Dapp app architecture

The application architecture consists of a front-end that will be in HTML and Javascript. This Frontend will engage directly with the local ethereum blockchain that we will install.

DAPP app architecture

As stated in the first article the business rules and logic will be coded in a Smart Contract. The Smart Contract is written with the solidity programming language:

Creation of the Front-End

The front-end will be simple it allows you to display the result of the vote for your favorite song in the form of a list and to choose from a drop-down list the song for which you wish to vote.

Check node installation

node -v

If node is not installed you can refer to my article on angular:

Metamask installation: Installing as an extension of your browser

Installation of the truffle framework: Truffle is a development environment, a testing framework and an asset pipeline for Ethereum, aimed at making your life easier as an Ethereum developer. It provides tools that allow us to write intelligent contacts with the Solidity programming language.

It will also be used to develop the front-end of the application.

npm install -g truffle

Ganache installation:

Ganache is a personal blockchain for Ethereum development that you can use to deploy contracts, develop your applications and run tests.

This will allow you to have a local blockchain with 10 accounts that are powered with fake Ether.

I started the app and clicked Quick Start

We see the different accounts of our local blockchain.

Leave a Reply

Your email address will not be published.