A decentralized voting application built on Ethereum (Sepolia Testnet) that enables secure, transparent, and tamper-proof elections using modern Web3 tools.
This Voting System DApp leverages Ethereum's Sepolia Testnet to provide:
- 🛡️ Immutable vote recording
- 🔍 Fully transparent voting history
- 🔒 MetaMask wallet authentication
- 📊 Real-time results tracking
- ⏱️ Configurable voting periods
Deployed using Alchemy infrastructure with Foundry for smart contract development.
- ✅ Vote creation and management
- ✅ Voter whitelisting system
- ✅ Time-bound voting sessions
- ✅ Real-time vote tracking
- ✅ Results verification
Frontend:
- Next.js (React Framework)
- Tailwind CSS
- Ethers.js
Smart Contracts:
- Solidity
- Foundry (Forge, Cast)
- OpenZeppelin Contracts
Infrastructure:
- Sepolia Testnet
- Alchemy RPC & API
- Vercel (Frontend Hosting)
Network: Sepolia Testnet
Contract Address: 0x... (Add your contract address here)
Verified on: Etherscan (Add link)
Key contract functions:
createVote()- Admin creates new voting sessionaddCandidate()- Add voting optionsvote()- Cast a votegetResults()- View current results
- Clone the repository:
git clone https://github.com/sidrahh12/Voting-System-DApp.git
cd Voting-System-DApp- Install dependencies:
npm install- Set up environment variables:
cp .env.example .env.localFill in your:
NEXT_PUBLIC_ALCHEMY_API_KEY
NEXT_PUBLIC_CONTRACT_ADDRESS
NEXT_PUBLIC_WALLET_CONNECT_PROJECT_IDSmart Contracts (using Foundry):
forge build
forge script script/DeployVoting.s.sol --rpc-url $SEPOLIA_RPC_URL --broadcast --verify -vvvvnpm run build
npm run start
(Or deploy to Vercel via GitHub integration)Connect your MetaMask wallet to Sepolia Testnet
Get test ETH from Sepolia Faucet
- As admin:
-
Create voting sessions
-
Manage candidates
-
Whitelist voters
- As voter:
-
View active elections
-
Cast your vote
-
Verify transaction on Etherscan









