The problem of fair and democratic elections is definitely one of the toughest problems faced by the world today. Corruption and distrust everywhere stand as obstructions to the conduction of such elections. The blockchain technology could definitely help a little in this aspect. Decentralised elections can fix the issue of trust and guarantee fair elections. However implementing such a solution nationwide is not an easy task considering the presence of people in many developing countries who are not even familiar with or seen smartphones. NITCVote is a project to tackle a much smaller use case; elections within universities for student representatives. The project is based on Johannes Mols ethVote project and has been enhanced to provide better security and secrecy of votes.
The code for this project is distributed in three repositories:
Smart Contracts
Backend
Frontend
Install these prerequisites to follow along with the tutorial.
- NPM: https://nodejs.org
- Truffle: https://github.com/trufflesuite/truffle
- Ganache: http://truffleframework.com/ganache/
- Metamask: https://metamask.io/
- Geth (for a private ethereum chain deployment)
git clone https://github.com/farisshajahan/NITCVote
$ cd election
$ npm install
Open the Ganache GUI client that you downloaded and installed. This will start your local blockchain instance. Alternatively run your own Geth node for a production setup.
$ truffle migrate --reset
You must migrate the election smart contract each time you restart ganache.
- Unlock Metamask
- Connect metamask to your private Etherum blockchain / Ganache
- Import an account from the chain