New Elections: Real-Time Polling DApp

How blockchain will revolutionize the current election system and a Real-Time Polling DApp I developed.

What are DApps?

Have you ever heard the term DApp while speaking about Blockchain or technologies in general? Ever wondered what it is? Well, a DApp is essentially a decentralized application (meaning that everything is not connecting to one network) and it utilizes blockchain technology and allows you perform the same actions you would today but without a trusted third party. Everything is a lot more transparent and safe.

A blockchain is a permanent record of transactions that are distributed, and every action can be traced back to exactly when and where it happened. As well, past actions cannot be changed, while the present can’t be hacked, because every transaction is verified by every single node in the network. And any outside or inside attacker must have control of 51% of the nodes to alter the record.

Polling DApp

This concept works very well in situations where often we have a trusted third party like in banks, shopping, and voting systems. What if there was a new way to vote or do polls without putting that trust in a third party? There is! I used this concept and created my own “Real-Time Polling DApp”, and here’s how it works.

How the Poll Works

On the front-end, there is a simple poll where a few options are listed and you are able to choose an option, and one vote is registered. At the bottom, there is also a chart which shows the results in Real-Time.

Real-Time Updates

The app is “real-time” which basically means that you don’t have to refresh your page to see the different results coming in. For example, if you have someone voting from Canada and then someone else voting from America, both will be able to vote and the graph will automatically reflect the votes.

Person on the Right voted but both the graphs (right & left) were updated to reflect an extra point for Linux.

MongoDB (database)

As the creater, I also used the MongoDB which is basically just a remote mongo database, where you can see all the different votes and each vote has an ID attached to it (which is added by default) and also has an OS and points. I set points to 1 so each vote would only count for 1 point.

Learn More…

If your interested and would like to learn more about how I created this DApp with code, and programs explanations, feel free to watch the video attached.

If you enjoyed reading this article, please press the👏 button, and follow me to stay updated on my future articles. Also, feel free to share this article with others!

Follow me on Medium and LinkedIn to stay updated with my progress in Blockchain.

I’m a developer & innovator who enjoys building products and researching ways we can use AI, Blockchain & robotics to solve problems in healthcare and energy!

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store