SYSTEM_CASE_STUDY

MRC Fly Management System

A robust fly management system providing real-time tracking, data visualisation, and user-friendly interfaces for efficient fly control and monitoring across multiple locations.

Technologies Leveraged
Next.jsTypeScriptTanStack QueryShadcn UITailwind CSSNode.jsPrisma ORMPostgreSQL
specs_manifest.json
Engineering Role
System Engineer
System Scope
Industrial IoT
Operation Scale
Multi-location data
Infra Architecture
DigitalOcean droplets
Timeline
8 Months
Architecture Highlights
  • >Real-time sensor data ingestion pipelines
  • >Recharts data visualization interfaces
  • >Role-based control panels with audit logging
MRC Fly Management System screenshot

Project Vision & Meaning

The MRC Fly Management System is an industrial IoT solution designed for facilities requiring strict sanitation compliance (food processing factories, warehouses, pharmaceutical labs). Historically, monitoring pest traps required daily manual logs by inspection teams. MRC Fly digitizes the process by integrating smart sensors into fly traps, enabling automated detection, counting, and instant alerts for safety supervisors.

Real-World Problems Solved

It eliminates manual inspection overhead by automating trap audits, ensures safety standard compliance (HACCP/FDA) through audit trails, and triggers instant alerts during count spikes to prevent major pest infestations.

Challenges & Solutions

CHALLENGE_1ERR_RESOLVED

Telemetry Ingestion Spikes and Database Overload

Problem Context:With hundreds of smart sensors sending activity pings simultaneously, direct database writes caused connection exhaustion and led to intermittent telemetry data loss during peak activity hours.

Engineering Solution:

Created an ingestion buffer pipeline on the Node.js API server. Incoming pings are gathered in memory and written to PostgreSQL in batches every 5 seconds. Implemented an exponential backoff retry mechanism inside the IoT clients to handle network dropouts without losing count data.

CHALLENGE_2ERR_RESOLVED

Visualizing Large Pest History Datasets Without Lag

Problem Context:Recruiters and auditors review multi-month trap data across multiple locations. Fetching and rendering these large datasets directly in standard browser-based chart libraries (like Recharts) resulted in browser UI freezes and long page loads.

Engineering Solution:

Implemented the Largest Triangle Three Buckets (LTTB) downsampling algorithm on the backend to reduce 100,000+ data points to 500 visual-representative points before transmitting them. This preserved visual trends while reducing data payload size by 99.5%, bringing chart rendering speeds under 100ms.