Skip to content

Golden Age Hub - Architecture Overview

The Golden Age Hub platform coordinates wearable edge devices, real-time streaming queues, and secure database engines to deliver audit-ready healthcare tracking. This document describes the system architecture, design decisions, and data pipelines that power our zero-data AI and cryptographic care ledger.

System Architecture (Expanded Scope)

Stack

Principles

Core Flows

  1. Event Ingest: device → app/gateway → /events (signed payload) → queue → validate → persist.
  2. Ledger Write: care action → normalized event → hash block with sigs + timestamps → store in immutable ledger.
  3. Alert Router: policy engine applies guardrails/rate‑limits → caregiver route → escalation.
  4. ML Processing: Edge inferencefederated learning → model updates.
  5. Data Governance: Schema validation → provenance tracking → compliance automation.
  6. Exports: EVV/RPM endpoints generate CSV/JSON with checksums for audit.

Table of Contents

Overview

Golden Age Hub delivers comprehensive elderly care through advanced technology integration. The platform combines traditional healthcare coordination with cutting-edge AI/ML capabilities, all while maintaining strict privacy and compliance standards.

Key Differentiators:

  • Edge Intelligence: Real-time ML inference on wearable devices
  • Zero-Data AI: Federated learning preserves privacy while improving models
  • Data Sovereignty: Comprehensive governance framework with HIPAA compliance
  • Care Coordination: Unified platform for care delivery and documentation

System Topology

flowchart TB
    subgraph Wearable ["Wearable IoT Device"]
        Patch["Companion Patch BLE/NFC"]
        TFLite["Edge Fall Detection (TFLite Micro)"]
        Patch --> TFLite
    end

    subgraph Client ["Client / Gateway Layer"]
        App["Caregiver Client Gateway"]
        Wearable -->|Signed Telemetry| App
    end

    subgraph Backend ["Backend Gateway & Broker (FastAPI + Redis)"]
        GW["API Gateway (FastAPI: Port 8000)"]
        Sec["Security Filter:\n• Ed25519 Signatures\n• Replay Protection\n• Token Rate Limiting"]
        Queue["Redis Queue (Broker)"]

        App -->|POST /v1/events/ingest| GW
        GW --> Sec
        Sec -->|Valid Payloads| Queue
    end

    subgraph Processing ["Asynchronous Worker (Celery)"]
        Worker["Celery Worker (Pipeline Service)"]
        Queue -->|Fetch Tasks| Worker
    end

    subgraph Storage ["Storage & Verification Layer"]
        DB[("PostgreSQL / TimescaleDB\n• Sensor Hypertables\n• Audit logs\n• Relational data")]
        Merkle["Merkle Care Ledger\n• Leaf inclusion proofs\n• Sealed block chains"]
        S3[("S3 A2 Archive\n• WORM compliance cold logs")]

        Worker -->|1. Write logs| DB
        Worker -->|2. Archive cold| S3
        Worker -->|3. Append tree| Merkle
        Merkle -->|Generate proof| DB
    end

    subgraph Decision ["Alert Evaluation & Policy Engine"]
        Policy["Policy Service (OPA: Port 8877)"]
        Tuning["Tuning Script (ab_compare / tune_policy)"]

        Worker -->|Evaluate routing| Policy
        Tuning -->|Refine rules| Policy
    end

    subgraph Presentation ["Stakeholder Dashboards"]
        Dash["Main Dashboard (React: Port 3000)"]
        SimDash["Simulator Dashboard (React: Port 3003)"]

        DB -->|Query status| Dash
        Policy -->|Active alert route| Dash
        SimDash -->|Control streams| App
    end

MVP Core Components

1. Companion Patch (Wearable Device)

  • Sensors: 6-axis IMU (accelerometer + gyroscope)
  • Edge Processing: On-device fall and wandering detection using TensorFlow Lite
  • Connectivity: Bluetooth Low Energy (BLE) to caregiver app
  • Power: Rechargeable battery with 7+ day life
  • Security: Hardware-backed key storage, signed events
  • ML Capabilities: Optimized models for sub-500ms inference latency

2. Caregiver Mobile App

  • Offline-First: Works without internet connection
  • Real-time Alerts: Push notifications for events
  • Simple Interface: Quick event acknowledgment
  • Secure Sync: End-to-end encrypted data transfer
  • Platforms: iOS and Android (React Native)
  • Edge Integration: Direct communication with wearable devices

