Phox Health
Consolidating clinical delivery logistics systems and medical courier networks into a high-performance React monorepo architecture.
The Challenge & Context
Phox Health is a healthcare logistics platform managing medication deliveries, cold chain packaging, and real-time medical courier courier runs.
Originally, three independent React codebases (for pharmacies, lab networks, and couriers) had grown separately. This resulted in extensive code duplication, inconsistent user experience, desynchronized TypeScript contracts, and slow cross-application features.
Key Metrics
- Merged Repositories:3 into 1 Monorepo
- Duplication Reduced:~40% code savings
- User Interaction:+25% push engagement
- Organic SEO Growth:+20% sitemap indexing
Nx Monorepo Consolidation
How we migrated three independent codebases incrementally without downtime
Developers spent hours manually keeping styles, API contracts, and utilities in sync across multiple repositories. Shared business features had diverging logic branches.
Consolidate codebases into an Nx Monorepo structure, isolating reusable primitives while maintaining app boundaries and CI check velocity.
I designed a modular monorepo directory: split core components into standard UI libraries, isolated logic into utility packages, and created unified TypeScript interfaces. I led the step-by-step incremental migration of each repository and configured `nx affected` commands so CI only runs tests on modified modules.
Removed ~40% of duplicated code structures. CI pipeline execution was optimized, allowing development teams to ship unified features across clinical apps significantly faster.
Platform Features
Nx Monorepo Boundary Gates
Enforced strict boundary lint rules within the monorepo configuration (e.g. preventing presentation libraries from directly importing server configurations), eliminating circular references and maintaining code decoupling.
Zustand Hook-Based Stores
Implemented Zustand stores to manage global state boundaries across pharmacy and lab dashboards, replacing heavy Redux boilerplate and deep prop-drilling trees with clean, react-hook subscribers.
Service Worker Push System
Built an offline-ready service worker layer to negotiate Web Push API subscriptions and alerts, keeping active delivery updates synched and boosting overall courier-patient interactions by 25%.
Dynamic Sitemap API
Automated clinical and public page sitemaps by writing an dynamic sitemap.xml Node.js generator script connected directly to directory indexing APIs, increasing search index coverage by 20%.
Live Platform
Note: Phox Health is an enterprise healthcare delivery logistics platform. The link below navigates to the public corporate interface; platform logistics dashboards require active clinical credentials.