Skip to content

A decentralized voting system based on Ethereum blockchain technology (designed for corporate use).

License

Notifications You must be signed in to change notification settings

itsNue/u-vote_project

Repository files navigation

Decentralized Voting (UxVote)

A decentralized voting system based on Ethereum blockchain technology (designed for corporate use).

System Workflow

Below is a brief explanation of the basic workflow of the dVoting application.

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 and adding candidates for voters to vote. Then voters with their blockchain account connect to the same blockchain network register to become a voter. When a user registers to be a voter the registration details are displayed in the admins' panel (i.e. verification page) and the admin will check if the registration information (blockchain account address, name and phone number/nic number) is valid and matches with his record. If the registration is valid then the admin approves the registered user and the registered user becomes eligible to take part in the created election. The registered user (voter) then from the voting page casts his/her voter the candidate of his/her interest. After some time, depending on the scale of the election the admin ends the election. As soon as the election ends the voting is closed and the results are displayed avouching the winner at the top of the results page.


Requirements

Setting up the development environment

Getting the requirements

  1. Download and install NodeJS

    node.js v14.15.4

    Download NodeJS from here.

  2. Install truffle and ganache-cli

    truffle v5.2.4
    ganache-cli v6.12.2

    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/itsnue/u-vote_project.git
    cd u-vote_project
  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 following details

    New RPC URL [CLI] : http://localhost:8545
    New RPC URL [GUI] : http://localhost:7545 Chain ID: 1337

  4. Import accounts using private keys from ganache-cli to the metamask extension on the browser

  5. Deploy smart contract to the (local) blockchain

    # on the dVoting directory
    truffle migrate

    Note: Use truffle migrate --reset for redeployments

  6. Launch the development server (fronted)

    cd client
    npm install
    npm start

# That is all.

About

A decentralized voting system based on Ethereum blockchain technology (designed for corporate use).

Topics

Resources

License

Stars

Watchers

Forks