GithubHelp home page GithubHelp logo

electiondap's Introduction

Decentralized Election

A decentralized voting system based on Ethereum blockchain technology.

System Workflow

A brief explanation on the basic workflow of the 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 (including candidates for voters to vote).
  • Then the likely voters connect to the same blockchain network register to become a voter. Once the users successfully register, their respective details are sent/displayed in the admins' panel (i.e. verification page).
  • The admin then will check if the registration information (blockchain account address, name, and phone number) is valid and matches with his record. If yes, then the admin approves the registered user making them eligible to take part and cast their respective vote in the election.
  • The registered user (voter) following the approval from the admin casts their vote to the candidate of interest (from the voting page).
  • 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.

Setting up the development environment

Requirements

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 [email protected]:vijith07/electionDAP.git
    cd electionDAP
  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: http://localhost:8545
    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 re-deployments

  6. Launch the development server (fronted)

    cd client
    npm install
    npm start

electiondap's People

Contributors

vijith07 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.