Government / Healthcare
Public-Health Data Dashboard
Health data dashboards for public administration
Quick Summary / TL;DR
a public-health organization needed real-time visibility into public health data from 2,500+ clinics to optimize logistics and medical resource allocation. ERPStack built a high-performance streaming analytics dashboard with Recharts and PostgreSQL, reducing reporting latency to under 10 seconds.
- 2,500+
- Clinics aggregated
- <10s
- Data refresh rate
- 75%
- Resource delivery acceleration
- 1,000+
- Admin user capacity
From 2,500+ clinics to a chart in under 10 seconds
Monthly batch uploads meant a four-week visibility delay. The rebuilt path streams clinic data through aggregation into cached views that dashboards poll continuously.
Clinic streams
Secure endpoints ingest health logs from 2,500+ clinic nodes
Aggregation
Node.js pipeline rolls metrics into hourly and daily views
Cached views
Automated database views cache aggregates; index-only scans cut lock contention
Live dashboards
WebSockets push chart updates to 1,000+ administrators in under 10 seconds
Dashboards administrators compose themselves
Panels are drag-and-drop and resizable — each widget polls cached aggregates, so composing a new view never adds database load. The envelope on the right is the production performance contract.
- <10s
- Dashboard refresh
- 15ms
- Aggregate query
- 10k/s
- Ingestion capacity
- 1,000+
- Admin seats
Anatomy of a portal panel
- Trend charts
- Recharts time series over cached aggregates
- Data grids
- TanStack Table with server-driven sorting
- Layout
- Drag-and-drop panels (dnd-kit) with resizable splits
- Navigation
- Command palette (cmdk) for record jump
The challenge
The a public-health organization needed to collect and view health data from thousands of clinics and hospitals in a single visual platform. Legacy reporting methods were delayed and error-prone, leaving health administrators without the real-time insights required for resource allocation.
The architecture
We developed a responsive dashboard portal that aggregates local clinic data into charts. The secure platform helps administrators identify public health trends and allocate medical supplies quickly, leveraging React, Node.js, and Drizzle ORM.
Case Study: the public-health organization Swayam Public Health Dashboard
Executive Summary
This document analyzes the engineering and deployment of the Swayam Public Health Portal—a real-time data aggregation dashboard developed for the a public-health organization. Prior to Swayam, public health data was collected via monthly batch uploads, resulting in a 4-week visibility delay. We built a high-performance streaming analytics portal using React, Node.js, and PostgreSQL that aggregates datasets from over 2,500 local clinics in under 10 seconds.
The Business Challenge
Public health administrators require immediate data visibility to identify disease outbreaks, allocate medical resources, and track public healthcare projects. Legacy reporting structures relied on manual CSV uploads, causing major delays and transcription errors. Safe collection required strict data privacy compliance (HIPAA and HITRUST) and needed to scale to support thousands of administrative coordinators looking at real-time charting dashboards.
System Architecture
The Swayam portal utilizes a stream processing data warehouse pipeline:
- Clinic Data Stream API: Secure endpoints that ingest health logs from local clinics in real time.
- Data Aggregation Pipeline (Node.js): Aggregates local metrics and pushes data updates via low-latency WebSockets.
- Analytics Dashboard (React & Recharts): A dashboard interface presenting health metrics, resource allocation charts, and trend reports.
[Clinic API Streams] ──> [Node.js Pipeline] ──> [PostgreSQL Database]
│
[Admin Clients] <──(WebSockets Flow)
Key Engineering Decisions
- Choosing Recharts for Data Visualization: Recharts offered high performance and accessible layouts for charting complex metrics.
- Drizzle ORM for Data Security: Strict type safety prevents database query injection and maintains strict data validation.
- AWS Distributed Services: Deployed the application nodes across AWS regions to ensure disaster-recovery readiness.
Database Schema & Optimization
The database schema tracks clinical logs through high-volume event tables. We optimized dashboard query performance:
- Created automated database views to cache hourly and daily metric aggregates.
- Configured index-only scans on transaction tables to reduce database lock contention.
Security & Compliance Controls
The Swayam portal implements rigorous data security controls:
- HIPAA Compliant Auditing: Every user action and data read is logged into secure, immutable audit tables.
- Multi-Factor Authentication (MFA): Access to administrative dashboard layers requires mandatory MFA configuration.
- Continuous SAST Scanning: Integrated security pipeline scanners review the codebase on every pull request.
Results & Retrospective
The Swayam Public Health Portal transformed administrative coordination:
- Dashboard statistics refresh in under 10 seconds, providing real-time operational visibility.
- Automated logistics allocation accelerated public resource delivery by 75% across rural clinics.
- The portal successfully aggregates data from over 2,500 active clinic nodes.
- Strict data encryption and audit compliance safeguards passed HIPAA security reviews with zero findings.
Engineered capabilities
- Real-time data dashboards
- Responsive interface layouts
- Role-based access levels
- Interactive charts using Recharts
- Accessible design compliant with public sector standards
- Secure multi-factor authentication