Back to Projects Gallery
Backend & LedgersProductionTimeline: 2024Role: Lead Backend Engineer
Shelter API — Faith-Based Mental Health Backend Platform
High-availability REST backend with Redis caching, JWT token rotation, and PostgreSQL transactions for therapy matching and resource delivery.
The Problem
Healthcare applications require exceptionally strict privacy boundaries, low-latency resource serving, and continuous uptime without session hijacking risks.
The Architectural Solution
Designed a modular Node.js/Express TypeScript backend with Supabase PostgreSQL and Redis 7 cache. Implemented dual-token JWT authentication with sliding refresh tokens, revocation blacklists, and database connection pooling.
System Architecture & Flow
CANONICAL TOPOLOGY[Client Application]
│
▼
[Node.js 20 / Express TypeScript API]
├── JWT Auth Guard: Dual Access/Refresh token rotation
├── Redis 7: Endpoint response caching & token blacklist
└── Modular Service Layer: Patient profiles, booking, content
│
▼
[PostgreSQL 16 (Supabase Transaction Pooler)]Engineering Contributions & Deliverables
- Implemented secure dual-token authentication (short-lived access + sliding refresh) with automatic revocation in Redis.
- Designed PostgreSQL schemas with foreign-key referential integrity and transaction isolation.
- Reduced average endpoint response latency from 180ms to 24ms for cached resources via Redis 7.
Formal Security Invariants Enforced
AUDITOR VERIFIED[1]Token Revocation Invariant: Logged-out or compromised refresh tokens are immediately blocked in Redis.
[2]Patient Data Privacy: No diagnostic or counselling note is queryable without explicit appointment-level authorization.
System Metrics
RuntimeNode.js 20
Cache Speedup7.5x Latency Reduction
Auth StandardJWT + Redis Rotation
Technology Breakdown
Core Runtime & Language
Node.js 20Express.jsTypeScript 5
Backend & Protocols
JWT RotationREST APIOpenAPI / Swagger
Databases & Ledgers
PostgreSQL 16Redis 7Supabase
Need a similar system designed?
I am available for contract development, smart contract auditing, and backend ledger architecture.
Hire Me for Your Project