← All systems
SYS-NEP production

National Election Management Platform

Backend engineering platform coordinating field operations and reporting at nationwide scale.

Status~200,000 records · 3-tier access model
The problem

A national campaign organization needed one platform to run three very different jobs well: maintain an accurate, searchable master registry at national scale; coordinate field operations across a strict three-tier organizational hierarchy; and, on a single high-pressure day, process real-time updates fast enough for leadership to watch results as they came in without the system buckling under peak concurrent load.

What was built
  • Three-tier, query-enforced access control — enforcement happens in the database query itself, not just the API or UI, so a bug in the interface layer could never accidentally expose one region's data to another.
  • A 'latest record wins' data pattern applied consistently — an early version of the reporting layer double-counted people because it joined against every historical update instead of just the most recent one; fixed with a single, reusable query pattern applied everywhere the data was read.
  • A document image-processing pipeline — grayscale conversion, adaptive thresholding for inconsistent lighting, and region-based pixel-density comparison, deliberately built without machine learning because the classical approach was faster, cheaper, and fully auditable against the source image.
  • Asynchronous processing for anything heavy — bulk imports rewritten as a backgrounded, pollable two-stage pipeline; report generation rendered directly inside a background worker with no intermediate storage step; large exports streamed rather than buffered in memory.
  • A real-time dashboard rebuilt after it started timing out under peak load on the day it mattered most, by splitting one heavyweight aggregate query into several smaller, independently cacheable pieces.
  • Single-device session enforcement — each login rotates a server-side session token, and any request carrying an older token is rejected immediately.
The outcome

A platform that ran a national campaign's full field operation and held up under real peak-day load, with a permission model where a coordinator's data scope was enforced by the database itself rather than trusted to the interface, and a document-processing pipeline that gave fast, auditable results without needing a human to manually re-verify every result.

Engineering highlights
  • Access control enforced where it can't be bypassed — query-level scoping instead of UI-only checks, a design requirement at this scale of sensitive data rather than a nice-to-have.
  • The right tool, not the trendy one — classical image processing solved the document-classification problem completely, with full auditability and no training data required.
  • Data integrity treated as a design decision — sanitization moved into the data model's save path itself, so bad data is caught the moment it's written, not cleaned up after the fact.
Stack

Laravel (PHP) · PostgreSQL · Python + OpenCV (image processing) · Async job queues · JWT-based authentication

Screenshots

See it in action.

— loading —
scroll →