HemaSync: Centralized Blood Donation & Real-Time Bank Inventory Management Network
A secure, privacy-first healthcare platform synchronizing voluntary donors, emergency blood requisitions, and multi-facility blood bank inventories in real time.
The Challenge & Engineering Friction
The Technical Solution & Architecture
Core Architectural Decisions
Data Persistence & Session State Layer
Built on MongoDB with Mongoose ODM modeling structured collections for Donors, Blood Banks, Donation Camps, and Contact Handshakes. High-concurrency session persistence is decoupled using connect-mongo backed by dedicated MongoDB session stores to eliminate session loss across server restarts.
Event-Driven Real-Time Notification Pipeline
Implements persistent Server-Sent Events (SSE) over HTTP streaming with an in-memory client connection pool. Triggers asynchronous push notifications for contact request state mutations and approvals without incurring client-side polling overhead.
Access Control, Telephony & Cryptographic Security
Enforces tiered route middleware across public, donor-authenticated, blood-bank-authenticated, and super-admin tiers. Uses bcrypt (10 rounds) for credential hashing and integrates Twilio REST API for secure E.164 phone normalization and time-bound OTP generation.
