Engineering Case Study

MedLink

Flagship Healthcare & Real-Time Patient Telemetry Platform

Interactive Visual Telemetry
MedLink

Project Overview

MedLink is an enterprise healthcare management system engineered for high-availability patient telemetry, appointment scheduling, and AI-driven clinical risk alerts. Built with Next.js SSR and microservices architecture, it seamlessly connects patients, doctors, and lab systems.

The Problem & Motivation

Legacy health management platforms suffered from slow 3s+ load times, fragile appointment scheduling logic causing double-booking conflicts, and poor real-time patient telemetry monitoring for critical care cases.

System Architecture Diagram

CLIENT UIReact 19 & Tailwind CSS
➔
NEXT.JS ROUTERNext.js 15 App Router (SSR)
➔
BACKEND SERVICENode.js & Express API Gateway
➔
DATABASE & CLOUDMongoDB Atlas & Redis Cache

Key Engineering Features

01

Conflict-Free Appointment Scheduling

Automated real-time slot locking engine.

Patients can select specialist slots with sub-second confirmation. WebSockets notify doctors instantly while a Redis distributed lock prevents double-booking.

02

AI Health Telemetry & Risk Scoring

Real-time vitals tracking and automated alerts.

Monitors heart rate, SpO2, and temperature readings. Algorithmic risk scoring triggers priority flags for attending medical staff.

03

Server-Side Rendered Patient Portals

Instant page hydration with strict security.

Patient health records and lab histories are rendered via Next.js SSR, cutting first contentful paint down to under 1 second.

Full Technology Stack

Frontend
React 19Next.jsTailwind CSSFramer Motion
Backend
Node.jsExpressWebSocketsREST API
Database & Cache
MongoDB AtlasRedisMongoose
Cloud & Deployment
AWS ECSCloudFrontDockerS3
Authentication
JWTHttpOnly CookiesRBAC

Technical Challenges & Engineering Solutions

SSR Authentication Hydration Flicker

Challenge: Implementing SSR while maintaining user authentication was challenging because server components require token validation without introducing client hydration flicker.

Solution: Utilized HttpOnly JWT cookies evaluated inside Next.js edge middleware, validating user sessions on the server before rendering the HTML payload.

High-Volume Telemetry Socket Concurrency

Challenge: Handling hundreds of continuous patient vitals streams caused socket connection drops during traffic spikes.

Solution: Implemented a Redis Pub/Sub adapter to scale WebSocket connections horizontally across containerized Node.js workers.

Measurable Results & Outcomes

1.0sLoading Time3.2s → 1.0s (-68%)
96/100Lighthouse Score62 → 96 (+34)
500+ DailyUser CapacityZero downtime
110msAPI Latency70% reduction

What I Learned

  • Mastered Next.js Server Components vs Client Components boundary design for high-performance applications.
  • Learned distributed locking mechanisms using Redis for zero-conflict scheduling.
  • Gained deep hands-on expertise in AWS containerized deployments and security headers.