ParitoshKabra / Decentralized-Voting-System

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Setting up the development environment

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/achintyanath/Decentralized-Voting-System.git
    cd Decentralized-Voting-System
  2. Run local Ethereum blockchain

    ganache-cli

    Make sure not to close ganache-cli (this network needs to be running all the time)

  3. Configure metamask on the browser with the following details
    Switch on Test Networks on MetaMask
    Select LocalHost 8545
    Import the first account (for admin access) from ganache-cli to the metamask extension on the browser.
    Import other accounts from ganache-cli to metamask extension to login as normal voter.
    For detailed explanation, refer to the demo video.

  4. Deploy smart contract to ganache-cli

    # on the dVoting directory
    truffle migrate

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

  5. Launch the development server (frontend)

    cd client
    npm install
    npm start

About

License:MIT License


Languages

Language:JavaScript 77.1%Language:CSS 12.5%Language:Solidity 8.0%Language:HTML 2.4%