Home / Projects / BVDI
Digital Transformation · Civic Technology · Data Systems

BVDI — Badagry Voters Digitization Initiative

A secure, accurate, and digitally connected civic information system engineering consented voter data management, recruiter code attribution, VIN privacy masking, and immutable audit logging across all 10 official wards of Badagry Local Government.

Primary Role Lead Full-Stack Solutions Architect
Architecture MERN (Vite + React / Node.js + Express)
Geographic Scope 10 Badagry Wards (Jegba to Topo-Idale)
Privacy Standard Cryptographic VIN Masking & Explicit Consent
01

Project Overview

The Badagry Voters Digitization Initiative (BVDI) is a civic technology transformation project commissioned to establish an accurate, secure, and digitally structured voter engagement database across the Badagry Local Government Area in Lagos State, Nigeria.

Before this initiative, grassroots mobilization and civic engagement relied on fragmented, handwritten paper lists, uncontrolled phone rosters, and unverifiable claims of local community outreach. BVDI transformed this landscape into an audited, centralized digital platform operating across two dedicated workspaces: a high-speed mobile Recruiter Portal for field agents and a supervisory Administrative Command Center with real-time ward telemetry.

Badagry Voters Digitization Initiative Official Identity
Figure 5.1: BVDI official brand identity and visual emblem.
02

The Problem Solved

Grassroots community coordination in Badagry suffered from acute data fragmentation:

✕ The Pre-Digital Pain Points

  • Manual Paper Records: Field recruiters recorded voter details in paper notebooks that were easily damaged, lost, or illegible.
  • Duplicate & Fraudulent Entries: Recruiters had financial incentives to report high numbers, resulting in repeated names and fictitious voter identification numbers (VINs).
  • Zero Data Privacy: Unprotected physical papers exposed sensitive voter personal data, addresses, and phone numbers to unauthorized eyes.
  • Lack of Spatial Clarity: Administrators had no real-time breakdown of voter coverage across individual wards and polling units.

✓ The BVDI Digital Architecture

  • Unique VIN Deduplication: Unique database constraints enforce that no Voter Identification Number can ever be registered more than once.
  • Recruiter Attribution & Audit Logs: Every submission is immutably tagged with the recruiter's unique code and logged in an immutable AuditLog collection.
  • Cryptographic Data Masking: Sensitive VIN numbers are masked (************1234) in standard recruiter views to preserve privacy.
  • Ward-Level Granular Analytics: Real-time visualizations aggregating registrations across all 10 Badagry wards.
03

The Solution Developed

I architected BVDI as an accessible, highly secure full-stack system built to function reliably on mobile browsers in low-bandwidth rural environments:

📲

Mobile Recruiter Portal

Lightweight registration interface optimized for Android smartphones, featuring rapid ward dropdowns, polling unit inputs, and mandatory voter consent checkboxes.

🔒

Mandatory Consent Engine

Server-enforced validation ensuring that registrations without explicit voter authorization (consent === true) are rejected immediately.

🛡️

Immutable Audit Trail

Every create, update, export, and login event is captured in an audit ledger recording recruiter ID, action timestamp, and network IP address.

📊

Admin Command Dashboard

Real-time demographic analytics (age, occupation, ward distributions), recruiter leaderboard monitoring, and filtered CSV exports.

04

Ward Coverage & Core Schema Design

The backend strictly enforces the official 10 INEC-designated wards of Badagry Local Government through typed Mongoose schema validation:

  • Ward A: Jegba
  • Ward B: Posukoh
  • Ward C: Awanjigoh
  • Ward D: Aovikoh
  • Ward E: Ajara Vetho
  • Ward F: Ajara Topa
  • Ward G: Ajido
  • Ward H: Iyafin
  • Ward I: Ikoga
  • Ward J: Topo-Idale

Voter Schema Highlights: Includes minimum age validation (min: [18, 'Voter must be at least 18 years old']), uppercase VIN normalization with uniqueness constraints, recruiter attribution tagging, and compound database indices on recruiterCode, ward, and phoneNumber.

05

System Architecture

BVDI Secure Architecture Vite + Node + MongoDB
Client Layer
Vite 6 React frontend with Plus Jakarta Sans typography, local storage token management (bvdi_token), and mobile responsive forms.
Security Gateway
Express auth middleware verifying JWT bearer tokens, enforcing role boundaries (admin vs. recruiter), and sanitizing input payloads.
Database Layer
MongoDB collections: Voter, User, AuditLog. Automated server-side masking via schema virtuals and methods.
06

My Technical Contributions

  • Backend & API Design: Engineered the Express server, controllers, and MongoDB models with strict validation and indexing.
  • Data Privacy Engineering: Authored the getMaskedVIN() method and role-based data visibility controllers to protect sensitive citizen data.
  • Audit & Security Logging: Built the background audit logging service recording all database access and mutation events.
  • Mobile Frontend UI: Developed the Vite React interface specifically designed for rapid data entry under field conditions.
07

Technology Stack

React.js (Vite) Node.js Express.js MongoDB Atlas Mongoose ORM JWT & Bcryptjs Audit Trail Engine Plus Jakarta Sans
08

Engineering Decisions & Data Ethics

1. Explicit Consent as a Hard Database Constraint Privacy Compliance

Rather than treating voter consent as a soft frontend checkbox, I embedded it directly into the Mongoose schema validator: validate: { validator: (v) => v === true, message: 'Explicit consent is mandatory' }. Even if a rogue client bypassed the UI, the database outright rejects unconsented data.

2. Recruiter Code Attribution & Zero Duplicate Policy Anti-Fraud Engine

Field recruiters are assigned permanent uppercase codes (e.g. REC-BAD-04). When registering voters, the VIN is normalized and evaluated against unique sparse indices, completely eliminating duplicate registration fraud across recruiters.

09

Operational Impact

BVDI gave community coordinators across Badagry unprecedented visibility into grassroots civic participation. By replacing perishable paper logs with an immutable, privacy-compliant digital repository, the initiative eliminated duplicate entries, empowered field recruiters with modern digital tools, and created a trustworthy, consented voter information asset.

10
Badagry Wards Covered
100%
Consent-Verified Entries
0
Duplicate VIN Ingestion
Audit
Complete Activity Logs