A decentralized blockchain-based voting application built with Solidity, enabling transparent, secure, and verifiable on-chain polling.
Users can create or participate in polls with options for public/private visibility, ensuring fairness and decentralization without relying on a central authority.
Here are some key screenshots from the Voting DApp:
This DApp allows anyone to connect their Ethereum wallet (MetaMask) and:
- Create public or private polls.
- Vote securely on any available polls.
- Manage their own polls and track results in real time.
- Restrict voting access in private polls only to allowed voters.
- View all public polls created by the community.
Every page in the application dynamically fetches data directly from the blockchain, ensuring users always see the most accurate on-chain state.
Additionally, the DApp maintains off-chain data copies (in MongoDB or another database) for analytics, caching, and improved performance — ensuring both on-chain transparency and off-chain reliability.
| Layer | Technology |
|---|---|
| Smart Contracts | Solidity, Foundry (Forge, Anvil, Cast) |
| Frontend | React (Vite), TailwindCSS, React Router DOM |
| Blockchain Interaction | ethers.js, web3.js |
| Wallet | MetaMask (Ethereum Sepolia Testnet) |
| Backend (Optional) | Node.js / Express.js |
| Storage | MongoDB (for off-chain caching) |
Users log in using their Ethereum wallet (MetaMask).
No centralized authentication — wallet address is the user identity.
- Open for everyone to view and vote.
- Each poll and vote are stored permanently on-chain.
- Creator specifies allowed voter addresses.
- Only those addresses can participate in voting.
- Provides controlled and restricted access.
- Dashboard showing polls created by the logged-in user.
- Manage, share, and track polls with live updates.
- Displays all polls where the user has voted.
- View your voting history and results easily.
- Each poll has a start and end time.
- Automatically closes when the timer expires.
- Ensures fair and time-bound participation.
- All votes, poll creation, and ownership are verifiable on-chain.
- No single point of control or manipulation.
- Real-time data (polls, votes, results) fetched from blockchain.
- Off-chain database stores metadata and analytics for backup.
- Guarantees both decentralized integrity and centralized efficiency.
# Clone repository
git clone https://github.com/<your-username>/<repo-name>.git
cd <repo-name>
# Install frontend dependencies
cd frontend
npm install
# Compile & test smart contracts
forge build
forge test
# Deploy contracts
forge script script/Deploy.s.sol:DeployScript --rpc-url <RPC_URL> --private-key <PRIVATE_KEY> --broadcast
# Run frontend
npm run dev


