Link to full research paper: SecureVote-IEEE-paper
This project is a secure and transparent voting system built using blockchain and biometric authentication. It aims to address some of the core issues in traditional and electronic voting systems, such as voter fraud, impersonation, lack of transparency, and low participation. The system combines Ethereum smart contracts with off-chain storage and AI-based face verification to create a practical and scalable voting solution.
Voting today often comes with friction and trust issues. People may avoid voting due to long queues or travel requirements. At the same time, systems are vulnerable to impersonation, double voting, and coercion. This project was built to explore how modern technologies can improve this process in a realistic way.
- Increases voter participation: Since voting can be done remotely, there is no need to commute or stand in long queues.
- Prevents impersonation and fraud: Each voter is verified using a combination of facial recognition (InsightFace) and cryptographic keys.
- Ensures transparency and trust: Votes are recorded on the Ethereum blockchain, making them immutable and publicly verifiable.
- Supports coercion resistance: The system allows controlled re-voting. Only the latest vote is counted, so voters can change their vote if they were pressured earlier.
Frontend: Angular + Typescript
Backend: FastAPI
Blockchain: Ethereum (Sepolia Testnet)
Smart contract: Solidity
Database: MongoDB
Face Recognition: InsightFace
Web3 integration: Web3.py
Cryptographic module: HS256 (used in JWT-based auth), Ed25519 (used in public-private key system for voter credentials), Fernet (used in biometric encryption)
git clone https://github.com/gargibendale/SecureVote.git
cd SecureVoteInstall uv (if not already installed). Create a virtual environment and install dependencies:
uv venv
uv pip install -r requirements.txtRun the backend server:
uv run fastapi devBackend will be available at: http://127.0.0.1:8000
Navigate to the frontend directory ( /voting-system/ ):
cd frontend
npm install
ng serveFrontend will be available at: http://localhost:4200
- Create a wallet using MetaMask
- Get Sepolia test ETH from a faucet
- Deploy the smart contract using Remix IDE or Hardhat
- Copy the deployed contract address
- Use your wallet private key (owner key)
Add the following to your .env file:
CONTRACT_ADDRESS=your_contract_address
OWNER_PRIVATE_KEY=your_wallet_private_key- Create a MongoDB Atlas account
- Create a cluster
- Create a database and required collections
- Obtain your connection string (URI)
Add this to your .env file:
MONGO_URI=your_mongodb_connection_stringAadhaar eKYC Simulation (Required Data)
This project uses a simulated Aadhaar registry to perform eKYC verification during voter registration. Since real Aadhaar integration is not used, you need to populate the database with mock Aadhaar records.
- Create a collection (e.g.,
aadhaar_registry) in your MongoDB database - Insert sample records containing basic identity details (such as name, Aadhaar number, etc.)
- These records are used to validate users during the registration process
Without this dataset, the eKYC verification step will fail and users will not be able to register.
- Start the backend server
- Start the frontend server
- Open the frontend in your browser at http://localhost:4200
The application should now be running locally.
- Perform eKyc verification (with simulated Aadhaar registry)
- Submit biometrics (front, left, right angles)
- Get voter credentials (This step registers user as a voter and provides private key which must be stored securely in PC. It'll be be used later to verify user while voting).
- Notification alerts for upcoming elections
- Detailed election audits in admin console
- Android/iOS compatibility
- Liveness detection
- Layer-2 rollups (e.g. Polygon) for reduced gas fees and higher transaction throughput
On-chain proof (visit Blockscout)








