{
  "schemaVersion": "0.1",
  "diagramFamily": "architecture",
  "scene": {
    "id": "api-dependency-map",
    "title": "API Dependency Map",
    "units": "px",
    "canvas": { "width": 1200, "height": 600 }
  },
  "layoutStrategy": {
    "algorithm": "hierarchical",
    "direction": "LR",
    "nodeSpacing": 60,
    "rankSpacing": 130
  },
  "elements": [
    { "id": "web", "kind": "node", "nodeType": "service", "shape": "roundedRect", "label": "Web App", "icon": "lucide:monitor" },
    { "id": "mobile", "kind": "node", "nodeType": "service", "shape": "roundedRect", "label": "Mobile App", "icon": "lucide:smartphone" },
    { "id": "gateway", "kind": "node", "nodeType": "service", "shape": "roundedRect", "label": "API Gateway", "icon": "lucide:network" },
    { "id": "auth_api", "kind": "node", "nodeType": "service", "shape": "roundedRect", "label": "Auth API", "icon": "lucide:lock" },
    { "id": "users_api", "kind": "node", "nodeType": "service", "shape": "roundedRect", "label": "Users API", "icon": "lucide:users" },
    { "id": "orders_api", "kind": "node", "nodeType": "service", "shape": "roundedRect", "label": "Orders API", "icon": "lucide:package" },
    { "id": "catalog_api", "kind": "node", "nodeType": "service", "shape": "roundedRect", "label": "Catalog API", "icon": "lucide:boxes" },
    { "id": "billing_api", "kind": "node", "nodeType": "service", "shape": "roundedRect", "label": "Billing API", "icon": "lucide:credit-card" },
    { "id": "search_api", "kind": "node", "nodeType": "service", "shape": "roundedRect", "label": "Search API", "icon": "lucide:search" },
    { "id": "stripe", "kind": "node", "nodeType": "externalSystem", "shape": "roundedRect", "label": "Stripe", "icon": "lucide:external-link" },
    { "id": "sendgrid", "kind": "node", "nodeType": "externalSystem", "shape": "roundedRect", "label": "SendGrid", "icon": "lucide:mail" },
    { "id": "e_web_gw", "kind": "edge", "from": { "elementId": "web" }, "to": { "elementId": "gateway" }, "label": "REST", "router": "orthogonal" },
    { "id": "e_mob_gw", "kind": "edge", "from": { "elementId": "mobile" }, "to": { "elementId": "gateway" }, "label": "REST", "router": "orthogonal" },
    { "id": "e_gw_auth", "kind": "edge", "from": { "elementId": "gateway" }, "to": { "elementId": "auth_api" }, "label": "POST /v1/login", "router": "orthogonal" },
    { "id": "e_gw_users", "kind": "edge", "from": { "elementId": "gateway" }, "to": { "elementId": "users_api" }, "label": "GET /v1/users", "router": "orthogonal" },
    { "id": "e_gw_orders", "kind": "edge", "from": { "elementId": "gateway" }, "to": { "elementId": "orders_api" }, "label": "REST", "router": "orthogonal" },
    { "id": "e_gw_catalog", "kind": "edge", "from": { "elementId": "gateway" }, "to": { "elementId": "catalog_api" }, "label": "REST", "router": "orthogonal" },
    { "id": "e_orders_billing", "kind": "edge", "from": { "elementId": "orders_api" }, "to": { "elementId": "billing_api" }, "label": "POST /charge", "router": "orthogonal" },
    { "id": "e_orders_users", "kind": "edge", "from": { "elementId": "orders_api" }, "to": { "elementId": "users_api" }, "label": "GET /users/:id", "router": "orthogonal" },
    { "id": "e_catalog_search", "kind": "edge", "from": { "elementId": "catalog_api" }, "to": { "elementId": "search_api" }, "label": "POST /index", "router": "orthogonal" },
    { "id": "e_billing_stripe", "kind": "edge", "from": { "elementId": "billing_api" }, "to": { "elementId": "stripe" }, "label": "Stripe SDK", "router": "orthogonal" },
    { "id": "e_orders_sendgrid", "kind": "edge", "from": { "elementId": "orders_api" }, "to": { "elementId": "sendgrid" }, "label": "SendGrid SDK", "router": "orthogonal" }
  ]
}
