Case Study 01 // Enterprise SNA Platform

JMF Survey

A multi-tenant web platform built from scratch for JMF Asesores to run organizational Social Network Analysis (SNA) engagements—enabling thousands of employees to visually verify colleagues and generating weighted N × N directed adjacency matrices for consulting teams.

Concurrency ~4,000

Simultaneous respondents supported during enterprise and municipal rollouts.

Database Efficiency ~3 Trips

Per-respondent DB interactions: initial batch read plus a single completion write.

Roster Ingestion 500 Rows

Chunked Excel streaming paired with bulk upserts for zero-timeout onboarding.

Analytics Output 5 Exports

Multi-sheet weighted N × N matrices, qualitative CSVs, and branch reports.

00 // Live Hosted Interactive Demo

Mini-App: Peer Disambiguation & Live N × N Matrix

Embedded Live App (Render)
https://jmfsurvey-demo.onrender.com/?embed=1
Live Iframe · Anonymized SNA Cohort
Mode:
Open Full Screen ↗
01 // Problem Domain

Why Standard Survey Tools Fall Short for SNA

01 // ROSTER DISAMBIGUATION

Searching Thousands of Colleagues Visually

In large corporate and municipal rosters, plain text dropdowns fail and duplicate names are common. Respondents need fast searchable cards displaying employee headshots, job titles, departments, regions, and branches (sucursal), while automatically excluding themselves from nomination.

02 // WEIGHTED GRAPH EDGES

Order-Ranked Sociometric Ties

SNA measures informal trust, communication, and collaboration—such as asking which 5 coworkers an employee relies on most. Selection order directly encodes tie strength (1st = 5 down to 5th = 1), alongside optional open-ended qualitative responses.

03 // MATRIX TRANSFORMATION

Graph-Ready N × N Adjacency Matrices

Analysts cannot work directly from flat form rows. The platform converts submitted peer rankings into square N × N directed matrices per question (respondents as rows, nominees as columns, weights 0–5 as cells) ready for immediate network analysis.

04 // CONCURRENCY & ACCESS

Enterprise Launch Spikes & Field Teams

Client rollouts across logistics, agribusiness, municipal government, and microfinance create massive traffic spikes when thousands of employees—many without corporate email addresses—complete the survey simultaneously during live sessions.

02 // System Architecture

Lightweight Custom MVC & Data Flow

~5,300 Lines Custom Code
Client Tier

Respondent & Admin Browsers

Access via National ID, login token, or credentials. Caches roster locally for instant 0-latency search.

Application Tier

Custom PHP 8.1 MVC

Separates onboarding, respondent JSON APIs, and admin controls in a containerized Apache runtime.

Persistence & Media

MongoDB + Cloud Object Storage

Tenant-isolated document collections paired with compressed 300×320 JPEG headshots on AWS S3.

Analytics Tier

SNA Matrix & Branch Exports

Batch-populated N × N spreadsheets, qualitative CSVs, and branch completion summaries.

Custom MVC Without Framework Bloat

Designed dedicated routing, controller, and data-model layers in pure PHP 8.1—avoiding heavy ORM and dependency-injection overhead per request so lean server containers stay responsive under peak load.

Multi-Tenant Document Isolation

Each client organization is dynamically isolated into dedicated tenant collections storing employee profiles with arbitrary custom attributes (department, region, location, branch), expiration-bound questions, and weighted survey responses.

Automated Media & Prep Pipeline

Built a Python (openpyxl) extractor to pull embedded photos out of client spreadsheets, combined with PHP GD resizing (300×320 JPEG at 80% quality) and cloud object storage hosting with graceful image fallbacks.

03 // Performance Engineering

How It Scaled to ~4,000 Concurrent Users

Client-Side Offloading & Single Atomic Submission

Upon entering the survey, the browser fetches the complete tenant employee roster and all survey questions in a single concurrent batch, caching them in localStorage and sessionStorage. Searching across thousands of colleagues uses 300ms debouncing, Unicode accent normalization, multi-word matching, and 6-card pagination completely in the browser—requiring zero database queries while browsing and persisting answers in one atomic submission request.

Image Bandwidth Offloading to Cloud Storage

Employee headshots are pre-compressed at ingestion and served directly from AWS S3 rather than streaming binary assets through application workers. This kept Apache and PHP processes focused strictly on lightweight JSON payloads and authentication.

Container Layer Caching & Runtime Upgrades

