New Elections: Real-Time Polling DApp

Alishba Imran
Dec 25, 2018 · 3 min read

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.

Alishba Imran

Written by

Passionate 15-year-old on a journey to solve the world’s most important problems.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade