Ethereum blockchain voting system with smart contracts, MetaMask login, admin panel and live results. Full source code for final year projects.
Elections only work when people trust the count. This Decentralized Voting System Using Ethereum Blockchain replaces the "just trust the admin" model with smart contracts, where every vote is written to the blockchain and can never be edited, deleted or double-cast. It is one of the strongest final year project choices for BCA, MCA, B.Tech CS/IT and MCA students who want something beyond a normal management system.
You get the complete working source code, smart contracts, database API, setup guide and demo video, ready to run on your own machine.
| Traditional Problem | Blockchain Solution |
|---|---|
| Admin can edit stored votes | Smart contract logic is immutable once deployed |
| Same person votes twice | Contract tracks each wallet address and rejects duplicates |
| Central server goes down | Decentralized ledger with no single point of failure |
| No way to audit the result | Every transaction is publicly verifiable |
| Database can be hacked | Records cannot be overwritten or removed |
| Component | Technology |
|---|---|
| Blockchain | Ethereum |
| Smart Contract Tools | Truffle, Ganache |
| Frontend | HTML, CSS, JavaScript |
| Backend Support | Node.js |
| API Layer | FastAPI (Python) |
| Database | MySQL |
| Wallet | MetaMask |
The admin logs in, creates the candidate list and sets the voting window. A voter registers, authenticates through JWT and connects their MetaMask wallet. When the voter submits a choice, the vote is sent as a transaction to the deployed smart contract on the Ethereum network, where the contract checks whether that wallet address has already voted before accepting it. Results are read directly from the chain, so the displayed count always matches what is actually recorded.
MySQL is used alongside the blockchain for voter profile data and authentication, which makes the project easy to demonstrate while keeping the vote itself on-chain.
The project can be extended with OTP or biometric verification, mobile responsive UI, role-based dashboards, election result reports, cloud deployment and migration to a public Ethereum testnet such as Sepolia.
Watch the full project walkthrough here: Voting System Using Ethereum Blockchain - Demo
Read the complete write-up on our blog: Voting System Using Ethereum Blockchain
Note: This project is provided for educational and academic purposes. Basic knowledge of Node.js, Python and MetaMask will help you set it up faster.
1. Download and extract the ZIP file 2. Install and open Ganache, then create a new workspace 3. Install the MetaMask extension and connect it to the Ganache local network 4. Create the MySQL database and import the provided voter table 5. Install Truffle globally: npm install -g truffle 6. Run npm install in the main project folder 7. Run pip install -r requirements.txt inside the database API folder 8. Update the DB credentials in the .env file inside the database API folder 9. Compile contracts: truffle console, then compile 10. Bundle the app JavaScript for the browser 11. Start the Node.js server: npm run dev 12. In a second terminal, start the FastAPI server from the database API folder 13. In a third terminal, run: truffle migrate 14. Open the local URL in your browser and start voting
FAQ for this project coming soon.
No reviews yet. Be the first to review!