Skip to content

Instantly share code, notes, and snippets.

@rupeshtiwari
Created December 12, 2025 16:06
Show Gist options
  • Select an option

  • Save rupeshtiwari/ca4b2c49b94a2537002860268774a9b1 to your computer and use it in GitHub Desktop.

Select an option

Save rupeshtiwari/ca4b2c49b94a2537002860268774a9b1 to your computer and use it in GitHub Desktop.
mermaid example
flowchart LR

    subgraph Clients
        D1[Wearable Device]
        D2[Mobile App]
    end

    subgraph Ingestion
        AGW[API Gateway / Load Balancer]
        AUTH[Auth & Device Mapping]
    end

    subgraph EventBus
        KAFKA[(Kafka / Kinesis\nsensor_events)]
    end

    subgraph StreamProcessing
        SP[Stream Processor\nFlink / Spark Streaming]
    end

    subgraph Storage
        RAW[(Data Lake\nS3 / GCS - Parquet)]
        SERVE[(Serving Store\nTSDB / DynamoDB / Cassandra)]
        DW[(Data Warehouse\nSnowflake / BigQuery)]
    end

    subgraph Caching
        CACHE[(Redis / Memcached)]
    end

    subgraph APIs
        DASHAPI[Dashboard API]
    end

    subgraph Alerts
        ALERTS[Alert Evaluation & Notification Service]
    end

    subgraph Observability
        MON[Monitoring & Logging\nPrometheus / Grafana]
    end

    %% Flows from clients
    D1 -->|sensor events| AGW
    D2 -->|user requests| AGW

    AGW --> AUTH
    AUTH -->|validated events| KAFKA

    KAFKA --> SP

    SP -->|raw events| RAW
    SP -->|recent metrics| SERVE
    SP -->|alert events| ALERTS

    RAW --> DW

    AGW --> DASHAPI
    DASHAPI --> CACHE
    CACHE --> SERVE
    SERVE --> CACHE

    DW --> MON
    SERVE --> MON
    ALERTS --> MON
    AGW --> MON
    KAFKA --> MON
    SP --> MON
    DASHAPI --> MON

    DASHAPI -->|JSON responses| D2

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment