A decentralized voting system based on Ethereum blockchain technology.
-
Download and install NodeJS
node.js
v14.15.4
Download NodeJS from here.
-
Install truffle and ganache-cli
truffle
v5.2.4
ganache-cliv6.12.2
npm install -g truffle npm install -g ganache-cli
-
Install metamask browser extension
Download and install metamask from here.
-
Clone this repository
git clone https://github.com/AbhinavSharma24/BlockVote.git cd BlockVote
-
Run local Ethereum blockchain
ganache-cli
Note: Do not close
ganache-cli
(the blockchain network needs to be running all the time) -
Configure metamask on the browser with following details
New RPC URL:
http://localhost:8545
Chain ID:1337
-
Import accounts using private keys from ganache-cli to the metamask extension on the browser
-
Deploy smart contract to the (local) blockchain
# on the dVoting directory truffle migrate
Note: Use
truffle migrate --reset
for redeployments -
Launch the development server (fronted)
cd client npm install npm start