Election integrity engineered in C++.
A secure voter management system built in C++ with a web interface — handling voter registration, authentication, ballot casting, and result tabulation with strict validation rules, object-oriented architecture, and data persistence across sessions.
The Problem
Digital voting systems are notoriously hard to get right. Most student-built systems have no meaningful access control, allow double-voting, and store results in memory that disappears on restart. Building a system that is actually secure — even as a prototype — requires thinking about trust boundaries, authentication, and data integrity from the start.
The Solution
A C++ backend implementing a complete voter lifecycle — registration with unique voter ID generation, PIN-based authentication, single-vote enforcement via a voted flag, result tabulation, and JSON file persistence. A Node.js API layer exposes this to a minimal web frontend.
Features
Voters authenticate with their unique ID and PIN before accessing the ballot. Failed authentication is logged with a lockout after 3 attempts.
A voted flag is set atomically when a ballot is cast — subsequent vote attempts by the same voter are rejected at the C++ layer before reaching the ballot.
Admin panel shows real-time vote counts per candidate, voter turnout percentage, and a final results declaration when the election closes.
Voter records and vote counts are serialised to JSON files — the system recovers full state on restart with zero data loss.
System Architecture
Technology Stack
Backend
API Bridge
Frontend
Challenges & Solutions
Demo & Screenshots
Voter authentication and ballot interface
Explore the full source code and documentation.