Skip to content

The Decentralized Voting Platform aims to leverage Ethereum blockchain technology to provide a tamper-proof, secure, and transparent voting solution.

Notifications You must be signed in to change notification settings

Abil-Shrestha/Decentralized-Voting-Platform

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 

Repository files navigation

Decentralized Voting Platform (DVP) Setup Guide

To try out the DVP, follow these steps:

Prerequisites

Steps

  1. Clone the Repository and Checkout a New Branch

    mkdir DVP
    cd ./DVP
    git clone https://github.com/mvoyevoda/DecentralizedVotingPlatform.git
    git checkout -b <your-name>
    
  2. Open 3 Separate Terminal Tabs

  3. Terminal Commands

    • Tab 1: Start the Blockchain Node

      cd ./Decentralized-Voting-Platform/Blockchain
      npm install
      npx hardhat node
    • Tab 2: Deploy Contracts and Add a Poll

      npx hardhat ignition deploy ./ignition/modules/DVP.js --network localhost
      npx hardhat run scripts/addSamplePolls.js --network localhost # Create some sample polls
    • Tab 3: Start the Client

      cd ./Decentralized-Voting-Platform/Client 
      npm install
      npm run dev
  4. Connect a test account to MetaMask

    • Go to Tab 1 and copy a private key from one of the 20 default test accounts listed in the terminal output
    • Open up a new tab in Chrome
    • Login to MetaMask (Avoid secret phrase, use only password for simplicity)
    • Import a new wallet using the copied private key
  5. Open the DVP in Browser

    • Open http://localhost:5173/ in Chrome.
    • You should be prompted by MetaMask to connect your wallet to this site. Confirm the connection
  6. Configure MetaMask for Localhost

    • Go to MetaMask settings and add the localhost network:
  7. You're all set! (Make sure to clear MetaMask data if restarting the network)

About

The Decentralized Voting Platform aims to leverage Ethereum blockchain technology to provide a tamper-proof, secure, and transparent voting solution.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 72.9%
  • Solidity 19.6%
  • CSS 6.7%
  • HTML 0.8%