-
Download and install NodeJS
Download and install NodeJS from here.
-
Install truffle and ganache-cli using node packager manager (npm)
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/achintyanath/Decentralized-Voting-System.git cd Decentralized-Voting-System
-
Run local Ethereum blockchain
ganache-cli
Make sure not to close
ganache-cli
(this network needs to be running all the time) -
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. -
Deploy smart contract to ganache-cli
# on the dVoting directory truffle migrate
Note: Use
truffle migrate --reset
for re-deployments -
Launch the development server (frontend)
cd client npm install npm start