3. Backend Services

  • API Layer: FastAPI (Python 3.10+) with comprehensive OpenAPI documentation
  • Database: PostgreSQL 14+ with TimescaleDB extension for time-series data
  • Authentication: JWT with device-based authentication
  • Core Endpoints:
  • Device registration and authentication
  • Event ingestion and processing
  • Data exports (EVV/RPM)
  • Proof of Care ledger
  • Model management and deployment
  • Schema validation and governance
  • Data Processing: Real-time event validation and enrichment
  • Compliance Engine: Automated HIPAA compliance checking

4. Edge Computing Hub

  • Hardware: NVIDIA Jetson or micro form-factor PC
  • Connectivity:
  • BLE for wearable device communication
  • WiFi/Ethernet for cloud connectivity
  • Local network for caregiver app access
  • Storage:
  • Local encrypted storage for sensor data and events
  • Model versioning and experiment tracking
  • ML Ops (ZenML):
  • Local model training pipeline orchestration
  • Experiment tracking and model versioning
  • Data validation and preprocessing
  • Model evaluation and validation
  • Federated Learning:
  • Personalized model initialization from meta-models
  • Local model training on private data
  • Secure gradient sharing with central server
  • Differential privacy for model updates
  • Processing:
  • Runs real-time ML models for fall and wandering detection
  • Processes and analyzes sensor data streams
  • Generates and stores events locally
  • Performs on-device model fine-tuning
  • Security:
  • On-device encryption for stored data
  • Secure authentication for all connected devices
  • Role-based access control for data access
  • Local data storage with HIPAA-compliant encryption
  • Federated learning with differential privacy

5. Web Dashboard

  • Caregiver View: Patient monitoring and alerts with ML insights
  • Admin View: User and device management with governance controls
  • Family Portal: Read-only access to loved one's status
  • Export Tools: Generate compliance reports with audit trails
  • Analytics Dashboard: Privacy-preserving insights and model performance metrics

Machine Learning Architecture

Model Training Pipeline

  1. Data Collection: Wearable devices stream sensor data to the Edge Hub
  2. Data Preprocessing:
  3. Data cleaning and normalization with schema validation
  4. Feature extraction with provenance tracking
  5. Data labeling (semi-supervised where applicable)
  6. Model Training:
  7. Initialize with latest meta-model from central server
  8. Fine-tune on local data using ZenML pipelines
  9. Apply differential privacy if sharing updates
  10. Model Evaluation:
  11. Validate performance on held-out test set
  12. Check for model drift and bias
  13. Ensure fairness and bias mitigation
  14. Compliance certification for production deployment
  15. Federated Updates:
  16. Securely share model updates with central server
  17. Receive aggregated model improvements
  18. Update local model while preserving privacy

Edge Inference Architecture

  • Model Optimization: Quantization for reduced latency and memory usage
  • Hardware Acceleration: GPU/TPU support for real-time inference
  • Memory Management: Efficient model loading and caching
  • Power Optimization: Adaptive inference scheduling
  • Fallback Mechanisms: CPU-only inference when hardware unavailable

Federated Learning Architecture

  • Decentralized Training: Edge devices train on local data
  • Secure Aggregation: Cryptographic protocols for gradient aggregation
  • Privacy Budgeting: Differential privacy budget management
  • Model Personalization: Individual model adaptation from global updates
  • Communication Efficiency: Compressed gradient updates

Model Lifecycle Management

  • Version Control: Git-like operations for models and datasets
  • Experiment Tracking: Comprehensive MLflow integration
  • Deployment Automation: CI/CD pipelines for model deployment
  • Monitoring: Performance drift detection and alerting
  • Rollback Capabilities: Safe model rollback with audit trails

Data Governance Framework

Schema Management

  • JSON Schema Validation: Draft 7 compliance for all data structures
  • Schema Registry: Centralized schema management and versioning
  • Data Contract Testing: Automated validation of data contracts
  • Schema Evolution: Backward-compatible schema updates

Provenance and Audit Trail

  • Data Lineage: Complete transformation history tracking
  • Audit Logging: Comprehensive audit trails for compliance
  • Digital Signatures: Cryptographic verification of data integrity
  • Retention Policies: Automated data lifecycle management

