{
  "schema_version": 1,
  "diagram_type": "architecture",
  "meta": {
    "title": "KBP Deployment View",
    "output": "docs/architecture/arc42/assets/kbp-deployment-view.html",
    "quality_profile": "showcase",
    "locale": "en",
    "views": [
      {
        "id": "clients",
        "label": "Client paths into KBP",
        "focus": [
          "agentpc",
          "frontdoor",
          "asi",
          "apimprov",
          "appservice"
        ],
        "note": "Agents reach the App Service through the shared Front Door; ASI calls the Kundenberaterportal API published on API Management."
      },
      {
        "id": "platform",
        "label": "KBP platform resources",
        "focus": [
          "appservice",
          "redis",
          "keyvault",
          "sql"
        ],
        "note": "Session, cache, secrets, settings and the legacy account database that the App Service depends on."
      },
      {
        "id": "backends",
        "label": "Backend integrations",
        "focus": [
          "appservice",
          "apimcons",
          "dlapi",
          "ciam",
          "saas"
        ],
        "note": "EnBW APIs are consumed through API Management; identity via the scale tenant; content and analytics as SaaS."
      }
    ]
  },
  "components": [
    {
      "id": "agentpc",
      "type": "frontend",
      "label": "Agent browser",
      "sublabel": "KBP client · Vue 3 + Vuetify",
      "pos": [
        40,
        180
      ],
      "size": [
        180,
        62
      ],
      "tag": "Edge"
    },
    {
      "id": "asi",
      "type": "external",
      "label": "ASI client",
      "sublabel": "Angular · agent support",
      "pos": [
        40,
        440
      ],
      "size": [
        180,
        62
      ]
    },
    {
      "id": "frontdoor",
      "type": "cloud",
      "label": "Azure Front Door",
      "sublabel": "fd-enbw-prod · WAF",
      "pos": [
        300,
        180
      ],
      "size": [
        180,
        62
      ],
      "tag": "shared"
    },
    {
      "id": "apimprov",
      "type": "cloud",
      "label": "APIM · KBP as provider",
      "sublabel": "api.enbw.com/kbp",
      "pos": [
        300,
        440
      ],
      "size": [
        180,
        62
      ],
      "tag": "shared"
    },
    {
      "id": "redis",
      "type": "database",
      "label": "Azure Cache for Redis",
      "sublabel": "session · cache · PIN state",
      "pos": [
        560,
        40
      ],
      "size": [
        190,
        62
      ]
    },
    {
      "id": "appservice",
      "type": "backend",
      "label": "KBP App Service",
      "sublabel": "ASP.NET Core · .NET 10",
      "pos": [
        560,
        300
      ],
      "size": [
        190,
        70
      ],
      "tag": "web-kbp-prod"
    },
    {
      "id": "keyvault",
      "type": "security",
      "label": "Key Vault · App Config",
      "sublabel": "secrets · settings",
      "pos": [
        560,
        580
      ],
      "size": [
        190,
        62
      ]
    },
    {
      "id": "sql",
      "type": "database",
      "label": "Account DB (Azure SQL)",
      "sublabel": "YelloData · legacy accounts",
      "pos": [
        850,
        40
      ],
      "size": [
        190,
        62
      ],
      "tag": "shared"
    },
    {
      "id": "apimcons",
      "type": "cloud",
      "label": "APIM · KBP as consumer",
      "sublabel": "api.enbw.com · OAuth2",
      "pos": [
        850,
        300
      ],
      "size": [
        190,
        70
      ],
      "tag": "shared"
    },
    {
      "id": "dlapi",
      "type": "messagebus",
      "label": "Digital Layer events",
      "sublabel": "APIM dlapiprod · Service Bus",
      "pos": [
        850,
        580
      ],
      "size": [
        190,
        62
      ]
    },
    {
      "id": "ciam",
      "type": "security",
      "label": "CIAM",
      "sublabel": "scaleapi.enbw.com",
      "pos": [
        1130,
        160
      ],
      "size": [
        180,
        62
      ],
      "tag": "scale tenant"
    },
    {
      "id": "saas",
      "type": "external",
      "label": "Contentful · MXO",
      "sublabel": "CMS · Thunderhead One",
      "pos": [
        1130,
        440
      ],
      "size": [
        180,
        62
      ]
    }
  ],
  "boundaries": [
    {
      "kind": "region",
      "label": "Agent workstation",
      "wraps": [
        "agentpc"
      ],
      "pad": 14
    },
    {
      "kind": "region",
      "label": "Azure · enpower tenant",
      "wraps": [
        "frontdoor",
        "apimprov",
        "appservice",
        "redis",
        "keyvault",
        "sql",
        "apimcons",
        "dlapi"
      ],
      "pad": 22
    },
    {
      "kind": "security-group",
      "label": "KBP private network",
      "wraps": [
        "appservice",
        "redis",
        "keyvault"
      ],
      "pad": 12
    },
    {
      "kind": "region",
      "label": "Azure · scale tenant",
      "wraps": [
        "ciam"
      ],
      "pad": 14
    }
  ],
  "connections": [
    {
      "from": "agentpc",
      "to": "frontdoor",
      "label": "HTTPS",
      "variant": "emphasis"
    },
    {
      "from": "frontdoor",
      "to": "appservice",
      "label": "Private Link",
      "variant": "security"
    },
    {
      "from": "asi",
      "to": "apimprov",
      "label": "REST"
    },
    {
      "from": "apimprov",
      "to": "appservice",
      "label": "Kundenberaterportal API"
    },
    {
      "from": "appservice",
      "to": "redis",
      "label": "session · cache"
    },
    {
      "from": "appservice",
      "to": "keyvault",
      "label": "secrets · settings",
      "variant": "dashed",
      "labelAt": [
        700,
        470
      ]
    },
    {
      "from": "appservice",
      "to": "sql",
      "label": "SQL",
      "labelAt": [
        825,
        60
      ]
    },
    {
      "from": "appservice",
      "to": "apimcons",
      "label": "REST",
      "variant": "emphasis",
      "labelAt": [
        825,
        350
      ]
    },
    {
      "from": "appservice",
      "to": "dlapi",
      "label": "events",
      "variant": "dashed",
      "labelAt": [
        812,
        600
      ]
    },
    {
      "from": "appservice",
      "to": "ciam",
      "label": "REST",
      "variant": "security"
    },
    {
      "from": "appservice",
      "to": "saas",
      "label": "REST"
    }
  ],
  "cards": [
    {
      "dot": "cyan",
      "title": "Clients",
      "items": [
        "Agents use Edge on the KBP client (Vue 3 + Vuetify)",
        "ASI opens KBP through the Kundenberaterportal API",
        "BSI is the planned future entry point"
      ]
    },
    {
      "dot": "emerald",
      "title": "APIs consumed via APIM",
      "items": [
        "EnWiCore, ComV3 offers and orders, commodity layer, meter data",
        "APA, CMDM, PIN, permissions, Kundenmerkmal, WFM (ZAuV)",
        "EnDIA, address and grid data, access management, bundles"
      ]
    },
    {
      "dot": "rose",
      "title": "Platform",
      "items": [
        "App Service (.NET 10) with staging slot, VNet-integrated",
        "Redis holds session and cache; Key Vault and App Config hold settings",
        "Digital Layer events leave through APIM dlapiprod"
      ]
    }
  ]
}
