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/Md-TarikulIslam/BlockVote.git
    cd BlockVote
  2. Run local Ethereum blockchain / Launch Ganache GUI.

    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://localhost:8545
    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 BlockVote directory
    truffle migrate

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

  6. Launch the development server (frontend)

    cd client
    npm install
    npm start