Privacy Preservation

  • Differential Privacy: Statistical noise addition for privacy
  • Data Minimization: Collect only necessary data
  • Purpose Limitation: Clear data usage boundaries
  • Consent Management: Granular consent tracking and enforcement

Compliance Automation

  • HIPAA Compliance Engine: Automated compliance checking
  • Policy as Code: Rego policies for data governance
  • Automated Reporting: Compliance report generation
  • Breach Detection: Real-time breach monitoring and alerting

Data Ingestion and Storage Architecture

To ensure high availability, scalability, and data integrity, the system uses a decoupled, asynchronous pipeline for event ingestion, along with a two-tiered storage strategy.

Queue-to-Storage Pipeline

Instead of writing directly to the database upon ingestion, the API endpoint follows a more resilient pattern:

  1. Fast Ingress: The /v1/events/ingest endpoint performs only initial, lightweight validation (Schema, Auth, Rate Limit).
  2. Queuing: If valid, the raw event is pushed to a durable message queue (e.g., Redis Streams, RabbitMQ). The client immediately receives a 202 Accepted response.
  3. Asynchronous Processing: A separate pool of "pipeline workers" consumes events from the queue. This decouples the ingestion rate from the processing rate, allowing the system to absorb bursts of traffic. If a worker fails, the event is safely retained in the queue for another worker to process.

Two-Tiered Storage Strategy

The pipeline workers write data to two distinct storage destinations, each optimized for a specific purpose:

1. Normalized Store (The "Hot" Engine)

  • Technology: PostgreSQL with the TimescaleDB extension.
  • Purpose: The primary operational database for real-time dashboards, mobile app queries, and reporting. It is optimized for performance.
  • Strategy: Raw JSON events are "shredded" or normalized into structured, relational tables (e.g., events, event_locations). This allows for fast, indexed queries. TimescaleDB's features like hypertables and compression are used to efficiently manage and query vast amounts of time-series data.

2. Raw Archive Location (The "Cold" Vault)

  • Technology: An S3-compatible object store (e.g., American Cloud A2, MinIO) with U.S.-only data residency.
  • Purpose: The immutable, long-term (7+ years) source of truth for compliance and auditing. It is optimized for durability and low cost.
  • Strategy: The original, signed, canonical JSON payload for every event is stored here without modification. WORM (Write-Once, Read-Many) policies are enforced to guarantee that the raw data can never be altered, providing a cryptographically verifiable audit trail.

Data Flow

Event Processing Pipeline

  1. Data Collection: Wearable device collects sensor data and streams to Edge Hub via BLE
  2. Schema Validation: Incoming data validated against registered schemas
  3. Local Processing: Edge Hub runs ML models to analyze sensor data in real-time
  4. Provenance Recording: Data lineage and transformation history recorded
  5. Event Detection: Potential events are detected and verified on the Edge Hub
  6. Privacy Preservation: Differential privacy applied to sensitive data
  7. Local Storage: Raw sensor data and events are stored securely on the Edge Hub
  8. Access Control: Patient-managed permissions control data access
  9. Caregiver Notification: Authorized caregivers receive real-time alerts through the mobile app
  10. Cloud Sync: Anonymized/aggregated data is synced to the cloud when online
  11. Backend Processing: Cloud backend processes and stores events
  12. Compliance Checking: Automated compliance validation and reporting
  13. Dashboard Updates: Web dashboard is updated with the latest information

Data Storage

Edge Hub Storage

  • Raw Sensor Data: 7 days of high-frequency sensor data (encrypted)
  • Local Events: 30 days of processed events and alerts (with provenance)
  • Access Logs: 90 days of access and permission logs (auditable)
  • Model Artifacts: Local model versions with integrity verification

Cloud Storage

  • Hot Storage: 30 days of raw sensor data (anonymized)
  • Warm Storage: 2 years of processed events (with full provenance)
  • Cold Storage: 7+ years of audit logs (immutable)
  • Immutable Ledger: All care events in append-only format (blockchain-inspired)

Data Quality Validation

  • Schema Compliance: JSON Schema validation for all data structures
  • Statistical Validation: Distribution and outlier detection
  • Completeness Checks: Missing data identification and handling
  • Privacy Compliance: PII detection and anonymization verification
  • Automated Reporting: Data quality metrics and improvement recommendations

