← return to matrix

// FULL-STACK — 120+ USERS

Department Voting Platform

Secure real-time voting system for departmental elections serving 120+ users with Firebase and Next.js.

Next.jsFirebaseFirestoreTypeScriptTailwind CSS

Overview

Designed and deployed a secure web-based voting system for departmental elections, handling 120+ voters with real-time vote casting. Built with Next.js and Firebase, featuring role-based access control, Firestore atomic transactions, and real-time result tallying.

Problem

Departmental elections relied on manual paper-based voting — slow, error-prone, and lacking transparency. A digital system was needed that could handle concurrent voters, prevent duplicate votes, and provide real-time verifiable results.

Architecture & Technical Foundation

Core Pattern

Full-Stack Web System

Technology Stack

Next.js 16 + Firebase

Key Components

  • Firebase Authentication for voter identity verification
  • Firestore atomic transactions for vote integrity
  • Role-based access control (voter / admin)
  • Real-time Firestore listeners for live result updates
  • Next.js App Router with server components for SSR

System Workflow

01

Auth

Voter logs in via Firebase Auth — eligibility verified against allowlist.

02

Ballot Display

Candidate list fetched from Firestore, rendered via Next.js SSR.

03

Vote Submission

Atomic Firestore transaction records vote and marks voter as voted.

04

Duplicate Prevention

hasVoted flag checked server-side before each transaction.

05

Live Results

Admin dashboard with real-time Firestore listeners showing vote counts.

06

Audit Trail

Immutable Firestore vote log for result verification and transparency.

Results & Outcomes

120+

Active Users

0

Duplicate Votes

0

Downtime

  • Served 120+ concurrent voters with zero duplicate votes or data integrity issues
  • Real-time vote tallying visible to admins with Firestore live listeners
  • Role-based access control ensures only eligible voters can submit ballots