Skip to content

tiagogalvao7/voting-dapp

Repository files navigation

🗳️ Decentralized Voting DApp

A decentralized voting application (DApp) built on the Ethereum blockchain. It enables transparent and immutable voting processes. The contract owner can register voters and add candidates, while registered voters can cast their votes securely and verifiably.


✨ Features

🔐 Wallet Connection

  • Connects to MetaMask to interact with the Ethereum blockchain.

👑 Owner Actions

  • Register Voters: Add eligible voters using their wallet addresses.
  • Add Candidates: Add candidates to the voting pool.
  • End Voting: Close the voting session when finished.

🗳️ Voter Actions

  • View Candidates: Display all candidates and current vote counts.
  • Check Status: Verify registration and voting status of the connected wallet.
  • Vote: Cast a vote for a chosen candidate (if registered and not yet voted).

🛠️ Technologies Used

  • Solidity – Smart contract development
  • Hardhat – Ethereum development environment
  • Ethers.js – Blockchain interaction in the frontend
  • React – User interface
  • Vite – Frontend build tool
  • MetaMask – Wallet connection and transaction signing

⚙️ Setup and Installation

🔍 Prerequisites

  • Node.js (LTS recommended)
  • npm (comes with Node.js)
  • MetaMask browser extension (connected to Sepolia testnet)
  • Sepolia ETH (from a faucet)
  • RPC URL + API Key (from Alchemy or Infura)

About

Simple voting Dapp with React and JS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published