{
 "$schema": "../../lib/umlimator.schema.json",
 "schemaVersion": 2,
 "title": "Component diagram",
 "root": "components",
 "nodes": [
  {"id": "accounts-pkg", "type": "uml.Package", "label": "accounts"},
  {"id": "storefront", "type": "uml.Component", "label": "Storefront", "props": {"stereotypes": ["web app"]}},
  {"id": "shop-api", "type": "uml.Component", "label": "Shop API", "members": [{"id": "shop-api.orders", "type": "uml.Port", "label": "orders"}, {"id": "shop-api.payments", "type": "uml.Port", "label": "payments"}]},
  {"id": "basket", "type": "uml.Component", "label": "Basket", "parent": "shop-api", "members": [{"id": "basket.orders", "type": "uml.Port", "label": "orders"}]},
  {"id": "checkout", "type": "uml.Component", "label": "Checkout", "parent": "shop-api", "members": [{"id": "checkout.payments", "type": "uml.Port", "label": "payments"}]},
  {"id": "accounts", "type": "uml.Component", "label": "Accounts and sign-in", "parent": "accounts-pkg"},
  {"id": "session-store", "type": "uml.Class", "label": "SessionStore", "parent": "accounts-pkg"},
  {"id": "payment-provider", "type": "uml.Component", "label": "Payment provider", "members": [{"id": "payment-provider.charges", "type": "uml.Port", "label": "charges", "props": {"valueType": "Charging"}}]},
  {"id": "order-worker", "type": "uml.Component", "label": "Order worker"},
  {"id": "i-orders", "type": "uml.Interface", "label": "Orders"},
  {"id": "i-sign-in", "type": "uml.Interface", "label": "SignIn", "members": [{"id": "i-sign-in.check", "type": "uml.Operation", "label": "check", "props": {"visibility": "public", "parameters": [{"name": "token", "valueType": "String"}], "returnType": "Customer"}}]},
  {"id": "shop-api-jar", "type": "uml.Artifact", "label": "shop-api.jar"},
  {"id": "jar-note", "type": "uml.Comment", "label": "one jar, built by the release pipeline for every release"}
 ],
 "edges": [
  {"id": "api-provides-orders", "type": "uml.InterfaceRealization", "from": "shop-api.orders", "to": "i-orders"},
  {"id": "storefront-requires-orders", "type": "uml.Usage", "from": "storefront", "to": "i-orders"},
  {"id": "orders-to-basket", "type": "uml.Connector", "from": "shop-api.orders", "to": "basket.orders", "props": {"kind": "delegation"}},
  {"id": "basket-checkout", "type": "uml.Connector", "from": "basket", "to": "checkout", "props": {"kind": "assembly"}},
  {"id": "checkout-payments-out", "type": "uml.Connector", "from": "checkout.payments", "to": "shop-api.payments", "props": {"kind": "delegation"}},
  {"id": "api-to-provider", "type": "uml.Connector", "from": "shop-api.payments", "to": "payment-provider.charges", "props": {"kind": "assembly"}},
  {"id": "accounts-provides-sign-in", "type": "uml.InterfaceRealization", "from": "accounts", "to": "i-sign-in"},
  {"id": "api-requires-sign-in", "type": "uml.Usage", "from": "shop-api", "to": "i-sign-in"},
  {"id": "session-realizes-accounts", "type": "uml.ComponentRealization", "from": "session-store", "to": "accounts"},
  {"id": "worker-calls-api", "type": "uml.Dependency", "from": "order-worker", "to": "shop-api", "props": {"stereotypes": ["call"]}},
  {"id": "api-jar-manifests-api", "type": "uml.Manifestation", "from": "shop-api-jar", "to": "shop-api"},
  {"id": "jar-note-link", "type": "uml.CommentLink", "from": "jar-note", "to": "shop-api-jar"}
 ],
 "views": [
  {"id": "components", "diagram": "uml.component", "title": "The bookshop's components", "parent": null, "nodeIds": ["accounts-pkg", "storefront", "shop-api", "basket", "checkout", "accounts", "session-store", "payment-provider", "order-worker", "i-orders", "i-sign-in", "shop-api-jar", "jar-note"], "present": {"i-orders": {"as": "ball"}}, "layout": {"payment-provider": [4, 3]}},
  {"id": "components-down", "diagram": "uml.component", "title": "The same components, laid out down", "parent": "components", "nodeIds": ["accounts-pkg", "storefront", "shop-api", "basket", "checkout", "accounts", "session-store", "payment-provider", "order-worker", "i-orders", "i-sign-in", "shop-api-jar", "jar-note"], "present": {"i-orders": {"as": "ball"}}, "layout": {"payment-provider": [5, 4]}, "direction": "down"}
 ]
}
