Decentralized Voting

The project is based on developing a decentralized application (Dapp) for electoral polling systems. It allows voters and administrators to organize voting in a decentralized manner (without depending on a single administrative body). The electoral polling dapplication developed in this project is based on the ethereum blockchain technology.

Tech Stack

  1. Frontend - CSS, JS
  2. Backend - Node, Truffle
  3. Local Blockchain - Ganache, Metamask
  4. Smart contracts - Solidity

Configure code on your system

  1. Clone the repo
git clone https://github.com/pandeyanuradha/Decentralized-Voting-Website.git
cd Decentralized-Voting-Website
  1. Run local Ethereum on Command Line Interface (CLI)
ganache-cli
  1. Configure Metamask on your browser

New RPC URL: http://localhost:8545
Chain ID: 1337

  1. Import accounts using Private keys from ganache-cli to Metamask
  2. Deploy smart contract
truffle migrate
  1. Launch the development server
cd client
npm install
npm start

Working of Decentralized Voting Website

  1. Ganache workspace

  1. Admin will create a voting instance by launching/deploying the system in a blockchain network (EVM), then create an election instance and start the election with the details of the election filled in (including candidates for voters to vote). On startup, the homepage is displayed.

  1. Metamask deduction for admin.

  1. Add candidates

  1. The voters can register through the registration portal

  1. Admin approves the voter

  1. Cast their votes

  1. After some time, depending on the scale of the election the admin ends the election. As that happens the voting is closed and the results are displayed announcing the winner at the top of the results page. Election Results are displayed.