{
  "schema_version": 1,
  "diagram_type": "architecture",
  "meta": {
    "title": "AEA Path B \u2014 shop vs docs runtime",
    "output": "path-b-runtime.architecture.html",
    "quality_profile": "showcase",
    "views": [
      {
        "id": "shop-request",
        "label": "Shop request path",
        "focus": [
          "shopper",
          "alb",
          "bff",
          "bus",
          "domain",
          "rds"
        ],
        "note": "Shop traffic on aea.artof.link: ALB \u2192 BFF \u2192 MSK \u2192 domain \u2192 RDS."
      },
      {
        "id": "two-hosts",
        "label": "Two hostnames",
        "focus": [
          "shopper",
          "alb",
          "docs",
          "reader"
        ],
        "note": "architecture.artof.link and aea.artof.link are independent origins."
      },
      {
        "id": "sleep-window",
        "label": "Sleep / wake honesty",
        "focus": [
          "schedule",
          "alb",
          "bff",
          "bus",
          "nat"
        ],
        "note": "Evening demo or short wake lease. MSK and NAT stay up in phase 1."
      }
    ]
  },
  "components": [
    {
      "id": "reader",
      "type": "external",
      "label": "Reader",
      "sublabel": "Docs visitor",
      "pos": [
        40,
        50
      ],
      "size": [
        110,
        52
      ]
    },
    {
      "id": "docs",
      "type": "cloud",
      "label": "GitLab Pages",
      "sublabel": "architecture.artof.link",
      "pos": [
        220,
        50
      ],
      "size": [
        180,
        52
      ],
      "tag": "static"
    },
    {
      "id": "shopper",
      "type": "external",
      "label": "Shopper",
      "sublabel": "Web / companion",
      "pos": [
        40,
        250
      ],
      "size": [
        120,
        52
      ]
    },
    {
      "id": "alb",
      "type": "cloud",
      "label": "ALB TLS",
      "sublabel": "aea.artof.link",
      "pos": [
        220,
        250
      ],
      "size": [
        140,
        52
      ],
      "tag": "resting HTML"
    },
    {
      "id": "bff",
      "type": "backend",
      "label": "Edge BFF",
      "sublabel": "ECS Fargate",
      "pos": [
        420,
        250
      ],
      "size": [
        120,
        52
      ]
    },
    {
      "id": "ai",
      "type": "security",
      "label": "AI gateway",
      "sublabel": "LiteLLM private",
      "pos": [
        420,
        110
      ],
      "size": [
        130,
        52
      ],
      "tag": "no DB write"
    },
    {
      "id": "bus",
      "type": "messagebus",
      "label": "MSK",
      "sublabel": "Kafka-compatible",
      "pos": [
        600,
        250
      ],
      "size": [
        130,
        52
      ],
      "tag": "stays up"
    },
    {
      "id": "domain",
      "type": "backend",
      "label": "Domain svcs",
      "sublabel": "ECS Fargate",
      "pos": [
        790,
        250
      ],
      "size": [
        120,
        52
      ]
    },
    {
      "id": "rds",
      "type": "database",
      "label": "RDS Postgres",
      "sublabel": "authoritative",
      "pos": [
        970,
        250
      ],
      "size": [
        130,
        52
      ]
    },
    {
      "id": "schedule",
      "type": "backend",
      "label": "Uptime Lambda",
      "sublabel": "20:00\u201322:00 Berlin",
      "pos": [
        220,
        400
      ],
      "size": [
        150,
        52
      ],
      "tag": "Documented"
    },
    {
      "id": "nat",
      "type": "cloud",
      "label": "NAT",
      "sublabel": "egress phase 1",
      "pos": [
        600,
        400
      ],
      "size": [
        110,
        52
      ],
      "tag": "stays up"
    },
    {
      "id": "pay",
      "type": "security",
      "label": "Payment sim",
      "sublabel": "ADR-016",
      "pos": [
        790,
        400
      ],
      "size": [
        120,
        52
      ],
      "tag": "not Stripe"
    }
  ],
  "boundaries": [
    {
      "kind": "region",
      "label": "Docs host (GitLab Pages)",
      "wraps": [
        "docs"
      ]
    },
    {
      "kind": "region",
      "label": "Shop pilot AWS us-east-1",
      "wraps": [
        "alb",
        "schedule",
        "bff",
        "ai",
        "bus",
        "domain",
        "rds",
        "nat",
        "pay"
      ]
    },
    {
      "kind": "security-group",
      "label": "Private AI / domain",
      "wraps": [
        "ai",
        "domain",
        "rds"
      ]
    }
  ],
  "connections": [
    {
      "id": "read-docs",
      "from": "reader",
      "to": "docs",
      "label": "HTTPS",
      "variant": "dashed"
    },
    {
      "id": "shop-https",
      "from": "shopper",
      "to": "alb",
      "label": "HTTPS",
      "variant": "emphasis"
    },
    {
      "id": "alb-bff",
      "from": "alb",
      "to": "bff"
    },
    {
      "id": "schedule-alb",
      "from": "schedule",
      "to": "alb",
      "label": "wake/rest",
      "variant": "dashed",
      "fromSide": "top",
      "toSide": "bottom",
      "labelDy": 70,
      "labelAt": [
        295,
        350
      ]
    },
    {
      "id": "bff-ai",
      "from": "bff",
      "to": "ai",
      "label": "intent",
      "fromSide": "top",
      "toSide": "bottom",
      "labelDy": -50,
      "labelAt": [
        485,
        175
      ]
    },
    {
      "id": "bff-bus",
      "from": "bff",
      "to": "bus",
      "label": "events",
      "variant": "emphasis"
    },
    {
      "id": "bus-domain",
      "from": "bus",
      "to": "domain",
      "label": "consume"
    },
    {
      "id": "domain-rds",
      "from": "domain",
      "to": "rds",
      "label": "SQL"
    },
    {
      "id": "domain-pay",
      "from": "domain",
      "to": "pay",
      "label": "simulate",
      "variant": "dashed",
      "fromSide": "bottom",
      "toSide": "top",
      "labelDy": 55
    },
    {
      "id": "bus-nat",
      "from": "bus",
      "to": "nat",
      "label": "egress",
      "variant": "dashed",
      "fromSide": "bottom",
      "toSide": "top",
      "labelDy": 55
    }
  ],
  "cards": [
    {
      "dot": "cyan",
      "title": "Two hosts, two jobs",
      "items": [
        "architecture.artof.link = GitLab Pages docs (static)",
        "aea.artof.link = Path B shop pilot (ECS / ALB / RDS)",
        "No shared LB, compute, or database between them"
      ]
    },
    {
      "dot": "orange",
      "title": "Sleep window honesty",
      "items": [
        "Default online 20:00\u201322:00 Europe/Berlin (+ short wake lease)",
        "Off-window: ALB resting HTML (Probed); shop API expected down",
        "MSK + NAT stay up in phase 1 \u2014 they do not hibernate with apps"
      ]
    },
    {
      "dot": "rose",
      "title": "What this diagram is not",
      "items": [
        "Documentation aid \u2014 not a live status dashboard",
        "Payment is ADR-016 simulation, not live Stripe",
        "Do not claim 24/7 Fargate or Live/isolated beyond ADRs"
      ]
    }
  ]
}
