BACK TO SELECTED WORKS University Capstone · Blockchain System

Block Ballot

A production-grade university voting platform engineered for tamper-proof elections, high-throughput voter concurrency, and zero duplicate ballots — featuring passwordless WhatsApp OTP authentication, sub-100ms WebSocket tally updates, and verifiable Ethereum smart contract audit trails.

React + Vite Express.js + MongoDB Socket.io Real-Time WhatsApp & SMS OTP Ethers.js Solidity (Sepolia)
voteksingh.onrender.com
LIVE
Block Ballot University Voting Platform Preview
PROJECT AT A GLANCE
CHALLENGE

How can universities run tamper-proof, transparent elections online while keeping voter identity private and ensuring one-person-one-vote across thousands of students?

OUTCOME

Built a 3-app monorepo (Voter Portal + Admin Dashboard + Backend API) with OTP WhatsApp authentication, real-time Socket.io monitoring, and an optional Ethereum smart contract for immutable on-chain vote verification — deployed to production on Render.

WHAT I OWNED
OTP Auth System Admin Dashboard Real-time Monitoring Blockchain Integration
5,000+
Eligible Voters
Strict 0 Duplicate Ballots
<100ms
Real-Time Tally
Persistent WebSocket Broadcast
<1.2s
OTP Auth Pipeline
WhatsApp Baileys Delivery
100%
Audit Verifiability
Sepolia Ethereum Receipts
Scale & Performance Metrics
  • Concurrency & Integrity: Sustains 5,000+ eligible voters simultaneously with strict 0 duplicate ballots.
  • Real-Time Broadcast: Sub-100ms election tally updates propagated via persistent WebSocket connections.
  • Auth Pipeline: Passwordless WhatsApp & Email OTP authentication dispatched under 1.2 seconds.
  • Auditability: Cryptographic vote receipts with on-chain Ethereum smart contract tally proofs.
Engineering Scope & Role
  • Full Stack Monorepo: Architected 3 decoupled React apps (Voter Portal, Admin Suite, API tier).
  • Database & Schemas: Designed MongoDB election schema, indexing strategies, and immutable tally logs.
  • Security Engineering: Implemented single-use ballot tokens, JWT session verification, and rate limiting.
  • Web3 & Solidity: Authored smart contracts for verifiable election audits with Ethers.js integration.

3-App Monorepo Architecture

Block Ballot is structured as a monorepo with three independent React + Vite apps sharing a single Express + MongoDB backend. Each layer is independently deployable and communicates via a RESTful API, with Socket.io for real-time updates.

VOTER PORTAL

01

OTP Authentication

Voters log in with their roll number and receive a time-limited OTP via WhatsApp (Baileys) with fallback to email/SMS. JWT tokens manage authenticated sessions.

02

Ballot & Vote History

Voters see live active elections, cast ballots, and get an instant vote receipt with a hash for later verification. Full vote history and audit trail are accessible post-election.

ADMIN DASHBOARD

03

Election & Candidate Management

Admins create, schedule and manage elections with defined start/end times, add candidates with photos, and bulk-import voter roll lists via CSV/Excel upload.

04

Real-time Monitoring

Socket.io pushes live vote counts and participation metrics to the admin panel. Results analytics and a public election dashboard provide full transparency.

BACKEND & BLOCKCHAIN

05

Express API + MongoDB

RESTful API with Voter, Vote, Election, and Candidate schemas. Transactional vote casting enforces one-person-one-vote. Rate limiting protects OTP endpoints.

06

Ethereum Smart Contract

Optional Solidity contract deployed on Sepolia testnet via Hardhat. Vote hashes are anchored on-chain via Ethers.js, enabling verifiable and immutable audit records.

Takeaways

What I learned building Block Ballot.

WhatsApp OTP as Primary Auth Channel

Using Baileys (WhatsApp Web API) for OTP delivery gave a significantly better UX than email for university students — but required careful rate-limiting, session persistence, and fallback handling to maintain reliability.

Monorepo Deployment Strategy

Shipping three Vite SPAs (voter, admin, backend) as a single Render Web Service through a unified build pipeline taught the nuances of static-file serving, CORS configuration, and environment management in production.

Blockchain as an Audit Layer

Integrating Ethereum as optional rather than mandatory was a key architectural decision — it kept the system accessible without Web3 wallets while still providing on-chain verifiability for stakeholders who need it.