Executive Summary: Problem, Solution & Engineering Impact
| Dimension | Project Insight |
|---|---|
| Institutional Problem | Manual paper workflows and fragmented forms for thousands of faculty and administrative staff, creating high risk of data loss, duplicate records, and multi-week processing delays. |
| Engineering Solution | Next.js institutional portal with real-time QR code verification, high-concurrency Docker/Nginx containerization, and offline XLSForms instruments. |
| Operational Impact | Successful census of 1,000+ faculty and staff members, proactive monitoring with rapid incident mitigation, and automated data processing across 60,000+ responses. |
1. Context & Scope of Work
For the UMSA University Census 2025, my responsibilities went well beyond writing code. I joined the project from early planning meetings: helping define survey indicators, structuring questions, preparing infrastructure, running on-call server shifts, and cleaning the final dataset of responses.
The goal was to enumerate faculty members, administrative staff, and students across every university department, handling spotty network conditions, varying devices, and heavy traffic during peak census days.
Engineering Stack, Server Ops & Data Science Tooling
Institutional frontend utilizing App Router, internal BFF API proxy routes, and high-performance hybrid rendering.
Modular reactive interface with secure JWT session handling and role-based access control.
Reproducible containerization, SSL termination, gzip compression, and reverse-proxy rate limiting.
24/7 server telemetry surveillance (CPU, RAM, latency, network I/O) and instant on-call alerts.
Complex digital census instruments with advanced skip logic, cross-field constraints, and offline synchronization.
Automated text cleaning pipeline, typographical normalization, and semantic thematic coding for 60,000+ open-ended responses.
2. Infrastructure: Hardware Sizing and 24/7 Shared On-Call Duty
2.1 Server Quotation and Capacity Planning
Prior to writing code, I actively led the technical capacity planning for the hosting environment:
- Concurrency Modeling: We projected simultaneous peak traffic loads to withstand dense registration periods during mandatory employee census days.
- Hardware Specification & Budgeting: We evaluated and budgeted optimal CPU cores, RAM thresholds, and disk I/O throughput to avoid institutional overspending while completely ruling out resource starvation risks.
- Provisioning & Hardening: I configured the Linux host environment, deployment automation, and Nginx reverse proxy policies with strict caching and rate limiting.
2.2 Active Server Supervision (50/50 Shared On-Call Duty)
Throughout the critical enumeration weeks, server availability was an absolute operational priority. Together with a engineering partner, we split round-the-clock monitoring into equal 50/50 supervision shifts:
- Live telemetry tracking using Grafana dashboards to monitor memory saturation, swap usage, bandwidth consumption, and database connection latency.
- Automated incident alerting via UptimeRobot providing instant SMS/notification coverage for any network anomalies.
- Outcome: Proactive telemetry and automated alerting enabled swift detection of traffic surges and network dips, allowing immediate response to keep services operational for field staff and respondents.
3. Web System Engineering: Dual Modality & Anti-Fraud Verification
On the application development front, we partitioned responsibilities: my partner engineered the core backend, while I took full ownership of the Frontend Architecture (sistema-censo-frontend):
3.1 Dual-Modality Census Ingestion
- Online Census Module: A self-administered web application for faculty and administrative personnel. Built with Zod schemas and React Hook Form to guarantee client-side validation before sending payloads to the API.
- In-Person Census Module: A dedicated interface for on-site field brigades across university faculties, managing physical folio logs, surveyor locations, and field survey notes.
3.2 Anti-Fraud QR Verification System (/verify/[hash])
To establish complete community trust and protect personnel against fraudulent actors or impersonation:
- I engineered a public real-time identity verification portal for field surveyors.
- When a respondent scans the QR code on an enumerator’s physical credential, the system validates a cryptographic hash against the server, rendering their verified badge, official photo, National ID, and assigned institutional role (
surveyor,supervisor, oradministrator).
3.3 Layered Security & Anti-Abuse Protection
- BFF (Backend for Frontend) API Layer: Internal Next.js proxy endpoints (
/api/proxy,/api/survey) that shield internal server endpoints, safeguard JWT session tokens, and enforce dual-CAPTCHA validation (Cloudflare Turnstile + hCaptcha fallback). - Robust Client-Side Validation: Strict schemas powered by Zod and React Hook Form on the client, preventing malformed payloads or data inconsistencies prior to network dispatch.
4. Digital Survey Instrument Engineering & Integrity Simulation (XLSForms)
Alongside web application development, I owned the design, parameterization, and testing of the official digital survey instruments deployed to DATA UMSA (KoboToolbox / Collect App):
[Indicator Formulation] ──> [Advanced XLSForms] ──> [Integrity Simulation] ──> [Production Deployment]
- 4 Thematic modules - Complex skip logic (relevant) - Synthetic data injection - Offline field sync
- Multi-part questions - Cross-field constraints - Orphan branch audit - 0 corrupted records
- Advanced Skip Logic & Validation Rules: Coded complex XLSForms containing branching conditions (
relevant), cross-question constraints (constraint), regex validations, and cascading selects dependent on faculty, department, and employment status. - Pre-Deployment Integrity Simulations: Prior to rolling out forms to field teams, we ran automated stress simulations using synthetic inputs to test edge cases. We confirmed that no conditional skip produced orphan questions and that relational data consistency remained 100% intact.
5. Post-Census: Data Wrangling & Cleaning of 60,000+ Open-Ended Responses
Once the field data collection window closed, one of the most demanding phases began: cleaning, normalizing, and structuring the massive raw dataset.
The Challenge of Unstructured Open Responses
While closed single-choice questions generate clean tabular outputs, the survey’s qualitative open-ended questions gathered more than 60,000 unstructured free-text responses. Respondents entered answers featuring spelling mistakes, colloquial abbreviations, typographical variations, and non-standard syntax.
Data Cleaning Pipeline & Thematic Categorization
I engineered an automated Python cleaning pipeline:
- Typographical Normalization: Canonical lowercasing, stripping of unprintable characters, diacritic normalization, and algorithmic typo correction.
- Noise Filtering: Removal of stop words, aberrant punctuation marks, and non-substantive entries.
- Thematic Coding and Variable Categorization:
- Designed semantic dictionaries and classification heuristics to map unstructured free text into standardized categorical buckets aligned with institutional research indicators.
- Encapsulated and grouped the 60,000 text inputs into clean, normalized quantitative variables.
- Official Dataset Hand-Off: Formally presented and defended the clean, structured variables before the technical committee, delivering pristine datasets ready for professional economists and statisticians to conduct final demographic analysis and publish the executive report.
6. Key Takeaways
- Understanding the full cycle changes how you build: Being involved from questionnaire design to server sizing and dataset cleaning showed me that an oversight in client validation or field types creates weeks of manual cleanup down the road.
- Validating at capture saves massive effort: Strict client schemas (Zod on web and cross-constraints in XLSForms) eliminated corrupt entries and drastically minimized post-census wrangling.
- Operational stability is a team effort: Splitting server on-call duties 50/50 with clear Grafana dashboards helped us catch performance bottlenecks before they impacted field workers.