Skip to content

rxits/dVoting

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Decentralized Voting Application

Overview

The Voting Application is a decentralized system that utilizes blockchain technology to manage and conduct elections. It provides a transparent and secure way for users to register, vote, and view election results. The following document outlines the basic workflow of the application.

Workflow

1. Election Creation

  • Admin Role:
    • The administrator initiates the election process by deploying the application on a blockchain network (Ethereum Virtual Machine, EVM).
    • The admin creates a new election instance and enters the election details, including the list of candidates available for voters to choose from.

2. Voter Registration

  • Voter Role:
    • Prospective voters connect to the same blockchain network and register to become eligible voters.
    • Upon successful registration, the voter's details are sent to the admin's dashboard for verification.

3. Verification Process

  • Admin Role:
    • The administrator reviews the submitted registration details (blockchain account address, name, and phone number) to ensure accuracy and consistency with existing records.
    • If the details are verified and valid, the admin approves the registration, making the voter eligible to participate in the election.

4. Casting Votes

  • Voter Role:
    • Once approved, the voter accesses the voting page to cast their vote for their preferred candidate.

5. Election Closure and Results

  • Admin Role:
    • After the designated voting period concludes, the admin ends the election.
    • The system then closes the voting process and displays the results, with the winning candidate prominently announced at the top of the results page.

Getting Started

Requirements

Getting the requirements

  1. Download and install NodeJS

    Download and install NodeJS from here.

  2. Install truffle and ganache-cli using node packager manager (npm)

    npm install -g truffle
    npm install -g ganache-cli
  3. Install metamask browser extension

    Download and install metamask from here.

Configuring the project for development

  1. Clone this repository

    git clone https://github.com/sharma-rakshit/dVoting.git
    cd dVoting
  2. Run local Ethereum blockchain

    ganache-cli

    Note: Do not close ganache-cli (the blockchain network needs to be running all the time)

  3. Configure metamask on the browser with the following details

    New RPC URL: http://127.0.0.1:8545 (use port: 7545 for ganache gui, update it in the file:truffle-config.js as well)

    Chain ID: 1337

  4. Import account(s) using private keys from ganache-cli to the metamask extension on the browser

  5. Deploy smart contract to the (local) blockchain network (i.e ganache-cli)

    # on the dVoting directory
    truffle migrate

    Note: Use truffle migrate --reset for re-deployments

  6. Launch the development server (frontend)

    cd client
    npm install
    npm start

    If you encounter error during npm install, please note that you might need to install Microsoft Visual C++ Redistributable packages from learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist (here is the direct download link for X64: aka.ms/vs/17/release/vc_redist.x64.exe)

Made with ❤️ by Rakshit Sharma.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors