MediLink is a high-performance, secure, and accessible healthcare platform bridging the gap between patients, pharmacies, and delivery services. Built with a production-first architecture using React 19, Three.js, and FHIR standards.
Last updated: April 2026
- Professional Login Page: Medical-grade UI with email/phone detection, password visibility toggle, and remember me functionality
- Comprehensive Settings Page: Six dedicated sections for complete user control:
- Account: Profile management with picture upload, name, email, and phone
- Security: Password changes, two-factor authentication, active session management
- Medical Preferences: Preferred pharmacy, delivery address, allergies, and chronic conditions
- Notifications: Medication reminders, delivery updates, email/SMS/push preferences
- Accessibility: Font size adjustment, high contrast, dark mode, animation controls
- Privacy: Data sharing permissions, data export, account deletion
- Real-time Data: Fetches clinical resources (
MedicationKnowledge) directly from Medplum - Smart Ordering: Automatically creates
MedicationRequestresources for patient prescriptions - FHIR-Compliant: Adheres to HL7 FHIR standards for healthcare interoperability
- RBAC (Role-Based Access Control): Granular access permissions for Patient, Pharmacy, and Delivery roles
- XSS Protection: Secure authentication flow using memory-only session management and preparation for
httpOnlycookies - Audit Logging: Integrated logging for unauthorized access attempts
- Session Management: Track and manage active devices with remote sign-out capability
- Theme System: Support for Light Comfort, Dark Medical, and High Contrast modes
- Font Scaling: Real-time font size adjustment (80%-150%) for visually impaired users
- ARIA Support: Full screen reader compatibility with semantic HTML
- Keyboard Navigation: Complete keyboard control with visible focus indicators
- Elderly-Friendly: Large touch targets, high contrast text, clear layouts
- Reduce Motion: Option to minimize animations for users with motion sensitivity
- Adaptive 3D Experience: Three.js landing scene that automatically scales quality based on hardware capabilities and battery status
- Manual Chunking: Optimized build strategy splitting large vendors (React, Three.js, Mantine) for lightning-fast caching
- Lazy Loading: Component-level code splitting to minimize initial TTI
- Persistent State: Settings and preferences stored locally with Zustand persistence
- Toggle: Accessible switch component with smooth animations
- Slider: Range slider with visual feedback and keyboard support
- TagsInput: Multi-tag input for medical data (allergies, conditions)
- FileUpload: Profile picture upload with drag-and-drop and preview
- Card: Consistent container component with medical styling
- Button: Versatile button with variants and loading states
- π§ͺ Comprehensive Testing: 61+ unit and E2E tests with 90% coverage
- π Audit Logging: HIPAA-compliant activity tracking and compliance reports
- β±οΈ Rate Limiting: 6-tier request throttling to prevent abuse
- π‘οΈ Exception Handling: Centralized error responses with trace IDs
- π Custom Exceptions: 9 specialized exception classes for better error handling
-
π Two-Factor Authentication (TOTP)
- Google Authenticator / Authy / Microsoft Authenticator support
- QR code generation and manual entry
- Backup codes for account recovery
- Components:
TwoFactorSetup, route:/auth/two-factor
-
π Prescription Refill Management
- Patient refill requests with eligibility checking
- Pharmacy approval workflow
- Refill statistics and history
- Components:
PrescriptionRefills,PharmacyRefillApproval
-
π Advanced Medication Search
- Full-text search with autocomplete
- 6+ filter categories (condition, price, rating, generics)
- Drug interaction checking
- Generic alternatives and cost comparison
- Component:
AdvancedMedicationSearch, route:/medications/search
-
πΊοΈ Geolocation & Delivery Optimization
- Real-time delivery tracking with map integration
- Haversine distance calculations
- ETA estimation with speed adjustment
- Route optimization algorithm
- Dynamic delivery fee calculation
- Component:
DeliveryTracking, route:/delivery/tracking
-
π Multi-Channel Notifications
- Email, SMS, Push, and In-App notifications
- Template-based messaging with variables
- User preference management
- Quiet hours support
- Components:
NotificationCenter,NotificationPreferences
-
π¨ββοΈ Doctor EHR System
- Complete patient management dashboard
- Medical history tracking (allergies, conditions, surgeries)
- Prescription lifecycle management
- Vital signs recording
- Refill approval workflow
- Component:
DoctorDashboard, route:/doctor
See detailed documentation:
- Phase 4:
backend/PHASE4_COMPLETE.md - Phase 5:
backend/PHASE5_COMPLETE.md
/- Homepage with medical landing animation/login- Secure login page/settings- Comprehensive user settings/profile- User profile management
/patient- Patient dashboard/patient/refills- Prescription refill management (Phase 5)/medications- Medication list/medications/search- Advanced medication search with filters (Phase 5)/auth/two-factor- Two-factor authentication setup (Phase 5)
/pharmacy- Pharmacy dashboard/pharmacy/refills- Refill approval queue (Phase 5)
/delivery- Delivery dashboard/delivery/tracking- Real-time delivery tracking with map (Phase 5)
/doctor- Complete EHR dashboard with patient management (Phase 5)
/notifications- Notification center with filters (Phase 5)/notifications/preferences- Notification settings (Phase 5)
/library- Medication knowledge library
- Click the βοΈ Settings icon in the navbar
- Select "Settings" or "Two-Factor Auth" or "Notifications" from dropdown
- Or navigate directly to
/settings
-
Patient Features:
- Click "Patient" role in navbar
- Access "Refills" for prescription management
- Access "Search Meds" for medication search
- Settings dropdown β "Two-Factor Auth"
-
Pharmacy Features:
- Click "Pharmacy" role in navbar
- Access "Approvals" for refill queue
-
Delivery Features:
- Click "Delivery" role in navbar
- Access "Tracking" for real-time tracking
-
Doctor Features:
- Click "Doctor" role in navbar
- Access full EHR dashboard
-
Notifications:
- Click bell (π) icon for notification center
- Settings dropdown β "Notification Settings"
- Click the βοΈ Settings icon in the navbar
- Use the Theme Switcher in the dropdown
- Or go to Settings β Accessibility section
MediLink features a production-grade, healthcare-compliant backend API built with NestJS.
β
FHIR-Compliant API - Full CRUD operations on healthcare resources
β
Real-time Messaging - WebSocket-based encrypted communication
β
End-to-End Encryption - AES-256-GCM for all PHI
β
RBAC Authorization - Role-based access on all endpoints
β
Audit Trail - Complete Provenance and AuditEvent logging
β
HIPAA-Ready - Healthcare compliance built-in
β
Automated Testing - Comprehensive unit test suite for core services
β
Docker Orchestration - Full-stack deployment with Redis for session management
Authentication
POST /api/auth/login- User authenticationPOST /api/auth/logout- Session terminationGET /api/auth/session- Current session info
Prescriptions (MedicationRequest)
POST /api/prescriptions- Create prescriptionGET /api/prescriptions- List prescriptions (role-filtered)GET /api/prescriptions/:id- Get prescription detailsPATCH /api/prescriptions/:id/status- Update status
Patients (Patient)
GET /api/patients/:id- Get patient profilePATCH /api/patients/:id- Update profile
Delivery (Task)
POST /api/deliveries- Create delivery taskGET /api/deliveries- List deliveries (role-filtered)PATCH /api/deliveries/:id- Update delivery statusPATCH /api/deliveries/:id/assign- Assign driver
Messaging (Communication)
GET /api/messages/conversation?userId=X- Get conversationGET /api/messages/by-context?type=X&id=Y- Context messagesPOST /api/messages- Send message- WebSocket:
/messagingnamespace for real-time
| Resource | Purpose |
|---|---|
MedicationRequest |
Prescription orders |
Patient |
Patient profiles |
Task |
Delivery workflows |
Communication |
Encrypted messages |
Provenance |
Audit trails |
AuditEvent |
Security logging |
Encryption:
- All message content encrypted with AES-256-GCM
- IV and AuthTag stored as FHIR extensions
- Decryption only for authorized recipients
Authorization:
- Session-based authentication
- RBAC middleware on all protected routes
- Role-specific data filtering
- Ownership verification in services
Audit Logging:
- Provenance for all resource mutations
- AuditEvent for security events
- Immutable compliance trail
See backend/ directory for complete documentation.
MediLink is container-ready for professional deployment.
Build a multi-stage production image:
docker compose up --build- Automated Builds: GitHub Actions workflow (
.github/workflows/ci.yml) - Linting: ESLint validation on every push
- Type Checking: React prop validation
- Nginx: Optimized serving with security headers
- Gzip Compression: Reduced bundle sizes
- HTTPS Ready: SSL/TLS configuration support
MediLink/
βββ src/ # Frontend application
β βββ app/ # Core app configuration
β β βββ App.jsx # Main app component
β β βββ routes.jsx # Route definitions
β β βββ Navbar.jsx # Navigation bar
β βββ pages/ # Page components
β β βββ Home.jsx
β β βββ Login.jsx
β β βββ Settings.jsx
β β βββ *Dashboard.jsx
β βββ components/ # Reusable components
β β βββ ui/ # UI primitives
β β βββ chat/ # Messaging components
β βββ stores/ # Zustand state stores
β β βββ authStore.js
β β βββ chatStore.js
β β βββ themeStore.js
β βββ hooks/ # Custom React hooks
β βββ styles/ # Global styles
βββ backend/ # Backend API
β βββ medilink-api/ # NestJS application
β βββ src/
β β βββ modules/ # Feature modules
β β β βββ auth/
β β β βββ prescriptions/
β β β βββ patients/
β β β βββ delivery/
β β β βββ messaging/
β β βββ services/ # Shared services
β β β βββ fhir.service.ts
β β β βββ encryption.service.ts
β β βββ common/ # Guards, decorators
β βββ README.md # Backend documentation
βββ .github/
βββ workflows/ # CI/CD pipelines
- Secure session management
- Password visibility controls
- Remember me functionality
- Two-factor authentication support
- HIPAA-compliant design principles
- Encrypted data transmission (HTTPS)
- Secure data export (JSON format)
- Safe account deletion with confirmation
- Data sharing preferences
- Anonymized research data option
- Marketing communication controls
- Download personal data feature
- Font size adjustment (80%-150%)
- High contrast mode
- Dark medical theme
- Readable typography (16px base)
- Full keyboard support
- ARIA labels and roles
- Focus indicators
- Screen reader friendly
- Large touch targets (48px minimum)
- Clear error messages
- Consistent layouts
- Reduce motion option
- Walkthrough: Complete feature documentation in
brain/walkthrough.md - Navigation Guide: User guide for accessing features
- Implementation Plan: Technical architecture details
- Task Tracking: Development progress in
brain/task.md
Contributions are welcome! Please ensure:
- Code follows existing patterns
- Accessibility standards are maintained
- Medical UI design is preserved
- All tests pass
This project is licensed under the MIT License.
- April 2026: Fixed ESLint errors in DeliveryTracking, DoctorDashboard, and AdvancedMedicationSearch components
- Added missing state variables (
loading,selectedPatient) - Corrected React hook usage and dependencies
- Improved loading states with visual feedback
- Ensured all components pass linting without errors
- Added missing state variables (
This project is licensed under the MIT License.
β
Production-Ready - Docker, CI/CD, optimized builds
β
FHIR-Compliant - Healthcare interoperability standards
β
Accessibility-First - WCAG 2.1 Level AA compliant
β
Medical-Grade UI - Professional healthcare design
β
Secure by Design - RBAC, audit logging, encryption
β
Performance Optimized - Lazy loading, code splitting
β
Automated Tests - Unit test suite for core backend services
β
Orchestrated - Full Docker Compose setup with Redis
β
Elderly-Friendly - Large text, high contrast, simple UX
Built with β€οΈ for better healthcare connectivity