A decentralized voting application built on the Ethereum blockchain. This project enables transparent and tamper-proof elections using smart contracts written in Solidity.
- 🏧 Deploy your own election contract on the Ethereum network.
- 🗳️ Voters can cast votes securely using their Ethereum wallets.
- 📊 Real-time vote count tracking via smart contracts.
- 🔒 Ensures fair, transparent, and immutable voting process.
| Layer | Stack |
|---|---|
| Smart Contracts | Solidity |
| Ethereum Tools | Truffle, Ganache |
| Frontend | JavaScript, HTML, CSS |
| Web3 Integration | web3.js |
| Network | Local Blockchain / Testnets |
git clone https://github.com/JoshhSandhu/ETH-Voting.git
cd ETH-Votingnpm installtruffle compiletruffle migrateNote: Ensure Ganache is running locally.
| Folder / File | Purpose |
|---|---|
/contracts |
Solidity smart contracts (Election.sol) |
/migrations |
Deployment scripts for Truffle |
/src |
Frontend source files |
/test |
Smart contract unit tests |
/build/contracts |
ABI & compiled contract files (auto-generated) |
truffle-config.js |
Truffle project configuration |
contracts/Election.sol– Core smart contract defining election logic.src/index.html– Main UI of the voting dApp.truffle-config.js– Configuration for Truffle framework.
truffle testFor deploying on real testnets like Sepolia:
- Configure Infura endpoint in
truffle-config.js. - Add your private key securely using environment variables or HDWalletProvider.
- Run:
truffle migrate --network sepolia-
Fork the repository.
-
Create a feature branch:
git checkout -b feature/YourFeature
-
Make changes and commit:
git commit -m "Add YourFeature" -
Push your branch:
git push origin feature/YourFeature
-
Submit a pull request.
MIT License — open for use and modification.
Developed by JoshhSandhu and contributors.