Refactored the Docker build pipeline to optimize dependency caching ahead of source layers and upgraded the MongoDB driver stack for lower memory consumption and faster container deployments.

500-Row Chunked Ingestion & Batch Matrix Generation

Large employee spreadsheets stream in 500-row chunks via a custom read filter paired with database bulk upserts so onboarding thousands of users never times out. For N × N exports containing millions of cells, matrix generation was refactored to assemble native PHP arrays and write entire sheets via batch fromArray() operations rather than slow cell-by-cell formatting loops.

Frictionless Authentication for Field Workforces

Replaced costly SMS delivery bottlenecks with two scalable onboarding modes tailored to distributed operations: instant National ID verification for frontline staff and unique token-based login links distributed directly by client HR teams.

04 // Product Surface

Respondent & Admin Capabilities

Respondent Experience

Guided Sociometric Survey Flow

  • Branded Multi-Client Onboarding: Client-tailored welcome views for enterprise logistics, agribusiness, municipal, and microfinance rollouts that clear stale browser caches cleanly before starting.
  • Interactive Peer Selection: Paginated 6-card colleague grid displaying photos, roles, departments, regions, and branches; enforces 5 ranked selections (5 → 1 weights) and prevents self-nomination across both client and server.
  • Open-Ended Qualitative Mode: Dynamically swaps the card selector for a validated text response view when a question captures qualitative commentary.
  • Completion & Schedule Governance: Enforces survey expiration windows, blocks duplicate submissions, and cleans up session state on completion.
Admin & Exports

Operations Dashboard & 5 Report Formats

Includes live Completed vs. Pending tracking, bilingual (English/Spanish) spreadsheet column mapping, dynamic question management (up to 10 prompts), and 5 export pipelines:

  • 1. Weighted SNA Adjacency Matrices (.xlsx) Multi-sheet workbook containing one N × N directed score matrix per sociometric question.
  • 2. Open-Ended Responses (.csv) Question-specific qualitative exports paired with respondent identifiers.
  • 3. Branch Completion Status (.xlsx) Two-sheet status report combining detailed lists and aggregated completion by branch (sucursal).
  • 4. HR Onboarding Link Sheet (.csv) Ready-to-distribute CSV exports providing unique onboarding links for client HR teams.
  • 5. Full Roster Dump (.xlsx) Dynamic-header workbook exporting all stored profile records and custom client attributes.
05 // Delivery History

Project Phases & Milestones

Phase Period Key Engineering Milestones
1. Core Platform & Genesis Aug – Sep 2024 Built custom PHP MVC architecture, MongoDB multi-tenant isolation, token links, chunked roster uploads, browser search & pagination, and initial N × N matrix exports.
2. Dynamic Multi-Client Support Mar 2025 Added bilingual Excel header mapping, flexible custom profile attributes, branded client welcome flows, Python embedded-image extraction, and self-exclusion safeguards.
3. Containerization & Municipal Launch Jul 2025 Shipped municipal deployment, upgraded database driver layer, and optimized Docker layer caching for reliable production builds.
4. Enterprise Scale Rollout Feb – Mar 2026 Replaced SMS links with National ID authentication, added open-ended questions, branch (sucursal) search & reporting, bulk lifecycle controls, and batch fromArray() matrix optimization for ~4,000 concurrent users.
RESILIENCE // CELLULAR DROPS

Draft Persistence Before Atomic Commit

Field workers on spotty mobile data cannot lose twenty minutes of colleague selections if a connection flickers. Incremental picks cache safely in localStorage by tenant and respondent identity until the final atomic submission confirms receipt.

INTEGRITY // SERVER GUARDS

Tenant Isolation & Duplicate Locks

Server endpoints validate expiration windows, tenant collection scope, self-exclusion constraints, and completion flags directly before persistence—preventing ballot stuffing or race-condition double submissions on rapid submit clicks.

BOTTLENECK // BANDWIDTH

Zero Binary Traffic on PHP Workers

Pre-compressing headshots to lightweight 300×320 JPEGs and routing browser fetches straight to AWS S3 kept container PHP-FPM/Apache threads exclusively focused on compact JSON payloads during ~4,000-user launches.

Explore More

Explore the TypeScript BeeNight SaaS or active Drupal internship

Explore the public BeeNight TypeScript SaaS, try the live mini-apps inside MLPP Glossary, Family Captions, and Timeline, or open my full resume.