Security Architecture

Data Protection

  • End-to-end encryption for all data in transit
  • Encryption at rest for sensitive data with key rotation
  • Regular security audits and penetration testing
  • US-based data centers with strict access controls
  • Hardware Security Modules (HSMs) for key management

Access Control

  • Role-based access control (RBAC) with fine-grained permissions
  • Multi-factor authentication for admin users
  • Device attestation for all API requests
  • Zero-trust network architecture
  • Comprehensive audit logging with tamper detection

Compliance

  • HIPAA Security and Privacy Rules (automated validation)
  • SOC 2 Type II certification (in progress)
  • Regular third-party security assessments
  • Breach notification procedures with automated response
  • Privacy by Design principles throughout the architecture

Edge Computing Architecture

Hardware Architecture

  • Wearable Devices: Ultra-low power ML inference with TensorFlow Lite Micro
  • Edge Gateways: NVIDIA Jetson or similar for local processing
  • Mobile Devices: ONNX Runtime for cross-platform inference
  • Embedded Systems: Custom hardware for specialized use cases

Software Architecture

  • Inference Engine: Hardware-accelerated ML inference
  • Communication Layer: Secure device-to-cloud communication
  • Storage Layer: Local encrypted storage with synchronization
  • Management Layer: Over-the-air updates and configuration

Network Architecture

  • Local Networks: BLE and WiFi for device connectivity
  • Edge-to-Cloud: Secure MQTT/WebSocket communication
  • Federated Learning: Peer-to-peer and centralized coordination

Deployment Architecture

Environments

  • Development: Local Docker containers with hot reload
  • Staging: Isolated cloud environment with production-like scale
  • Production: Multi-AZ deployment for high availability
  • Edge: Distributed deployment across healthcare facilities

Infrastructure

  • Compute: Containerized services (Docker) with edge optimization
  • Orchestration: Kubernetes for cloud, Docker Compose for edge
  • Database: Managed PostgreSQL with read replicas and automated failover
  • Storage: Encrypted block storage with backup and disaster recovery
  • Monitoring: Comprehensive observability stack with edge-specific metrics

CI/CD Pipeline

  • Model Pipeline: Automated ML model training and deployment
  • Data Pipeline: Schema validation and data quality checks
  • Application Pipeline: Multi-stage deployment with rollback capabilities
  • Edge Pipeline: Over-the-air updates for edge devices

Scaling Considerations

  • Designed for 10,000+ active patients across multiple facilities
  • Horizontal scaling for API layer with auto-scaling groups
  • Read replicas for reporting and analytics workloads
  • Caching layer (Redis) for frequently accessed data
  • Edge distribution for local processing and reduced latency
  • Federated learning for decentralized model training
  • Data partitioning strategies for large-scale datasets

Technology Integration Points

Third-Party Integrations

  • EHR Systems: HL7 FHIR interfaces for medical record integration
  • Telemedicine Platforms: Video consultation and remote monitoring
  • IoT Devices: Additional sensor integration (vital signs, environmental)
  • Emergency Services: Automated emergency dispatch integration

API Ecosystem

  • REST APIs: Comprehensive OpenAPI-compliant interfaces
  • GraphQL: Flexible querying for complex data relationships
  • WebSocket APIs: Real-time event streaming
  • gRPC APIs: High-performance edge-to-cloud communication

Data Exchange Standards

  • HL7 FHIR: Healthcare interoperability standard
  • OpenEHR: Clinical data models and archetypes
  • OMOP CDM: Observational Medical Outcomes Partnership Common Data Model
  • CDISC: Clinical data interchange standards for research

Future Enhancements

Short Term (Post-MVP)

  • Advanced analytics and machine learning with federated learning
  • Integration with EHR systems for seamless data flow
  • Additional sensor support (vital signs, environmental monitoring)
  • Expanded caregiver collaboration tools with real-time coordination

Medium Term

  • Predictive analytics for care planning and intervention
  • Computer vision for activity recognition and safety monitoring
  • Natural language processing for clinical documentation
  • Advanced federated learning with multiple healthcare providers

Long Term Vision

  • Autonomous care coordination with AI-driven care plans
  • Population health management across multiple facilities
  • Personalized medicine integration with genetic and biomarker data
  • Global research collaboration while maintaining data sovereignty