{
  "schema_version": 1,
  "mode": "architecture",
  "template_type": "architecture",
  "style": 9,
  "motion_scene": "review-trace",
  "semantic_profile": "c4-review",
  "diagram_type": "c4",
  "c4_level": "container",
  "review_state": "ADR READY",
  "rough_seed": 20260715,
  "scope": "Checkout Platform",
  "quality_profile": "showcase",
  "width": 1100,
  "height": 700,
  "title": "Checkout Platform · Container Review",
  "subtitle": "one abstraction level, explicit responsibilities, review-ready relationships",
  "containers": [
    {
      "id": "checkout-boundary",
      "x": 260,
      "y": 150,
      "width": 600,
      "height": 420,
      "label": "Checkout Platform",
      "subtitle": "C4 container boundary"
    }
  ],
  "nodes": [
    {
      "id": "shopper",
      "kind": "review_card",
      "c4_type": "person",
      "x": 50,
      "y": 220,
      "width": 150,
      "height": 76,
      "label": "Shopper",
      "description": "places an order",
      "stroke": "#356a8a"
    },
    {
      "id": "web-app",
      "kind": "review_card",
      "c4_type": "container",
      "parent": "checkout-boundary",
      "x": 300,
      "y": 210,
      "width": 200,
      "height": 96,
      "label": "Checkout Web",
      "description": "collects cart + payment intent",
      "technology": "Next.js"
    },
    {
      "id": "checkout-api",
      "kind": "review_card",
      "c4_type": "container",
      "parent": "checkout-boundary",
      "x": 600,
      "y": 210,
      "width": 200,
      "height": 96,
      "label": "Checkout API",
      "description": "coordinates the purchase flow",
      "technology": "Go + gRPC",
      "stroke": "#a44a3f"
    },
    {
      "id": "order-store",
      "kind": "review_card",
      "c4_type": "container",
      "parent": "checkout-boundary",
      "x": 300,
      "y": 400,
      "width": 200,
      "height": 96,
      "label": "Order Store",
      "description": "persists order state",
      "technology": "PostgreSQL",
      "stroke": "#356a8a"
    },
    {
      "id": "order-worker",
      "kind": "review_card",
      "c4_type": "container",
      "parent": "checkout-boundary",
      "x": 600,
      "y": 400,
      "width": 200,
      "height": 96,
      "label": "Order Worker",
      "description": "confirms and fulfils orders",
      "technology": "Kotlin",
      "stroke": "#c06b35"
    },
    {
      "id": "payment-provider",
      "kind": "review_card",
      "c4_type": "external_system",
      "x": 900,
      "y": 410,
      "width": 150,
      "height": 76,
      "label": "Payment PSP",
      "description": "authorizes cards",
      "stroke": "#7a5c99"
    }
  ],
  "arrows": [
    {
      "id": "browse-checkout",
      "source": "shopper",
      "target": "web-app",
      "source_port": "right",
      "target_port": "left",
      "flow": "read",
      "motion_role": "review-entry",
      "motion_stage": 1,
      "motion_order": 0,
      "label": "start",
      "protocol": "HTTPS"
    },
    {
      "id": "submit-order",
      "source": "web-app",
      "target": "checkout-api",
      "source_port": "right",
      "target_port": "left",
      "flow": "control",
      "motion_role": "review-request",
      "motion_stage": 2,
      "motion_order": 0,
      "label": "order",
      "protocol": "JSON/HTTPS"
    },
    {
      "id": "enqueue-order",
      "source": "checkout-api",
      "target": "order-worker",
      "source_port": "bottom",
      "target_port": "top",
      "flow": "async",
      "motion_role": "review-async",
      "motion_stage": 3,
      "motion_order": 0,
      "label": "enqueue",
      "protocol": "Kafka"
    },
    {
      "id": "persist-order",
      "source": "order-worker",
      "target": "order-store",
      "source_port": "left",
      "target_port": "right",
      "flow": "write",
      "motion_role": "review-state",
      "motion_stage": 4,
      "motion_order": 0,
      "label": "save",
      "protocol": "SQL"
    },
    {
      "id": "authorize-payment",
      "source": "order-worker",
      "target": "payment-provider",
      "source_port": "right",
      "target_port": "left",
      "flow": "control",
      "motion_role": "review-external",
      "motion_stage": 4,
      "motion_order": 1,
      "label": "authorize",
      "protocol": "HTTPS"
    }
  ],
  "legend_orientation": "horizontal",
  "legend_x": 48,
  "legend_y": 620,
  "legend_locked": true,
  "legend": [
    { "flow": "control", "label": "request" },
    { "flow": "write", "label": "state change" },
    { "flow": "async", "label": "asynchronous" }
  ],
  "footer": "Style 9 · C4 Review Canvas · deterministic review marks · container-level semantics",
  "footer_x": 48,
  "footer_y": 680
}
