{
 "$schema": "../lib/umlimator.schema.json",
 "schemaVersion": 2,
 "title": "Bookshop Atlas",
 "root": "overview",
 "nodes": [
  {
   "id": "c4-shopper",
   "type": "c4.Person",
   "label": "Shopper",
   "props": {
    "description": "Browses the catalogue, buys books and tracks orders."
   },
   "opensView": "shopping"
  },
  {
   "id": "c4-staff",
   "type": "c4.Person",
   "label": "Shop staff",
   "props": {
    "description": "Keep the catalogue up to date and refund orders."
   }
  },
  {
   "id": "c4-bookshop",
   "type": "c4.SoftwareSystem",
   "label": "Bookshop",
   "opensView": "c4-containers",
   "props": {
    "description": "Sells books online: catalogue, basket, checkout and order tracking."
   }
  },
  {
   "id": "c4-payments",
   "type": "c4.SoftwareSystem",
   "label": "Payment provider",
   "props": {
    "description": "Takes card payments and makes refunds.",
    "external": true
   }
  },
  {
   "id": "c4-mail",
   "type": "c4.SoftwareSystem",
   "label": "Email service",
   "props": {
    "description": "Delivers the shop's emails.",
    "external": true
   }
  },
  {
   "id": "c4-courier",
   "type": "c4.SoftwareSystem",
   "label": "Courier",
   "props": {
    "description": "Collects parcels and delivers them to shoppers.",
    "external": true
   }
  },
  {
   "id": "c4-storefront",
   "type": "c4.Container",
   "label": "Storefront",
   "parent": "c4-bookshop",
   "props": {
    "technology": "TypeScript, React",
    "description": "The shop in the browser: catalogue, basket and checkout, and the admin pages for staff."
   }
  },
  {
   "id": "c4-api",
   "type": "c4.Container",
   "label": "Shop API",
   "parent": "c4-bookshop",
   "opensView": "c4-components",
   "props": {
    "technology": "Python, FastAPI",
    "description": "Catalogue, basket, checkout and accounts as a JSON API."
   }
  },
  {
   "id": "c4-worker",
   "type": "c4.Container",
   "label": "Order worker",
   "parent": "c4-bookshop",
   "props": {
    "technology": "Python",
    "description": "Fulfils paid orders: books the delivery and sends the confirmation."
   }
  },
  {
   "id": "c4-db",
   "type": "c4.Container",
   "label": "Database",
   "parent": "c4-bookshop",
   "props": {
    "technology": "PostgreSQL",
    "description": "Books, baskets, orders and accounts."
   }
  },
  {
   "id": "c4-queue",
   "type": "c4.Container",
   "label": "Order queue",
   "parent": "c4-bookshop",
   "props": {
    "technology": "PostgreSQL table",
    "description": "Paid orders waiting to be fulfilled, oldest first."
   }
  },
  {
   "id": "c4-catalogue",
   "type": "c4.Component",
   "label": "Catalogue",
   "parent": "c4-api",
   "props": {
    "technology": "FastAPI router",
    "description": "Lists and searches books."
   }
  },
  {
   "id": "c4-checkout",
   "type": "c4.Component",
   "label": "Checkout",
   "parent": "c4-api",
   "props": {
    "technology": "FastAPI router",
    "description": "Turns a basket into a paid order."
   },
   "opensView": "c4-placing-an-order"
  },
  {
   "id": "c4-accounts",
   "type": "c4.Component",
   "label": "Accounts and sign-in",
   "parent": "c4-api",
   "props": {
    "technology": "FastAPI router",
    "description": "Signs shoppers and staff in; keeps hashed passwords and sessions."
   }
  },
  {
   "id": "c4-payment-client",
   "type": "c4.Component",
   "label": "Payment client",
   "parent": "c4-api",
   "props": {
    "technology": "Python, httpx",
    "description": "Starts card payments and reads their result."
   }
  },
  {
   "id": "c4-order-store",
   "type": "c4.Component",
   "label": "Order store",
   "parent": "c4-api",
   "props": {
    "technology": "SQLAlchemy",
    "description": "Saves orders and puts the paid ones on the order queue."
   },
   "opensView": "er-schema"
  },
  {
   "id": "c4-device",
   "type": "c4.DeploymentNode",
   "label": "User's device",
   "props": {
    "technology": "Laptop, tablet or phone",
    "description": "A shopper's or a staff member's own device."
   }
  },
  {
   "id": "c4-browser",
   "type": "c4.DeploymentNode",
   "label": "Web browser",
   "parent": "c4-device",
   "props": {
    "technology": "Chrome, Firefox, Safari or Edge"
   }
  },
  {
   "id": "c4-storefront-1",
   "type": "c4.ContainerInstance",
   "label": "Storefront",
   "parent": "c4-browser",
   "props": {
    "container": "c4-storefront"
   }
  },
  {
   "id": "c4-web-host",
   "type": "c4.DeploymentNode",
   "label": "Web server",
   "props": {
    "technology": "Ubuntu 24.04 LTS",
    "description": "The web tier's server."
   }
  },
  {
   "id": "c4-docker",
   "type": "c4.DeploymentNode",
   "label": "Docker Compose",
   "parent": "c4-web-host",
   "props": {
    "technology": "Docker Engine 27"
   },
   "opensView": "production"
  },
  {
   "id": "c4-api-1",
   "type": "c4.ContainerInstance",
   "label": "Shop API",
   "parent": "c4-docker",
   "props": {
    "container": "c4-api"
   }
  },
  {
   "id": "c4-worker-1",
   "type": "c4.ContainerInstance",
   "label": "Order worker",
   "parent": "c4-docker",
   "props": {
    "container": "c4-worker"
   }
  },
  {
   "id": "c4-db-host",
   "type": "c4.DeploymentNode",
   "label": "Database server",
   "props": {
    "technology": "Ubuntu 24.04 LTS",
    "description": "Backed up every night."
   }
  },
  {
   "id": "c4-postgres",
   "type": "c4.DeploymentNode",
   "label": "PostgreSQL",
   "parent": "c4-db-host",
   "props": {
    "technology": "PostgreSQL 16"
   }
  },
  {
   "id": "c4-db-1",
   "type": "c4.ContainerInstance",
   "label": "Database",
   "parent": "c4-postgres",
   "props": {
    "container": "c4-db"
   }
  },
  {
   "id": "c4-queue-1",
   "type": "c4.ContainerInstance",
   "label": "Order queue",
   "parent": "c4-postgres",
   "props": {
    "container": "c4-queue"
   }
  },
  {
   "id": "shopper",
   "type": "uml.Actor",
   "label": "Shopper"
  },
  {
   "id": "member",
   "type": "uml.Actor",
   "label": "Member"
  },
  {
   "id": "payment-provider",
   "type": "uml.Actor",
   "label": "Payment provider"
  },
  {
   "id": "bookshop",
   "type": "uml.Subject",
   "label": "Online bookshop"
  },
  {
   "id": "browse",
   "type": "uml.UseCase",
   "label": "Browse the catalog",
   "parent": "bookshop"
  },
  {
   "id": "check-out",
   "type": "uml.UseCase",
   "label": "Check out",
   "parent": "bookshop",
   "members": [
    {
     "id": "checkout.payment",
     "type": "uml.ExtensionPoint",
     "label": "payment"
    },
    {
     "id": "checkout.extras",
     "type": "uml.ExtensionPoint",
     "label": "extras"
    }
   ]
  },
  {
   "id": "pay",
   "type": "uml.UseCase",
   "label": "Pay for the order",
   "parent": "bookshop"
  },
  {
   "id": "pay-by-card",
   "type": "uml.UseCase",
   "label": "Pay by card",
   "parent": "bookshop"
  },
  {
   "id": "redeem-voucher",
   "type": "uml.UseCase",
   "label": "Redeem a voucher",
   "parent": "bookshop"
  },
  {
   "id": "gift-wrap",
   "type": "uml.UseCase",
   "label": "Add gift wrapping",
   "parent": "bookshop"
  },
  {
   "id": "sign-in",
   "type": "uml.UseCase",
   "label": "Sign in",
   "parent": "bookshop"
  },
  {
   "id": "track",
   "type": "uml.UseCase",
   "label": "Track an order",
   "parent": "bookshop"
  },
  {
   "id": "buy-start",
   "type": "uml.InitialNode"
  },
  {
   "id": "ref-find",
   "type": "uml.InteractionUse",
   "label": "Find a book",
   "opensView": "find-book"
  },
  {
   "id": "try-payment",
   "type": "uml.MergeNode"
  },
  {
   "id": "ref-checkout",
   "type": "uml.InteractionUse",
   "label": "Check out",
   "opensView": "buy-checkout"
  },
  {
   "id": "payment-ok",
   "type": "uml.DecisionNode",
   "label": "Payment accepted?"
  },
  {
   "id": "buy-split",
   "type": "uml.ForkNode"
  },
  {
   "id": "ref-receipt",
   "type": "uml.InteractionUse",
   "label": "Email the receipt",
   "opensView": "email-receipt"
  },
  {
   "id": "sd-queue",
   "type": "uml.Interaction",
   "label": "Queue the order",
   "opensView": "queue-order"
  },
  {
   "id": "both-done",
   "type": "uml.JoinNode"
  },
  {
   "id": "buy-done",
   "type": "uml.ActivityFinalNode"
  },
  {
   "id": "lifeline-shopper",
   "type": "uml.Lifeline",
   "label": "shopper",
   "props": {
    "represents": "Shopper",
    "stereotypes": [
     "actor"
    ]
   }
  },
  {
   "id": "lifeline-storefront",
   "type": "uml.Lifeline",
   "label": "storefront",
   "props": {
    "represents": "Storefront"
   }
  },
  {
   "id": "lifeline-api",
   "type": "uml.Lifeline",
   "label": "api",
   "props": {
    "represents": "ShopApi"
   }
  },
  {
   "id": "lifeline-payments",
   "type": "uml.Lifeline",
   "label": "payments",
   "props": {
    "represents": "PaymentProvider",
    "states": [
     "Idle",
     "Authorising",
     "Capturing"
    ]
   }
  },
  {
   "id": "email",
   "type": "uml.Lifeline",
   "label": "email",
   "props": {
    "represents": "EmailService"
   }
  },
  {
   "id": "lifeline-queue",
   "type": "uml.Lifeline",
   "label": "queue",
   "props": {
    "represents": "OrderQueue"
   }
  },
  {
   "id": "lifeline-worker",
   "type": "uml.Lifeline",
   "label": "worker",
   "props": {
    "represents": "OrderWorker",
    "states": [
     "Idle",
     "Waiting for payment",
     "Recording payment"
    ]
   }
  },
  {
   "id": "receipt",
   "type": "uml.Lifeline",
   "label": "receipt",
   "props": {
    "represents": "Receipt"
   }
  },
  {
   "id": "storefront-component",
   "type": "uml.Component",
   "label": "Storefront"
  },
  {
   "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": "checkout-component",
   "type": "uml.Component",
   "label": "Checkout",
   "parent": "shop-api",
   "members": [
    {
     "id": "checkout-component.orders",
     "type": "uml.Port",
     "label": "orders"
    },
    {
     "id": "checkout-component.payments",
     "type": "uml.Port",
     "label": "payments"
    }
   ],
   "opensView": "internals"
  },
  {
   "id": "accounts-component",
   "type": "uml.Component",
   "label": "Accounts and sign-in"
  },
  {
   "id": "payment-provider-component",
   "type": "uml.Component",
   "label": "Payment provider",
   "members": [
    {
     "id": "payment-provider-component.charges",
     "type": "uml.Port",
     "label": "charges"
    }
   ]
  },
  {
   "id": "order-worker",
   "type": "uml.Component",
   "label": "Order worker"
  },
  {
   "id": "i-orders",
   "type": "uml.Interface",
   "label": "Orders",
   "opensView": "order-flows"
  },
  {
   "id": "i-sign-in",
   "type": "uml.Interface",
   "label": "SignIn"
  },
  {
   "id": "shop-api-jar",
   "type": "uml.Artifact",
   "label": "shop-api image",
   "parent": "jvm"
  },
  {
   "id": "app-server",
   "type": "uml.Device",
   "label": "Web server"
  },
  {
   "id": "jvm",
   "type": "uml.ExecutionEnvironment",
   "label": "Docker Engine 27",
   "parent": "app-server"
  },
  {
   "id": "sales",
   "type": "uml.Package",
   "label": "sales",
   "opensView": "packages"
  },
  {
   "id": "shared",
   "type": "uml.Package",
   "label": "shared"
  },
  {
   "id": "catalog",
   "type": "uml.Package",
   "label": "catalog"
  },
  {
   "id": "payments-package",
   "type": "uml.Package",
   "label": "payments",
   "opensView": "payments-only"
  },
  {
   "id": "card",
   "type": "uml.Package",
   "label": "card",
   "parent": "payments-package"
  },
  {
   "id": "customer",
   "type": "uml.Class",
   "label": "Customer",
   "parent": "sales",
   "members": [
    {
     "id": "customer.email",
     "type": "uml.Property",
     "label": "email",
     "props": {
      "visibility": "private",
      "valueType": "String"
     }
    },
    {
     "id": "customer.name",
     "type": "uml.Property",
     "label": "name",
     "props": {
      "visibility": "private",
      "valueType": "String",
      "multiplicity": "0..1"
     }
    }
   ]
  },
  {
   "id": "order",
   "type": "uml.Class",
   "label": "Order",
   "parent": "sales",
   "props": {
    "stereotypes": [
     "entity"
    ],
    "tags": {
     "entity": {
      "table": "orders"
     },
     "owned": {
      "team": "checkout"
     }
    }
   },
   "members": [
    {
     "id": "order.id",
     "type": "uml.Property",
     "label": "id",
     "props": {
      "visibility": "private",
      "valueType": "UUID"
     }
    },
    {
     "id": "order.placedAt",
     "type": "uml.Property",
     "label": "placedAt",
     "props": {
      "visibility": "private",
      "valueType": "Instant",
      "multiplicity": "0..1",
      "stereotypes": [
       "column"
      ],
      "tags": {
       "column": {
        "name": "placed_at",
        "indexed": "true"
       }
      }
     }
    },
    {
     "id": "order.status",
     "type": "uml.Property",
     "label": "status",
     "props": {
      "visibility": "private",
      "valueType": "OrderStatus",
      "default": "draft"
     }
    },
    {
     "id": "order.total",
     "type": "uml.Property",
     "label": "total",
     "props": {
      "visibility": "public",
      "valueType": "Money",
      "isDerived": true
     }
    },
    {
     "id": "order.count",
     "type": "uml.Property",
     "label": "count",
     "props": {
      "visibility": "public",
      "valueType": "Integer",
      "isStatic": true
     }
    },
    {
     "id": "order.place",
     "type": "uml.Operation",
     "label": "place",
     "props": {
      "visibility": "public",
      "returnType": "Receipt"
     }
    },
    {
     "id": "order.add",
     "type": "uml.Operation",
     "label": "add",
     "props": {
      "visibility": "public",
      "parameters": [
       {
        "name": "book",
        "valueType": "Book"
       },
       {
        "name": "quantity",
        "valueType": "Integer"
       }
      ]
     }
    },
    {
     "id": "order.cancel",
     "type": "uml.Operation",
     "label": "cancel",
     "props": {
      "visibility": "public"
     }
    }
   ],
   "opensView": "order-life"
  },
  {
   "id": "line",
   "type": "uml.Class",
   "label": "OrderLine",
   "parent": "sales",
   "members": [
    {
     "id": "line.quantity",
     "type": "uml.Property",
     "label": "quantity",
     "props": {
      "visibility": "private",
      "valueType": "Integer",
      "default": "1"
     }
    },
    {
     "id": "line.unitPrice",
     "type": "uml.Property",
     "label": "unitPrice",
     "props": {
      "visibility": "private",
      "valueType": "Money"
     }
    }
   ]
  },
  {
   "id": "book",
   "type": "uml.Class",
   "label": "Book",
   "parent": "catalog",
   "members": [
    {
     "id": "book.isbn",
     "type": "uml.Property",
     "label": "isbn",
     "props": {
      "visibility": "public",
      "valueType": "String"
     }
    },
    {
     "id": "book.title",
     "type": "uml.Property",
     "label": "title",
     "props": {
      "visibility": "public",
      "valueType": "String"
     }
    },
    {
     "id": "book.price",
     "type": "uml.Property",
     "label": "price",
     "props": {
      "visibility": "public",
      "valueType": "Money"
     }
    }
   ]
  },
  {
   "id": "payable",
   "type": "uml.Interface",
   "label": "Payable",
   "parent": "payments-package",
   "members": [
    {
     "id": "payable.amountDue",
     "type": "uml.Operation",
     "label": "amountDue",
     "props": {
      "visibility": "public",
      "returnType": "Money"
     }
    }
   ]
  },
  {
   "id": "payment",
   "type": "uml.Class",
   "label": "Payment",
   "parent": "payments-package",
   "props": {
    "isAbstract": true
   },
   "members": [
    {
     "id": "payment.amount",
     "type": "uml.Property",
     "label": "amount",
     "props": {
      "visibility": "protected",
      "valueType": "Money"
     }
    },
    {
     "id": "payment.settle",
     "type": "uml.Operation",
     "label": "settle",
     "props": {
      "visibility": "public",
      "isAbstract": true
     }
    }
   ]
  },
  {
   "id": "card-payment",
   "type": "uml.Class",
   "label": "CardPayment",
   "parent": "card",
   "members": [
    {
     "id": "card-payment.last4",
     "type": "uml.Property",
     "label": "last4",
     "props": {
      "visibility": "private",
      "valueType": "String"
     }
    },
    {
     "id": "card-payment.settle",
     "type": "uml.Operation",
     "label": "settle",
     "props": {
      "visibility": "public"
     }
    }
   ]
  },
  {
   "id": "status",
   "type": "uml.Enumeration",
   "label": "OrderStatus",
   "parent": "sales",
   "members": [
    {
     "id": "status.draft",
     "type": "uml.EnumerationLiteral",
     "label": "draft"
    },
    {
     "id": "status.placed",
     "type": "uml.EnumerationLiteral",
     "label": "placed"
    },
    {
     "id": "status.shipped",
     "type": "uml.EnumerationLiteral",
     "label": "shipped"
    },
    {
     "id": "status.cancelled",
     "type": "uml.EnumerationLiteral",
     "label": "cancelled"
    }
   ]
  },
  {
   "id": "money",
   "type": "uml.DataType",
   "label": "Money",
   "parent": "shared",
   "members": [
    {
     "id": "money.amount",
     "type": "uml.Property",
     "label": "amount",
     "props": {
      "visibility": "public",
      "valueType": "Decimal"
     }
    },
    {
     "id": "money.currency",
     "type": "uml.Property",
     "label": "currency",
     "props": {
      "visibility": "public",
      "valueType": "String"
     }
    }
   ]
  },
  {
   "id": "note-total",
   "type": "uml.Comment",
   "label": "total is the sum of the lines' unit price times quantity"
  },
  {
   "id": "created",
   "type": "uml.Pseudostate",
   "props": {
    "kind": "initial"
   }
  },
  {
   "id": "placed",
   "type": "uml.State",
   "label": "Placed",
   "props": {
    "entry": "reserve the books",
    "do": "poll the payment provider",
    "exit": "log the payment result"
   },
   "members": [
    {
     "id": "placed.address",
     "type": "uml.InternalTransition",
     "props": {
      "trigger": "address changed",
      "effect": "update the delivery address"
     }
    }
   ],
   "opensView": "snapshot"
  },
  {
   "id": "payment-outcome",
   "type": "uml.Pseudostate",
   "props": {
    "kind": "choice"
   }
  },
  {
   "id": "prepaid",
   "type": "uml.Pseudostate",
   "props": {
    "kind": "fork"
   }
  },
  {
   "id": "fulfilling",
   "type": "uml.State",
   "label": "Fulfilling",
   "members": [
    {
     "id": "fulfilling.parcel",
     "type": "uml.Region",
     "label": "Parcel"
    },
    {
     "id": "fulfilling.payment",
     "type": "uml.Region",
     "label": "Payment"
    }
   ]
  },
  {
   "id": "parcel-start",
   "type": "uml.Pseudostate",
   "parent": "fulfilling.parcel",
   "props": {
    "kind": "initial"
   }
  },
  {
   "id": "picking",
   "type": "uml.State",
   "label": "Picking",
   "parent": "fulfilling.parcel",
   "props": {
    "do": "collect the books from the shelves"
   }
  },
  {
   "id": "packed",
   "type": "uml.State",
   "label": "Packed",
   "parent": "fulfilling.parcel",
   "props": {
    "entry": "print the address label"
   }
  },
  {
   "id": "payment-start",
   "type": "uml.Pseudostate",
   "parent": "fulfilling.payment",
   "props": {
    "kind": "initial"
   }
  },
  {
   "id": "capturing",
   "type": "uml.State",
   "label": "Capturing payment",
   "parent": "fulfilling.payment",
   "props": {
    "entry": "ask the payment provider to capture"
   }
  },
  {
   "id": "captured",
   "type": "uml.State",
   "label": "Payment captured",
   "parent": "fulfilling.payment"
  },
  {
   "id": "ready",
   "type": "uml.Pseudostate",
   "props": {
    "kind": "join"
   }
  },
  {
   "id": "delivery",
   "type": "uml.State",
   "label": "In delivery"
  },
  {
   "id": "delivery-start",
   "type": "uml.Pseudostate",
   "parent": "delivery",
   "props": {
    "kind": "initial"
   }
  },
  {
   "id": "in-transit",
   "type": "uml.State",
   "label": "In transit",
   "parent": "delivery",
   "props": {
    "do": "follow the carrier's tracking"
   }
  },
  {
   "id": "out-for-delivery",
   "type": "uml.State",
   "label": "Out for delivery",
   "parent": "delivery",
   "props": {
    "entry": "text the shopper a delivery window"
   }
  },
  {
   "id": "delivery-history",
   "type": "uml.Pseudostate",
   "parent": "delivery",
   "props": {
    "kind": "shallowHistory"
   }
  },
  {
   "id": "enquiry",
   "type": "uml.State",
   "label": "Under enquiry",
   "props": {
    "entry": "open a case with the carrier",
    "exit": "close the case"
   }
  },
  {
   "id": "cancelled",
   "type": "uml.State",
   "label": "Cancelled",
   "props": {
    "entry": "release the reserved books"
   }
  },
  {
   "id": "erased",
   "type": "uml.Pseudostate",
   "props": {
    "kind": "terminate"
   }
  },
  {
   "id": "delivered",
   "type": "uml.FinalState"
  },
  {
   "id": "ada",
   "type": "uml.InstanceSpecification",
   "label": "ada",
   "props": {
    "classifier": "Customer"
   },
   "members": [
    {
     "id": "ada.email",
     "type": "uml.Slot",
     "label": "email",
     "props": {
      "value": "ada@example.org"
     }
    }
   ]
  },
  {
   "id": "order-1042",
   "type": "uml.InstanceSpecification",
   "label": "order1042",
   "props": {
    "classifier": "Order"
   },
   "members": [
    {
     "id": "order-1042.status",
     "type": "uml.Slot",
     "label": "status",
     "props": {
      "value": "placed"
     }
    },
    {
     "id": "order-1042.total",
     "type": "uml.Slot",
     "label": "total",
     "props": {
      "value": "34.00 EUR"
     }
    }
   ]
  },
  {
   "id": "line-1",
   "type": "uml.InstanceSpecification",
   "label": "line1",
   "props": {
    "classifier": "OrderLine"
   },
   "members": [
    {
     "id": "line-1.quantity",
     "type": "uml.Slot",
     "label": "quantity",
     "props": {
      "value": "2"
     }
    }
   ]
  },
  {
   "id": "line-2",
   "type": "uml.InstanceSpecification",
   "label": "line2",
   "props": {
    "classifier": "OrderLine"
   },
   "members": [
    {
     "id": "line-2.quantity",
     "type": "uml.Slot",
     "label": "quantity",
     "props": {
      "value": "1"
     }
    }
   ]
  },
  {
   "id": "middlemarch",
   "type": "uml.InstanceSpecification",
   "label": "middlemarch",
   "props": {
    "classifier": "Book"
   },
   "members": [
    {
     "id": "middlemarch.title",
     "type": "uml.Slot",
     "label": "title",
     "props": {
      "value": "Middlemarch"
     }
    },
    {
     "id": "middlemarch.price",
     "type": "uml.Slot",
     "label": "price",
     "props": {
      "value": "12.50 EUR"
     }
    }
   ]
  },
  {
   "id": "frankenstein",
   "type": "uml.InstanceSpecification",
   "label": "frankenstein",
   "props": {
    "classifier": "Book"
   },
   "members": [
    {
     "id": "frankenstein.title",
     "type": "uml.Slot",
     "label": "title",
     "props": {
      "value": "Frankenstein"
     }
    },
    {
     "id": "frankenstein.price",
     "type": "uml.Slot",
     "label": "price",
     "props": {
      "value": "9.00 EUR"
     }
    }
   ]
  },
  {
   "id": "card-1",
   "type": "uml.InstanceSpecification",
   "label": "card",
   "props": {
    "classifier": "CardPayment"
   },
   "members": [
    {
     "id": "card.amount",
     "type": "uml.Slot",
     "label": "amount",
     "props": {
      "value": "34.00 EUR"
     }
    },
    {
     "id": "card.last4",
     "type": "uml.Slot",
     "label": "last4",
     "props": {
      "value": "4242"
     }
    }
   ]
  },
  {
   "id": "wholesale",
   "type": "uml.Package",
   "label": "wholesale"
  },
  {
   "id": "wholesale-order",
   "type": "uml.Class",
   "label": "Order",
   "parent": "wholesale"
  },
  {
   "id": "conventions",
   "type": "uml.Profile",
   "label": "BookshopConventions",
   "opensView": "profile"
  },
  {
   "id": "mc-class",
   "type": "uml.MetaclassReference",
   "label": "Class",
   "parent": "conventions"
  },
  {
   "id": "mc-property",
   "type": "uml.MetaclassReference",
   "label": "Property",
   "parent": "conventions"
  },
  {
   "id": "entity",
   "type": "uml.Stereotype",
   "label": "entity",
   "parent": "conventions",
   "members": [
    {
     "id": "entity.table",
     "type": "uml.Property",
     "label": "table",
     "props": {
      "valueType": "String"
     }
    }
   ]
  },
  {
   "id": "aggregate-root",
   "type": "uml.Stereotype",
   "label": "aggregateRoot",
   "parent": "conventions",
   "members": [
    {
     "id": "aggregate-root.boundedContext",
     "type": "uml.Property",
     "label": "boundedContext",
     "props": {
      "valueType": "String"
     }
    }
   ]
  },
  {
   "id": "owned",
   "type": "uml.Stereotype",
   "label": "owned",
   "parent": "conventions",
   "members": [
    {
     "id": "owned.team",
     "type": "uml.Property",
     "label": "team",
     "props": {
      "valueType": "String",
      "multiplicity": "0..1"
     }
    }
   ]
  },
  {
   "id": "column",
   "type": "uml.Stereotype",
   "label": "column",
   "parent": "conventions",
   "members": [
    {
     "id": "column.name",
     "type": "uml.Property",
     "label": "name",
     "props": {
      "valueType": "String",
      "multiplicity": "0..1"
     }
    },
    {
     "id": "column.indexed",
     "type": "uml.Property",
     "label": "indexed",
     "props": {
      "valueType": "Boolean",
      "default": "false"
     }
    }
   ]
  },
  {
   "id": "order-service",
   "type": "uml.Class",
   "label": "OrderService",
   "members": [
    {
     "id": "order-service.api",
     "type": "uml.Port",
     "label": "api"
    },
    {
     "id": "order-service.payments",
     "type": "uml.Port",
     "label": "payments"
    },
    {
     "id": "order-service.checkout",
     "type": "uml.Property",
     "label": "checkout",
     "props": {
      "valueType": "CheckoutFlow",
      "multiplicity": "1",
      "aggregation": "composite"
     }
    },
    {
     "id": "order-service.pricing",
     "type": "uml.Property",
     "label": "pricing",
     "props": {
      "valueType": "PriceCalculator",
      "multiplicity": "1",
      "aggregation": "composite"
     }
    },
    {
     "id": "order-service.orders",
     "type": "uml.Property",
     "label": "orders",
     "props": {
      "valueType": "OrderRepository",
      "multiplicity": "1",
      "aggregation": "composite"
     }
    },
    {
     "id": "order-service.listeners",
     "type": "uml.Property",
     "label": "listeners",
     "props": {
      "valueType": "OrderListener",
      "multiplicity": "0..*",
      "aggregation": "shared"
     }
    }
   ]
  },
  {
   "id": "checkout-class",
   "type": "uml.Class",
   "label": "CheckoutFlow",
   "members": [
    {
     "id": "checkout-class.requests",
     "type": "uml.Port",
     "label": "requests"
    },
    {
     "id": "checkout-class.quotes",
     "type": "uml.Port",
     "label": "quotes"
    },
    {
     "id": "checkout-class.charges",
     "type": "uml.Port",
     "label": "charges"
    }
   ]
  },
  {
   "id": "price-calculator",
   "type": "uml.Class",
   "label": "PriceCalculator",
   "members": [
    {
     "id": "price-calculator.quotes",
     "type": "uml.Port",
     "label": "quotes"
    }
   ]
  },
  {
   "id": "order-events",
   "type": "uml.CollaborationUse",
   "label": "orderEvents",
   "parent": "order-service",
   "props": {
    "collaboration": "PublishSubscribe"
   }
  },
  {
   "id": "publish-subscribe",
   "type": "uml.Collaboration",
   "label": "PublishSubscribe",
   "members": [
    {
     "id": "publish-subscribe.publisher",
     "type": "uml.Property",
     "label": "publisher",
     "props": {
      "valueType": "EventSource",
      "multiplicity": "1"
     }
    },
    {
     "id": "publish-subscribe.subscriber",
     "type": "uml.Property",
     "label": "subscriber",
     "props": {
      "valueType": "EventListener",
      "multiplicity": "0..*"
     }
    }
   ]
  },
  {
   "id": "warehouse",
   "type": "uml.Component",
   "label": "Warehouse"
  },
  {
   "id": "email-service",
   "type": "uml.Component",
   "label": "Email service"
  },
  {
   "id": "order-info",
   "type": "uml.InformationItem",
   "label": "Order"
  },
  {
   "id": "card-details",
   "type": "uml.InformationItem",
   "label": "Card details"
  },
  {
   "id": "receipt-info",
   "type": "uml.InformationItem",
   "label": "Receipt"
  },
  {
   "id": "stock-info",
   "type": "uml.InformationItem",
   "label": "Stock level"
  },
  {
   "id": "er-customer",
   "type": "er.Entity",
   "label": "customer",
   "members": [
    {
     "id": "er-customer.id",
     "type": "er.Column",
     "label": "id",
     "props": {
      "dataType": "bigint",
      "primaryKey": true
     }
    },
    {
     "id": "er-customer.email",
     "type": "er.Column",
     "label": "email",
     "props": {
      "dataType": "varchar(255)",
      "unique": true
     }
    },
    {
     "id": "er-customer.referred_by",
     "type": "er.Column",
     "label": "referred_by",
     "props": {
      "dataType": "bigint",
      "foreignKey": true,
      "nullable": true,
      "references": "er-customer.id"
     }
    }
   ]
  },
  {
   "id": "er-order",
   "type": "er.Entity",
   "label": "order",
   "members": [
    {
     "id": "er-order.id",
     "type": "er.Column",
     "label": "id",
     "props": {
      "dataType": "bigint",
      "primaryKey": true
     }
    },
    {
     "id": "er-order.customer_id",
     "type": "er.Column",
     "label": "customer_id",
     "props": {
      "dataType": "bigint",
      "foreignKey": true,
      "references": "er-customer.id"
     }
    },
    {
     "id": "er-order.placed_at",
     "type": "er.Column",
     "label": "placed_at",
     "props": {
      "dataType": "timestamptz",
      "nullable": true
     }
    }
   ]
  },
  {
   "id": "er-order_line",
   "type": "er.Entity",
   "label": "order_line",
   "members": [
    {
     "id": "er-order_line.order_id",
     "type": "er.Column",
     "label": "order_id",
     "props": {
      "dataType": "bigint",
      "primaryKey": true,
      "foreignKey": true,
      "references": "er-order.id"
     }
    },
    {
     "id": "er-order_line.line_no",
     "type": "er.Column",
     "label": "line_no",
     "props": {
      "dataType": "integer",
      "primaryKey": true
     }
    },
    {
     "id": "er-order_line.book_id",
     "type": "er.Column",
     "label": "book_id",
     "props": {
      "dataType": "bigint",
      "foreignKey": true,
      "references": "er-book.id"
     }
    },
    {
     "id": "er-order_line.quantity",
     "type": "er.Column",
     "label": "quantity",
     "props": {
      "dataType": "integer"
     }
    }
   ]
  },
  {
   "id": "er-book",
   "type": "er.Entity",
   "label": "book",
   "members": [
    {
     "id": "er-book.id",
     "type": "er.Column",
     "label": "id",
     "props": {
      "dataType": "bigint",
      "primaryKey": true
     }
    },
    {
     "id": "er-book.isbn",
     "type": "er.Column",
     "label": "isbn",
     "props": {
      "dataType": "char(13)",
      "unique": true
     }
    },
    {
     "id": "er-book.title",
     "type": "er.Column",
     "label": "title",
     "props": {
      "dataType": "varchar(255)"
     }
    }
   ]
  },
  {
   "id": "er-author",
   "type": "er.Entity",
   "label": "author",
   "members": [
    {
     "id": "er-author.id",
     "type": "er.Column",
     "label": "id",
     "props": {
      "dataType": "bigint",
      "primaryKey": true
     }
    },
    {
     "id": "er-author.name",
     "type": "er.Column",
     "label": "name",
     "props": {
      "dataType": "varchar(120)"
     }
    }
   ]
  },
  {
   "id": "er-book_author",
   "type": "er.Entity",
   "label": "book_author",
   "members": [
    {
     "id": "er-book_author.book_id",
     "type": "er.Column",
     "label": "book_id",
     "props": {
      "dataType": "bigint",
      "primaryKey": true,
      "foreignKey": true,
      "references": "er-book.id"
     }
    },
    {
     "id": "er-book_author.author_id",
     "type": "er.Column",
     "label": "author_id",
     "props": {
      "dataType": "bigint",
      "primaryKey": true,
      "foreignKey": true,
      "references": "er-author.id"
     }
    }
   ]
  },
  {
   "id": "er-payment",
   "type": "er.Entity",
   "label": "payment",
   "members": [
    {
     "id": "er-payment.id",
     "type": "er.Column",
     "label": "id",
     "props": {
      "dataType": "bigint",
      "primaryKey": true
     }
    },
    {
     "id": "er-payment.order_id",
     "type": "er.Column",
     "label": "order_id",
     "props": {
      "dataType": "bigint",
      "foreignKey": true,
      "unique": true,
      "references": "er-order.id"
     }
    },
    {
     "id": "er-payment.amount",
     "type": "er.Column",
     "label": "amount",
     "props": {
      "dataType": "numeric(10,2)"
     }
    }
   ]
  },
  {
   "id": "dfd-customer",
   "type": "dfd.ExternalEntity",
   "label": "Shopper"
  },
  {
   "id": "dfd-provider",
   "type": "dfd.ExternalEntity",
   "label": "Payment provider"
  },
  {
   "id": "dfd-courier",
   "type": "dfd.ExternalEntity",
   "label": "Courier"
  },
  {
   "id": "dfd-take-order",
   "type": "dfd.Process",
   "label": "Take order",
   "opensView": "dfd-level-2-take-order",
   "props": {
    "number": "1"
   }
  },
  {
   "id": "dfd-take-payment",
   "type": "dfd.Process",
   "label": "Take payment",
   "props": {
    "number": "2"
   }
  },
  {
   "id": "dfd-ship-order",
   "type": "dfd.Process",
   "label": "Ship order",
   "props": {
    "number": "3"
   }
  },
  {
   "id": "dfd-books",
   "type": "dfd.DataStore",
   "label": "Books",
   "props": {
    "number": "D1"
   }
  },
  {
   "id": "dfd-orders",
   "type": "dfd.DataStore",
   "label": "Orders",
   "props": {
    "number": "D2"
   }
  },
  {
   "id": "dfd-check-basket",
   "type": "dfd.Process",
   "label": "Check the basket",
   "props": {
    "number": "1.1"
   }
  },
  {
   "id": "dfd-total-order",
   "type": "dfd.Process",
   "label": "Total the order",
   "props": {
    "number": "1.2"
   }
  },
  {
   "id": "dfd-record-order",
   "type": "dfd.Process",
   "label": "Record the order",
   "props": {
    "number": "1.3"
   }
  },
  {
   "id": "lane-worker",
   "type": "uml.ActivityPartition",
   "label": "Order worker"
  },
  {
   "id": "lane-warehouse",
   "type": "uml.ActivityPartition",
   "label": "Warehouse"
  },
  {
   "id": "lane-email",
   "type": "uml.ActivityPartition",
   "label": "Email service"
  },
  {
   "id": "start",
   "type": "uml.InitialNode",
   "parent": "lane-worker"
  },
  {
   "id": "take-order",
   "type": "uml.Action",
   "label": "Take the next order from the queue",
   "parent": "lane-worker"
  },
  {
   "id": "order-object",
   "type": "uml.ObjectNode",
   "label": "Order",
   "parent": "lane-worker"
  },
  {
   "id": "check-stock",
   "type": "uml.Action",
   "label": "Check the stock of each book",
   "parent": "lane-warehouse"
  },
  {
   "id": "stock",
   "type": "uml.DataStoreNode",
   "label": "Stock levels",
   "parent": "lane-warehouse"
  },
  {
   "id": "in-stock",
   "type": "uml.DecisionNode",
   "label": "All books in stock?",
   "parent": "lane-warehouse"
  },
  {
   "id": "ask-restock",
   "type": "uml.SendSignalAction",
   "label": "Restock request",
   "parent": "lane-warehouse"
  },
  {
   "id": "books-arrive",
   "type": "uml.AcceptEventAction",
   "label": "Books delivered",
   "parent": "lane-warehouse"
  },
  {
   "id": "stock-ready",
   "type": "uml.MergeNode",
   "parent": "lane-warehouse"
  },
  {
   "id": "split",
   "type": "uml.ForkNode",
   "parent": "lane-worker"
  },
  {
   "id": "call-payment",
   "type": "uml.CallBehaviorAction",
   "label": "Take payment",
   "parent": "lane-worker",
   "opensView": "take-payment"
  },
  {
   "id": "pick",
   "type": "uml.Action",
   "label": "Pick and pack the books",
   "parent": "lane-warehouse"
  },
  {
   "id": "tell-shopper",
   "type": "uml.Action",
   "label": "Email \"your order is being packed\"",
   "parent": "lane-email"
  },
  {
   "id": "told",
   "type": "uml.FlowFinalNode",
   "parent": "lane-email"
  },
  {
   "id": "packed-and-paid",
   "type": "uml.JoinNode",
   "parent": "lane-warehouse"
  },
  {
   "id": "ship",
   "type": "uml.Action",
   "label": "Hand the parcel to the carrier",
   "parent": "lane-warehouse"
  },
  {
   "id": "done",
   "type": "uml.ActivityFinalNode",
   "parent": "lane-warehouse"
  },
  {
   "id": "pay-start",
   "type": "uml.InitialNode"
  },
  {
   "id": "charge",
   "type": "uml.Action",
   "label": "Charge the shopper's card",
   "opensView": "one-charge"
  },
  {
   "id": "record",
   "type": "uml.Action",
   "label": "Record the payment on the order"
  },
  {
   "id": "pay-done",
   "type": "uml.ActivityFinalNode"
  },
  {
   "id": "bp-shopper",
   "type": "bpmn.Participant",
   "label": "Shopper"
  },
  {
   "id": "basket-ready",
   "type": "bpmn.StartEvent",
   "label": "Basket is ready",
   "parent": "bp-shopper",
   "props": {
    "definition": "none"
   }
  },
  {
   "id": "place-order",
   "type": "bpmn.Task",
   "label": "Place order",
   "parent": "bp-shopper",
   "props": {
    "taskType": "user"
   }
  },
  {
   "id": "order-placed",
   "type": "bpmn.EndEvent",
   "label": "Order placed",
   "parent": "bp-shopper",
   "props": {
    "definition": "none"
   }
  },
  {
   "id": "bp-bookshop",
   "type": "bpmn.Participant",
   "label": "Bookshop",
   "members": [
    {
     "id": "bp-sales",
     "type": "bpmn.Lane",
     "label": "Sales"
    },
    {
     "id": "bp-warehouse",
     "type": "bpmn.Lane",
     "label": "Warehouse"
    }
   ]
  },
  {
   "id": "order-received",
   "type": "bpmn.StartEvent",
   "label": "Order received",
   "parent": "bp-sales",
   "props": {
    "definition": "message"
   }
  },
  {
   "id": "bp-take-payment",
   "type": "bpmn.Task",
   "label": "Take payment",
   "parent": "bp-sales",
   "props": {
    "taskType": "service"
   }
  },
  {
   "id": "payment-timeout",
   "type": "bpmn.BoundaryEvent",
   "label": "No answer in 2 minutes",
   "parent": "bp-sales",
   "props": {
    "attachedTo": "bp-take-payment",
    "cancelActivity": true,
    "definition": "timer"
   }
  },
  {
   "id": "paid",
   "type": "bpmn.ExclusiveGateway",
   "label": "Paid?",
   "parent": "bp-sales"
  },
  {
   "id": "not-paid",
   "type": "bpmn.ExclusiveGateway",
   "parent": "bp-sales"
  },
  {
   "id": "cancel-order",
   "type": "bpmn.Task",
   "label": "Cancel order",
   "parent": "bp-sales",
   "props": {
    "taskType": "service",
    "documentation": "Nothing to refund: no payment was taken."
   }
  },
  {
   "id": "order-cancelled",
   "type": "bpmn.EndEvent",
   "label": "Order cancelled",
   "parent": "bp-sales",
   "props": {
    "definition": "terminate"
   }
  },
  {
   "id": "fork",
   "type": "bpmn.ParallelGateway",
   "parent": "bp-sales"
  },
  {
   "id": "send-invoice",
   "type": "bpmn.Task",
   "label": "Email invoice",
   "parent": "bp-sales",
   "props": {
    "taskType": "service",
    "documentation": "Sent to the address the order gives."
   }
  },
  {
   "id": "pick-pack",
   "type": "bpmn.SubProcess",
   "label": "Pick and pack",
   "parent": "bp-warehouse",
   "opensView": "pick-and-pack"
  },
  {
   "id": "bp-join",
   "type": "bpmn.ParallelGateway",
   "parent": "bp-warehouse"
  },
  {
   "id": "courier-pickup",
   "type": "bpmn.IntermediateCatchEvent",
   "label": "Courier's pickup at 16:00",
   "parent": "bp-warehouse",
   "props": {
    "definition": "timer",
    "categoryValueRef": [
     "dispatch"
    ]
   }
  },
  {
   "id": "bp-ship",
   "type": "bpmn.CallActivity",
   "label": "Hand parcel to courier",
   "parent": "bp-warehouse",
   "props": {
    "calledElement": "Ship parcel",
    "categoryValueRef": [
     "dispatch"
    ]
   }
  },
  {
   "id": "shipping-notice",
   "type": "bpmn.IntermediateThrowEvent",
   "label": "Shipping notice sent",
   "parent": "bp-sales",
   "props": {
    "definition": "message",
    "categoryValueRef": [
     "dispatch"
    ]
   }
  },
  {
   "id": "order-shipped",
   "type": "bpmn.EndEvent",
   "label": "Order shipped",
   "parent": "bp-sales",
   "props": {
    "definition": "none"
   }
  },
  {
   "id": "bp-payment-provider",
   "type": "bpmn.Participant",
   "label": "Payment provider"
  },
  {
   "id": "bp-order",
   "type": "bpmn.DataObject",
   "label": "Order",
   "parent": "bp-bookshop"
  },
  {
   "id": "bp-stock",
   "type": "bpmn.DataStoreReference",
   "label": "Stock database",
   "parent": "bp-bookshop"
  },
  {
   "id": "note-card",
   "type": "bpmn.TextAnnotation",
   "label": "Card details go straight to the provider; the shop never sees them"
  },
  {
   "id": "dispatch",
   "type": "bpmn.Group",
   "label": "Dispatch"
  },
  {
   "id": "picking-starts",
   "type": "bpmn.StartEvent",
   "label": "Picking starts",
   "parent": "pick-pack",
   "props": {
    "definition": "none"
   }
  },
  {
   "id": "pick-books",
   "type": "bpmn.Task",
   "label": "Pick books from the shelves",
   "parent": "pick-pack",
   "props": {
    "taskType": "user"
   }
  },
  {
   "id": "pack-parcel",
   "type": "bpmn.Task",
   "label": "Pack and label parcel",
   "parent": "pick-pack",
   "props": {
    "taskType": "none"
   }
  },
  {
   "id": "parcel-packed",
   "type": "bpmn.EndEvent",
   "label": "Parcel packed",
   "parent": "pick-pack",
   "props": {
    "definition": "none"
   }
  },
  {
   "id": "return-arrives",
   "type": "flow.Terminator",
   "label": "Returned parcel arrives"
  },
  {
   "id": "slip",
   "type": "flow.InputOutput",
   "label": "Read the returns slip"
  },
  {
   "id": "key-in",
   "type": "flow.ManualInput",
   "label": "Key in the order number"
  },
  {
   "id": "inspect",
   "type": "flow.Process",
   "label": "Inspect the book"
  },
  {
   "id": "resaleable",
   "type": "flow.Decision",
   "label": "Fit for resale?"
  },
  {
   "id": "refund",
   "type": "flow.PredefinedProcess",
   "label": "Refund the payment"
  },
  {
   "id": "wait",
   "type": "flow.Delay",
   "label": "Wait for the bank to confirm"
  },
  {
   "id": "restock",
   "type": "flow.Process",
   "label": "Put the book back on the shelf"
  },
  {
   "id": "stock-records",
   "type": "flow.Database",
   "label": "Stock records"
  },
  {
   "id": "letter",
   "type": "flow.Document",
   "label": "Rejection letter"
  },
  {
   "id": "post-back",
   "type": "flow.Process",
   "label": "Post the book back"
  },
  {
   "id": "join",
   "type": "flow.Connector",
   "label": "A"
  },
  {
   "id": "end",
   "type": "flow.Terminator",
   "label": "Return closed"
  },
  {
   "id": "shopper-device",
   "type": "uml.Device",
   "label": "User's device"
  },
  {
   "id": "browser",
   "type": "uml.ExecutionEnvironment",
   "label": "Web browser",
   "parent": "shopper-device"
  },
  {
   "id": "storefront-bundle",
   "type": "uml.Artifact",
   "label": "storefront.js",
   "parent": "browser"
  },
  {
   "id": "edge-node",
   "type": "uml.Node",
   "label": "Edge proxy"
  },
  {
   "id": "edge-routes",
   "type": "uml.Artifact",
   "label": "routes.conf"
  },
  {
   "id": "order-worker-jar",
   "type": "uml.Artifact",
   "label": "order-worker image",
   "parent": "jvm"
  },
  {
   "id": "shop-api-config",
   "type": "uml.DeploymentSpecification",
   "label": "compose.yaml",
   "parent": "jvm"
  },
  {
   "id": "database",
   "type": "uml.Node",
   "label": "Database"
  },
  {
   "id": "queue-node",
   "type": "uml.Node",
   "label": "Order queue"
  },
  {
   "id": "mm-opening",
   "type": "mindmap.Topic",
   "label": "Opening the bookshop"
  },
  {
   "id": "mm-catalogue",
   "type": "mindmap.Topic",
   "label": "Catalogue",
   "parent": "mm-opening"
  },
  {
   "id": "mm-first-titles",
   "type": "mindmap.Topic",
   "label": "Choose the first 500 titles",
   "parent": "mm-catalogue"
  },
  {
   "id": "mm-wholesalers",
   "type": "mindmap.Topic",
   "label": "Agree terms with two wholesalers",
   "parent": "mm-catalogue"
  },
  {
   "id": "mm-website",
   "type": "mindmap.Topic",
   "label": "Website",
   "parent": "mm-opening"
  },
  {
   "id": "mm-storefront",
   "type": "mindmap.Topic",
   "label": "Storefront",
   "parent": "mm-website"
  },
  {
   "id": "mm-checkout",
   "type": "mindmap.Topic",
   "label": "Checkout",
   "parent": "mm-website"
  },
  {
   "id": "mm-card-payments",
   "type": "mindmap.Topic",
   "label": "Card payments",
   "parent": "mm-checkout"
  },
  {
   "id": "mm-order-emails",
   "type": "mindmap.Topic",
   "label": "Order confirmation emails",
   "parent": "mm-checkout"
  },
  {
   "id": "mm-launch",
   "type": "mindmap.Topic",
   "label": "Launch",
   "parent": "mm-opening"
  },
  {
   "id": "mm-newsletter",
   "type": "mindmap.Topic",
   "label": "Newsletter to the waiting list",
   "parent": "mm-launch"
  },
  {
   "id": "mm-opening-offer",
   "type": "mindmap.Topic",
   "label": "Free delivery in the first week",
   "parent": "mm-launch"
  },
  {
   "id": "mm-warehouse",
   "type": "mindmap.Topic",
   "label": "Warehouse",
   "parent": "mm-opening"
  },
  {
   "id": "mm-shelving",
   "type": "mindmap.Topic",
   "label": "Shelving and a packing table",
   "parent": "mm-warehouse"
  },
  {
   "id": "mm-courier",
   "type": "mindmap.Topic",
   "label": "Courier contract",
   "parent": "mm-warehouse"
  },
  {
   "id": "mm-legal",
   "type": "mindmap.Topic",
   "label": "Legal and money",
   "parent": "mm-opening"
  },
  {
   "id": "mm-company",
   "type": "mindmap.Topic",
   "label": "Register the company",
   "parent": "mm-legal"
  },
  {
   "id": "mm-bank",
   "type": "mindmap.Topic",
   "label": "Business bank account",
   "parent": "mm-legal"
  },
  {
   "id": "mm-hosting",
   "type": "mindmap.Topic",
   "label": "Hosting",
   "parent": "mm-opening"
  },
  {
   "id": "mm-on-gcp",
   "type": "mindmap.Topic",
   "label": "On Google Cloud",
   "parent": "mm-hosting",
   "opensView": "gcp-on-gcp"
  },
  {
   "id": "mm-on-azure",
   "type": "mindmap.Topic",
   "label": "On Azure",
   "parent": "mm-hosting",
   "opensView": "az-on-azure"
  },
  {
   "id": "mm-on-aws",
   "type": "mindmap.Topic",
   "label": "On AWS",
   "parent": "mm-hosting",
   "opensView": "aws-on-aws"
  },
  {
   "id": "gcp-users",
   "type": "gcp.User",
   "label": "Shoppers"
  },
  {
   "id": "gcp-project",
   "type": "gcp.Zone",
   "label": "bookshop-prod",
   "props": {
    "zoneType": "project"
   }
  },
  {
   "id": "gcp-dns",
   "type": "gcp.Product",
   "label": "DNS",
   "parent": "gcp-project",
   "props": {
    "icon": "Cloud-DNS"
   }
  },
  {
   "id": "gcp-lb",
   "type": "gcp.Product",
   "label": "Load balancer",
   "parent": "gcp-project",
   "props": {
    "icon": "Cloud-Load-Balancing"
   }
  },
  {
   "id": "gcp-cdn",
   "type": "gcp.Product",
   "label": "CDN",
   "parent": "gcp-project",
   "props": {
    "icon": "Cloud-CDN"
   }
  },
  {
   "id": "gcp-assets",
   "type": "gcp.Product",
   "label": "Storefront files",
   "parent": "gcp-project",
   "props": {
    "icon": "Cloud-Storage"
   }
  },
  {
   "id": "gcp-queue",
   "type": "gcp.Product",
   "label": "Order queue",
   "parent": "gcp-project",
   "props": {
    "icon": "Pub-Sub"
   }
  },
  {
   "id": "gcp-region",
   "type": "gcp.Zone",
   "label": "europe-west1",
   "parent": "gcp-project",
   "props": {
    "zoneType": "region"
   }
  },
  {
   "id": "gcp-api",
   "type": "gcp.Product",
   "label": "Shop API",
   "parent": "gcp-region",
   "props": {
    "icon": "Cloud-Run"
   }
  },
  {
   "id": "gcp-worker",
   "type": "gcp.Product",
   "label": "Order worker",
   "parent": "gcp-region",
   "props": {
    "icon": "Cloud-Run"
   }
  },
  {
   "id": "gcp-network",
   "type": "gcp.Zone",
   "label": "bookshop-vpc",
   "parent": "gcp-region",
   "props": {
    "zoneType": "network"
   }
  },
  {
   "id": "gcp-subnet",
   "type": "gcp.Zone",
   "label": "data subnet, 10.10.0.0/24",
   "parent": "gcp-network",
   "props": {
    "zoneType": "subnetwork"
   }
  },
  {
   "id": "gcp-zone-b",
   "type": "gcp.Zone",
   "label": "europe-west1-b",
   "parent": "gcp-subnet",
   "props": {
    "zoneType": "zone"
   }
  },
  {
   "id": "gcp-db",
   "type": "gcp.Product",
   "label": "Database, primary",
   "parent": "gcp-zone-b",
   "props": {
    "icon": "Cloud-SQL"
   }
  },
  {
   "id": "gcp-zone-c",
   "type": "gcp.Zone",
   "label": "europe-west1-c",
   "parent": "gcp-subnet",
   "props": {
    "zoneType": "zone"
   }
  },
  {
   "id": "gcp-db-standby",
   "type": "gcp.Product",
   "label": "Database, standby",
   "parent": "gcp-zone-c",
   "props": {
    "icon": "Cloud-SQL"
   }
  },
  {
   "id": "az-subscription",
   "type": "azure.Group",
   "label": "Bookshop production",
   "props": {
    "groupType": "subscription"
   }
  },
  {
   "id": "az-rg",
   "type": "azure.Group",
   "label": "rg-bookshop-prod",
   "parent": "az-subscription",
   "props": {
    "groupType": "resource-group"
   }
  },
  {
   "id": "az-front-door",
   "type": "azure.Service",
   "label": "CDN and routing",
   "parent": "az-rg",
   "props": {
    "icon": "Front-Door-and-CDN-Profiles"
   }
  },
  {
   "id": "az-monitor",
   "type": "azure.Service",
   "label": "Logs and alerts",
   "parent": "az-rg",
   "props": {
    "icon": "Monitor"
   }
  },
  {
   "id": "az-region",
   "type": "azure.Group",
   "label": "West Europe",
   "parent": "az-rg",
   "props": {
    "groupType": "region"
   }
  },
  {
   "id": "az-assets",
   "type": "azure.Service",
   "label": "Storefront files",
   "parent": "az-region",
   "props": {
    "icon": "Storage-Accounts"
   }
  },
  {
   "id": "az-queue",
   "type": "azure.Service",
   "label": "Order queue",
   "parent": "az-region",
   "props": {
    "icon": "Service-Bus"
   }
  },
  {
   "id": "az-vault",
   "type": "azure.Service",
   "label": "Secrets",
   "parent": "az-region",
   "props": {
    "icon": "Key-Vaults"
   }
  },
  {
   "id": "az-vnet",
   "type": "azure.Group",
   "label": "vnet-bookshop",
   "parent": "az-region",
   "props": {
    "groupType": "virtual-network"
   }
  },
  {
   "id": "az-snet-apps",
   "type": "azure.Group",
   "label": "snet-apps",
   "parent": "az-vnet",
   "props": {
    "groupType": "subnet"
   }
  },
  {
   "id": "az-api",
   "type": "azure.Service",
   "label": "Shop API",
   "parent": "az-snet-apps",
   "props": {
    "icon": "App-Services"
   }
  },
  {
   "id": "az-worker",
   "type": "azure.Service",
   "label": "Order worker",
   "parent": "az-snet-apps",
   "props": {
    "icon": "App-Services"
   }
  },
  {
   "id": "az-snet-data",
   "type": "azure.Group",
   "label": "snet-data",
   "parent": "az-vnet",
   "props": {
    "groupType": "subnet"
   }
  },
  {
   "id": "az-db",
   "type": "azure.Service",
   "label": "Database",
   "parent": "az-snet-data",
   "props": {
    "icon": "SQL-Database"
   }
  },
  {
   "id": "aws-users",
   "type": "aws.Resource",
   "label": "Shoppers",
   "props": {
    "icon": "Users"
   }
  },
  {
   "id": "aws-cloud",
   "type": "aws.Group",
   "label": "AWS Cloud",
   "props": {
    "groupType": "cloud"
   }
  },
  {
   "id": "aws-dns",
   "type": "aws.Service",
   "label": "DNS",
   "parent": "aws-cloud",
   "props": {
    "icon": "Amazon-Route-53"
   }
  },
  {
   "id": "aws-cdn",
   "type": "aws.Service",
   "label": "CDN",
   "parent": "aws-cloud",
   "props": {
    "icon": "Amazon-CloudFront"
   }
  },
  {
   "id": "aws-region",
   "type": "aws.Group",
   "label": "Europe (Ireland)",
   "parent": "aws-cloud",
   "props": {
    "groupType": "region"
   }
  },
  {
   "id": "aws-assets",
   "type": "aws.Service",
   "label": "Storefront files",
   "parent": "aws-region",
   "props": {
    "icon": "Amazon-Simple-Storage-Service"
   }
  },
  {
   "id": "aws-queue",
   "type": "aws.Service",
   "label": "Order queue",
   "parent": "aws-region",
   "props": {
    "icon": "Amazon-Simple-Queue-Service"
   }
  },
  {
   "id": "aws-email",
   "type": "aws.Service",
   "label": "Order emails",
   "parent": "aws-region",
   "props": {
    "icon": "Amazon-Simple-Email-Service"
   }
  },
  {
   "id": "aws-monitoring",
   "type": "aws.Service",
   "label": "Logs and alarms",
   "parent": "aws-region",
   "props": {
    "icon": "Amazon-CloudWatch"
   }
  },
  {
   "id": "aws-vpc",
   "type": "aws.Group",
   "label": "Bookshop VPC",
   "parent": "aws-region",
   "props": {
    "groupType": "vpc"
   }
  },
  {
   "id": "aws-alb",
   "type": "aws.Service",
   "label": "Load balancer",
   "parent": "aws-vpc",
   "props": {
    "icon": "Elastic-Load-Balancing"
   }
  },
  {
   "id": "aws-az-a",
   "type": "aws.Group",
   "label": "eu-west-1a",
   "parent": "aws-vpc",
   "props": {
    "groupType": "availability-zone"
   }
  },
  {
   "id": "aws-public-a",
   "type": "aws.Group",
   "label": "Public subnet",
   "parent": "aws-az-a",
   "props": {
    "groupType": "public-subnet"
   }
  },
  {
   "id": "aws-nat-a",
   "type": "aws.Resource",
   "label": "NAT gateway",
   "parent": "aws-public-a",
   "props": {
    "icon": "Amazon-VPC_NAT-Gateway"
   }
  },
  {
   "id": "aws-private-a",
   "type": "aws.Group",
   "label": "Private subnet",
   "parent": "aws-az-a",
   "props": {
    "groupType": "private-subnet"
   }
  },
  {
   "id": "aws-api-a",
   "type": "aws.Service",
   "label": "Shop API",
   "parent": "aws-private-a",
   "props": {
    "icon": "Amazon-Elastic-Container-Service"
   }
  },
  {
   "id": "aws-db-sg",
   "type": "aws.Group",
   "label": "Database security group",
   "parent": "aws-private-a",
   "props": {
    "groupType": "security-group"
   }
  },
  {
   "id": "aws-db",
   "type": "aws.Service",
   "label": "Database, primary",
   "parent": "aws-db-sg",
   "props": {
    "icon": "Amazon-RDS"
   }
  },
  {
   "id": "aws-az-b",
   "type": "aws.Group",
   "label": "eu-west-1b",
   "parent": "aws-vpc",
   "props": {
    "groupType": "availability-zone"
   }
  },
  {
   "id": "aws-public-b",
   "type": "aws.Group",
   "label": "Public subnet",
   "parent": "aws-az-b",
   "props": {
    "groupType": "public-subnet"
   }
  },
  {
   "id": "aws-nat-b",
   "type": "aws.Resource",
   "label": "NAT gateway",
   "parent": "aws-public-b",
   "props": {
    "icon": "Amazon-VPC_NAT-Gateway"
   }
  },
  {
   "id": "aws-private-b",
   "type": "aws.Group",
   "label": "Private subnet",
   "parent": "aws-az-b",
   "props": {
    "groupType": "private-subnet"
   }
  },
  {
   "id": "aws-api-b",
   "type": "aws.Service",
   "label": "Shop API",
   "parent": "aws-private-b",
   "props": {
    "icon": "Amazon-Elastic-Container-Service"
   }
  },
  {
   "id": "aws-worker",
   "type": "aws.Service",
   "label": "Order worker",
   "parent": "aws-private-b",
   "props": {
    "icon": "Amazon-Elastic-Container-Service"
   }
  },
  {
   "id": "aws-db-standby",
   "type": "aws.Service",
   "label": "Database, standby",
   "parent": "aws-private-b",
   "props": {
    "icon": "Amazon-RDS"
   }
  },
  {
   "id": "bs-shopper",
   "label": "Shopper",
   "kind": "person",
   "sublabel": "browses, buys, tracks",
   "what": "Someone who buys books from the shop. Opens the system context: who uses the Bookshop and what it uses.",
   "opensView": "c4-context",
   "icon": "users"
  },
  {
   "id": "bs-staff",
   "label": "Shop staff",
   "kind": "person",
   "sublabel": "packs parcels, takes returns",
   "what": "The people who run the shop. Opens how they handle a returned book (a flowchart).",
   "opensView": "returns",
   "icon": "user"
  },
  {
   "id": "bs-storefront",
   "label": "Storefront",
   "kind": "frontend",
   "sublabel": "the shop in the browser",
   "what": "Catalogue, basket and checkout in the browser. Opens buying a book (an interaction overview), whose steps open sequence diagrams.",
   "opensView": "buy-book"
  },
  {
   "id": "bs-api",
   "label": "Shop API",
   "kind": "backend",
   "sublabel": "catalogue, checkout, accounts",
   "what": "The JSON API behind the storefront. Opens its components, which open the sales domain's classes, an order's life and the order service inside.",
   "opensView": "components"
  },
  {
   "id": "bs-db",
   "label": "Database",
   "kind": "database",
   "sublabel": "books, orders, accounts",
   "what": "PostgreSQL: books, baskets, orders and accounts. Opens its schema (an ER diagram).",
   "opensView": "er-schema",
   "icon": "postgresql"
  },
  {
   "id": "bs-queue",
   "label": "Order queue",
   "kind": "queue",
   "sublabel": "paid orders, oldest first",
   "what": "Paid orders waiting to be fulfilled. Opens how order data flows through the shop (a data flow diagram, two levels).",
   "opensView": "dfd-level-1"
  },
  {
   "id": "bs-worker",
   "label": "Order worker",
   "kind": "backend",
   "sublabel": "fulfils paid orders",
   "what": "Takes paid orders off the queue and fulfils them. Opens fulfilling an order (an activity diagram), whose payment step opens one charge over time (a timing diagram).",
   "opensView": "fulfil"
  },
  {
   "id": "bs-payments",
   "label": "Payment provider",
   "kind": "external",
   "sublabel": "card payments, refunds",
   "what": "Takes card payments and makes refunds. Opens checkout (a sequence diagram), and from there the same checkout as a communication diagram.",
   "opensView": "checkout-sequence"
  },
  {
   "id": "bs-warehouse",
   "label": "Warehouse",
   "kind": "backend",
   "sublabel": "shelves, packing table",
   "what": "Where the books are picked and packed. Opens from order to shipment (BPMN), whose pick and pack opens its own process.",
   "opensView": "order-to-shipment",
   "icon": "box"
  },
  {
   "id": "bs-mail",
   "label": "Email service",
   "kind": "external",
   "sublabel": "receipts, shipping notices",
   "what": "Delivers the shop's emails: receipts and shipping notices."
  },
  {
   "id": "bs-courier",
   "label": "Courier",
   "kind": "external",
   "sublabel": "collects, delivers parcels",
   "what": "Collects parcels at 16:00 and delivers them to shoppers.",
   "icon": "package"
  },
  {
   "id": "bs-hosting",
   "label": "Hosting",
   "kind": "cloud",
   "sublabel": "servers, then a cloud",
   "what": "Where the shop runs. Opens the production deployment (C4), whose Docker host opens the same deployment in UML.",
   "opensView": "c4-deployment",
   "icon": "server"
  },
  {
   "id": "bs-plan",
   "label": "Opening plan",
   "kind": "file",
   "sublabel": "what to do before day one",
   "what": "Everything to do before the shop opens (a mindmap). Its three hosting choices open the shop on Google Cloud, Azure and AWS.",
   "opensView": "mm-plan",
   "icon": "calendar"
  }
 ],
 "edges": [
  {
   "id": "c4-shopper-bookshop",
   "type": "c4.Relationship",
   "from": "c4-shopper",
   "to": "c4-bookshop",
   "label": "Browses and buys books with"
  },
  {
   "id": "c4-staff-bookshop",
   "type": "c4.Relationship",
   "from": "c4-staff",
   "to": "c4-bookshop",
   "label": "Keep the catalogue and refund orders with"
  },
  {
   "id": "c4-bookshop-payments",
   "type": "c4.Relationship",
   "from": "c4-bookshop",
   "to": "c4-payments",
   "label": "Takes card payments with",
   "props": {
    "technology": "HTTPS"
   }
  },
  {
   "id": "c4-bookshop-mail",
   "type": "c4.Relationship",
   "from": "c4-bookshop",
   "to": "c4-mail",
   "label": "Sends order confirmations with",
   "props": {
    "technology": "HTTPS"
   }
  },
  {
   "id": "c4-bookshop-courier",
   "type": "c4.Relationship",
   "from": "c4-bookshop",
   "to": "c4-courier",
   "label": "Books deliveries with",
   "props": {
    "technology": "HTTPS"
   }
  },
  {
   "id": "c4-mail-shopper",
   "type": "c4.Relationship",
   "from": "c4-mail",
   "to": "c4-shopper",
   "label": "Delivers confirmations to",
   "props": {
    "technology": "Email"
   }
  },
  {
   "id": "c4-shopper-storefront",
   "type": "c4.Relationship",
   "from": "c4-shopper",
   "to": "c4-storefront",
   "label": "Fills a basket and checks out in",
   "props": {
    "technology": "HTTPS"
   }
  },
  {
   "id": "c4-staff-storefront",
   "type": "c4.Relationship",
   "from": "c4-staff",
   "to": "c4-storefront",
   "label": "Edit the catalogue and refund orders in",
   "props": {
    "technology": "HTTPS"
   }
  },
  {
   "id": "c4-storefront-api",
   "type": "c4.Relationship",
   "from": "c4-storefront",
   "to": "c4-api",
   "label": "Reads the catalogue and places orders through",
   "props": {
    "technology": "JSON over HTTPS"
   }
  },
  {
   "id": "c4-api-payments",
   "type": "c4.Relationship",
   "from": "c4-api",
   "to": "c4-payments",
   "label": "Charges cards with",
   "props": {
    "technology": "HTTPS"
   }
  },
  {
   "id": "c4-api-db",
   "type": "c4.Relationship",
   "from": "c4-api",
   "to": "c4-db",
   "label": "Reads and writes books, baskets and orders in",
   "props": {
    "technology": "SQL"
   }
  },
  {
   "id": "c4-api-queue",
   "type": "c4.Relationship",
   "from": "c4-api",
   "to": "c4-queue",
   "label": "Puts paid orders on",
   "props": {
    "technology": "SQL"
   }
  },
  {
   "id": "c4-worker-queue",
   "type": "c4.Relationship",
   "from": "c4-worker",
   "to": "c4-queue",
   "label": "Claims paid orders from",
   "props": {
    "technology": "SQL"
   }
  },
  {
   "id": "c4-worker-courier",
   "type": "c4.Relationship",
   "from": "c4-worker",
   "to": "c4-courier",
   "label": "Books deliveries with",
   "props": {
    "technology": "HTTPS"
   }
  },
  {
   "id": "c4-worker-mail",
   "type": "c4.Relationship",
   "from": "c4-worker",
   "to": "c4-mail",
   "label": "Sends confirmations with",
   "props": {
    "technology": "HTTPS"
   }
  },
  {
   "id": "c4-worker-db",
   "type": "c4.Relationship",
   "from": "c4-worker",
   "to": "c4-db",
   "label": "Marks orders as fulfilled in",
   "props": {
    "technology": "SQL"
   }
  },
  {
   "id": "c4-storefront-catalogue",
   "type": "c4.Relationship",
   "from": "c4-storefront",
   "to": "c4-catalogue",
   "label": "Lists and searches books through",
   "props": {
    "technology": "JSON over HTTPS"
   }
  },
  {
   "id": "c4-storefront-checkout",
   "type": "c4.Relationship",
   "from": "c4-storefront",
   "to": "c4-checkout",
   "label": "Places orders through",
   "props": {
    "technology": "JSON over HTTPS"
   }
  },
  {
   "id": "c4-storefront-accounts",
   "type": "c4.Relationship",
   "from": "c4-storefront",
   "to": "c4-accounts",
   "label": "Signs in through",
   "props": {
    "technology": "JSON over HTTPS"
   }
  },
  {
   "id": "c4-checkout-payment-client",
   "type": "c4.Relationship",
   "from": "c4-checkout",
   "to": "c4-payment-client",
   "label": "Charges the card through"
  },
  {
   "id": "c4-payment-client-payments",
   "type": "c4.Relationship",
   "from": "c4-payment-client",
   "to": "c4-payments",
   "label": "Starts a card payment with",
   "props": {
    "technology": "HTTPS"
   }
  },
  {
   "id": "c4-checkout-order-store",
   "type": "c4.Relationship",
   "from": "c4-checkout",
   "to": "c4-order-store",
   "label": "Saves the paid order with"
  },
  {
   "id": "c4-order-store-db",
   "type": "c4.Relationship",
   "from": "c4-order-store",
   "to": "c4-db",
   "label": "Reads and writes orders in",
   "props": {
    "technology": "SQL"
   }
  },
  {
   "id": "c4-order-store-queue",
   "type": "c4.Relationship",
   "from": "c4-order-store",
   "to": "c4-queue",
   "label": "Puts paid orders on",
   "props": {
    "technology": "SQL"
   }
  },
  {
   "id": "c4-catalogue-db",
   "type": "c4.Relationship",
   "from": "c4-catalogue",
   "to": "c4-db",
   "label": "Reads books from",
   "props": {
    "technology": "SQL"
   }
  },
  {
   "id": "c4-accounts-db",
   "type": "c4.Relationship",
   "from": "c4-accounts",
   "to": "c4-db",
   "label": "Reads and writes accounts and sessions in",
   "props": {
    "technology": "SQL"
   }
  },
  {
   "id": "c4-storefront-1-api-1",
   "type": "c4.Relationship",
   "from": "c4-storefront-1",
   "to": "c4-api-1",
   "label": "Calls",
   "props": {
    "technology": "JSON over HTTPS, port 443"
   }
  },
  {
   "id": "c4-api-1-db-1",
   "type": "c4.Relationship",
   "from": "c4-api-1",
   "to": "c4-db-1",
   "label": "Reads from and writes to",
   "props": {
    "technology": "SQL, port 5432, private network"
   }
  },
  {
   "id": "c4-api-1-queue-1",
   "type": "c4.Relationship",
   "from": "c4-api-1",
   "to": "c4-queue-1",
   "label": "Puts paid orders on",
   "props": {
    "technology": "SQL, port 5432, private network"
   }
  },
  {
   "id": "c4-worker-1-queue-1",
   "type": "c4.Relationship",
   "from": "c4-worker-1",
   "to": "c4-queue-1",
   "label": "Claims paid orders from",
   "props": {
    "technology": "SQL, port 5432, private network"
   }
  },
  {
   "id": "c4-worker-1-db-1",
   "type": "c4.Relationship",
   "from": "c4-worker-1",
   "to": "c4-db-1",
   "label": "Marks orders as fulfilled in",
   "props": {
    "technology": "SQL, port 5432, private network"
   }
  },
  {
   "id": "shopper-browses",
   "type": "uml.Association",
   "from": "shopper",
   "to": "browse"
  },
  {
   "id": "shopper-checks-out",
   "type": "uml.Association",
   "from": "shopper",
   "to": "check-out"
  },
  {
   "id": "member-tracks",
   "type": "uml.Association",
   "from": "member",
   "to": "track"
  },
  {
   "id": "provider-takes-card",
   "type": "uml.Association",
   "from": "payment-provider",
   "to": "pay-by-card"
  },
  {
   "id": "checkout-includes-pay",
   "type": "uml.Include",
   "from": "check-out",
   "to": "pay"
  },
  {
   "id": "track-includes-sign-in",
   "type": "uml.Include",
   "from": "track",
   "to": "sign-in"
  },
  {
   "id": "voucher-extends-checkout",
   "type": "uml.Extend",
   "from": "redeem-voucher",
   "to": "check-out",
   "props": {
    "extensionPoints": [
     "checkout.payment"
    ],
    "condition": "the shopper has a voucher code"
   }
  },
  {
   "id": "gift-wrap-extends-checkout",
   "type": "uml.Extend",
   "from": "gift-wrap",
   "to": "check-out",
   "props": {
    "extensionPoints": [
     "checkout.extras"
    ],
    "condition": "the order is a gift"
   }
  },
  {
   "id": "f-buy-start",
   "type": "uml.ControlFlow",
   "from": "buy-start",
   "to": "ref-find"
  },
  {
   "id": "f-found",
   "type": "uml.ControlFlow",
   "from": "ref-find",
   "to": "try-payment"
  },
  {
   "id": "f-pay",
   "type": "uml.ControlFlow",
   "from": "try-payment",
   "to": "ref-checkout"
  },
  {
   "id": "f-result",
   "type": "uml.ControlFlow",
   "from": "ref-checkout",
   "to": "payment-ok"
  },
  {
   "id": "f-accepted",
   "type": "uml.ControlFlow",
   "from": "payment-ok",
   "to": "buy-split",
   "props": {
    "guard": "payment accepted"
   }
  },
  {
   "id": "f-declined",
   "type": "uml.ControlFlow",
   "from": "payment-ok",
   "to": "try-payment",
   "props": {
    "guard": "else"
   }
  },
  {
   "id": "f-to-receipt",
   "type": "uml.ControlFlow",
   "from": "buy-split",
   "to": "ref-receipt"
  },
  {
   "id": "f-to-queue",
   "type": "uml.ControlFlow",
   "from": "buy-split",
   "to": "sd-queue"
  },
  {
   "id": "f-receipt-sent",
   "type": "uml.ControlFlow",
   "from": "ref-receipt",
   "to": "both-done"
  },
  {
   "id": "f-queued",
   "type": "uml.ControlFlow",
   "from": "sd-queue",
   "to": "both-done"
  },
  {
   "id": "f-buy-done",
   "type": "uml.ControlFlow",
   "from": "both-done",
   "to": "buy-done"
  },
  {
   "id": "shopper-storefront",
   "type": "uml.Connector",
   "from": "lifeline-shopper",
   "to": "lifeline-storefront"
  },
  {
   "id": "storefront-api",
   "type": "uml.Connector",
   "from": "lifeline-storefront",
   "to": "lifeline-api"
  },
  {
   "id": "api-self",
   "type": "uml.Connector",
   "from": "lifeline-api",
   "to": "lifeline-api"
  },
  {
   "id": "api-payments",
   "type": "uml.Connector",
   "from": "lifeline-api",
   "to": "lifeline-payments"
  },
  {
   "id": "api-receipt",
   "type": "uml.Connector",
   "from": "lifeline-api",
   "to": "receipt"
  },
  {
   "id": "cm1",
   "type": "uml.Message",
   "from": "lifeline-shopper",
   "to": "lifeline-storefront",
   "label": "checkout()",
   "props": {
    "sort": "call"
   }
  },
  {
   "id": "cm2",
   "type": "uml.Message",
   "from": "lifeline-storefront",
   "to": "lifeline-api",
   "label": "place(order)",
   "props": {
    "sort": "call"
   }
  },
  {
   "id": "cm3",
   "type": "uml.Message",
   "from": "lifeline-api",
   "to": "lifeline-api",
   "label": "validate(order)",
   "props": {
    "sort": "call"
   }
  },
  {
   "id": "cm4",
   "type": "uml.Message",
   "from": "lifeline-api",
   "to": "lifeline-payments",
   "label": "charge(total)",
   "props": {
    "sort": "call"
   }
  },
  {
   "id": "cm5",
   "type": "uml.Message",
   "from": "lifeline-payments",
   "to": "lifeline-api",
   "label": "paid",
   "props": {
    "sort": "reply",
    "replyTo": "cm4"
   }
  },
  {
   "id": "cm6",
   "type": "uml.Message",
   "from": "lifeline-api",
   "to": "receipt",
   "label": "new(order)",
   "props": {
    "sort": "create"
   }
  },
  {
   "id": "cm7",
   "type": "uml.Message",
   "from": "lifeline-api",
   "to": "lifeline-storefront",
   "label": "orderPlaced",
   "props": {
    "sort": "async"
   }
  },
  {
   "id": "cm8",
   "type": "uml.Message",
   "from": "lifeline-api",
   "to": "lifeline-storefront",
   "label": "result",
   "props": {
    "sort": "reply",
    "replyTo": "cm2"
   }
  },
  {
   "id": "cm9",
   "type": "uml.Message",
   "from": "lifeline-storefront",
   "to": "lifeline-shopper",
   "label": "confirmation page",
   "props": {
    "sort": "reply",
    "replyTo": "cm1"
   }
  },
  {
   "id": "storefront-requires-orders",
   "type": "uml.Usage",
   "from": "storefront-component",
   "to": "i-orders"
  },
  {
   "id": "storefront-requires-sign-in",
   "type": "uml.Usage",
   "from": "storefront-component",
   "to": "i-sign-in"
  },
  {
   "id": "api-requires-sign-in",
   "type": "uml.Usage",
   "from": "shop-api",
   "to": "i-sign-in"
  },
  {
   "id": "orders-to-checkout",
   "type": "uml.Connector",
   "from": "shop-api.orders",
   "to": "checkout-component.orders",
   "props": {
    "kind": "delegation"
   }
  },
  {
   "id": "checkout-payments-out",
   "type": "uml.Connector",
   "from": "checkout-component.payments",
   "to": "shop-api.payments",
   "props": {
    "kind": "delegation"
   }
  },
  {
   "id": "api-to-provider",
   "type": "uml.Connector",
   "from": "shop-api.payments",
   "to": "payment-provider-component.charges",
   "props": {
    "kind": "assembly"
   }
  },
  {
   "id": "worker-needs-api",
   "type": "uml.Dependency",
   "from": "order-worker",
   "to": "shop-api"
  },
  {
   "id": "api-jar-manifests-api",
   "type": "uml.Manifestation",
   "from": "shop-api-jar",
   "to": "shop-api"
  },
  {
   "id": "customer-orders",
   "type": "uml.Association",
   "from": "customer",
   "to": "order",
   "label": "places",
   "props": {
    "ends": {
     "from": {
      "multiplicity": "1"
     },
     "to": {
      "role": "orders",
      "multiplicity": "0..*",
      "navigable": true
     }
    }
   }
  },
  {
   "id": "order-lines",
   "type": "uml.Association",
   "from": "order",
   "to": "line",
   "props": {
    "ends": {
     "from": {
      "aggregation": "composite",
      "multiplicity": "1"
     },
     "to": {
      "role": "lines",
      "multiplicity": "1..*",
      "navigable": true
     }
    }
   }
  },
  {
   "id": "line-book",
   "type": "uml.Association",
   "from": "line",
   "to": "book",
   "props": {
    "ends": {
     "from": {
      "multiplicity": "0..*"
     },
     "to": {
      "role": "book",
      "multiplicity": "1",
      "navigable": true
     }
    }
   }
  },
  {
   "id": "order-payment",
   "type": "uml.Association",
   "from": "order",
   "to": "payment",
   "props": {
    "ends": {
     "from": {
      "aggregation": "shared",
      "multiplicity": "1"
     },
     "to": {
      "role": "payments",
      "multiplicity": "0..*"
     }
    }
   }
  },
  {
   "id": "order-payable",
   "type": "uml.InterfaceRealization",
   "from": "order",
   "to": "payable"
  },
  {
   "id": "card-is-payment",
   "type": "uml.Generalization",
   "from": "card-payment",
   "to": "payment"
  },
  {
   "id": "order-uses-money",
   "type": "uml.Dependency",
   "from": "order",
   "to": "money",
   "props": {
    "stereotypes": [
     "use"
    ]
   }
  },
  {
   "id": "note-total-link",
   "type": "uml.CommentLink",
   "from": "note-total",
   "to": "order"
  },
  {
   "id": "t-created",
   "type": "uml.Transition",
   "from": "created",
   "to": "placed"
  },
  {
   "id": "t-payment-result",
   "type": "uml.Transition",
   "from": "placed",
   "to": "payment-outcome",
   "props": {
    "trigger": "payment result"
   }
  },
  {
   "id": "t-authorised",
   "type": "uml.Transition",
   "from": "payment-outcome",
   "to": "fulfilling",
   "props": {
    "guard": "card authorised"
   }
  },
  {
   "id": "t-prepaid",
   "type": "uml.Transition",
   "from": "payment-outcome",
   "to": "prepaid",
   "props": {
    "guard": "paid in full by gift card"
   }
  },
  {
   "id": "t-declined",
   "type": "uml.Transition",
   "from": "payment-outcome",
   "to": "cancelled",
   "props": {
    "guard": "else",
    "effect": "email the shopper"
   }
  },
  {
   "id": "t-prepaid-picking",
   "type": "uml.Transition",
   "from": "prepaid",
   "to": "picking"
  },
  {
   "id": "t-prepaid-captured",
   "type": "uml.Transition",
   "from": "prepaid",
   "to": "captured"
  },
  {
   "id": "t-parcel-start",
   "type": "uml.Transition",
   "from": "parcel-start",
   "to": "picking"
  },
  {
   "id": "t-picked",
   "type": "uml.Transition",
   "from": "picking",
   "to": "packed",
   "props": {
    "trigger": "all books picked"
   }
  },
  {
   "id": "t-payment-start",
   "type": "uml.Transition",
   "from": "payment-start",
   "to": "capturing"
  },
  {
   "id": "t-capture-retry",
   "type": "uml.Transition",
   "from": "capturing",
   "to": "capturing",
   "props": {
    "trigger": "capture failed",
    "guard": "attempts < 3",
    "effect": "count the attempt"
   }
  },
  {
   "id": "t-capture-given-up",
   "type": "uml.Transition",
   "from": "capturing",
   "to": "cancelled",
   "props": {
    "trigger": "capture failed",
    "guard": "attempts >= 3"
   }
  },
  {
   "id": "t-captured",
   "type": "uml.Transition",
   "from": "capturing",
   "to": "captured",
   "props": {
    "trigger": "capture confirmed"
   }
  },
  {
   "id": "t-packed-ready",
   "type": "uml.Transition",
   "from": "packed",
   "to": "ready"
  },
  {
   "id": "t-captured-ready",
   "type": "uml.Transition",
   "from": "captured",
   "to": "ready"
  },
  {
   "id": "t-handed-over",
   "type": "uml.Transition",
   "from": "ready",
   "to": "delivery",
   "props": {
    "effect": "hand the parcel to the carrier"
   }
  },
  {
   "id": "t-delivery-start",
   "type": "uml.Transition",
   "from": "delivery-start",
   "to": "in-transit"
  },
  {
   "id": "t-at-depot",
   "type": "uml.Transition",
   "from": "in-transit",
   "to": "out-for-delivery",
   "props": {
    "trigger": "reached the local depot"
   }
  },
  {
   "id": "t-delivered",
   "type": "uml.Transition",
   "from": "out-for-delivery",
   "to": "delivered",
   "props": {
    "trigger": "parcel signed for",
    "effect": "email the receipt"
   }
  },
  {
   "id": "t-problem",
   "type": "uml.Transition",
   "from": "delivery",
   "to": "enquiry",
   "props": {
    "trigger": "problem reported"
   }
  },
  {
   "id": "t-resolved",
   "type": "uml.Transition",
   "from": "enquiry",
   "to": "delivery-history",
   "props": {
    "trigger": "problem resolved"
   }
  },
  {
   "id": "t-cancel",
   "type": "uml.Transition",
   "from": "fulfilling",
   "to": "cancelled",
   "props": {
    "trigger": "cancel requested",
    "effect": "refund the payment"
   }
  },
  {
   "id": "t-erase",
   "type": "uml.Transition",
   "from": "cancelled",
   "to": "erased",
   "props": {
    "trigger": "after 30 days",
    "effect": "erase the shopper's details"
   }
  },
  {
   "id": "ada-places-order",
   "type": "uml.Link",
   "from": "ada",
   "to": "order-1042",
   "label": "places",
   "props": {
    "ends": {
     "to": {
      "role": "orders"
     }
    }
   }
  },
  {
   "id": "order-has-line-1",
   "type": "uml.Link",
   "from": "order-1042",
   "to": "line-1",
   "props": {
    "ends": {
     "to": {
      "role": "lines"
     }
    }
   }
  },
  {
   "id": "order-has-line-2",
   "type": "uml.Link",
   "from": "order-1042",
   "to": "line-2",
   "props": {
    "ends": {
     "to": {
      "role": "lines"
     }
    }
   }
  },
  {
   "id": "line-1-is-for",
   "type": "uml.Link",
   "from": "line-1",
   "to": "middlemarch",
   "props": {
    "ends": {
     "to": {
      "role": "book"
     }
    }
   }
  },
  {
   "id": "line-2-is-for",
   "type": "uml.Link",
   "from": "line-2",
   "to": "frankenstein",
   "props": {
    "ends": {
     "to": {
      "role": "book"
     }
    }
   }
  },
  {
   "id": "order-paid-by-card",
   "type": "uml.Link",
   "from": "order-1042",
   "to": "card-1",
   "props": {
    "ends": {
     "to": {
      "role": "payments"
     }
    }
   }
  },
  {
   "id": "catalog-imports-shared",
   "type": "uml.PackageImport",
   "from": "catalog",
   "to": "shared",
   "props": {
    "visibility": "public"
   }
  },
  {
   "id": "sales-imports-catalog",
   "type": "uml.PackageImport",
   "from": "sales",
   "to": "catalog",
   "props": {
    "visibility": "public"
   }
  },
  {
   "id": "payments-accesses-shared",
   "type": "uml.PackageImport",
   "from": "payments-package",
   "to": "shared",
   "props": {
    "visibility": "private"
   }
  },
  {
   "id": "wholesale-merges-sales",
   "type": "uml.PackageMerge",
   "from": "wholesale",
   "to": "sales"
  },
  {
   "id": "sales-needs-payments",
   "type": "uml.Dependency",
   "from": "sales",
   "to": "payments-package"
  },
  {
   "id": "sales-applies-conventions",
   "type": "uml.ProfileApplication",
   "from": "sales",
   "to": "conventions"
  },
  {
   "id": "entity-extends-class",
   "type": "uml.Extension",
   "from": "entity",
   "to": "mc-class"
  },
  {
   "id": "owned-extends-class",
   "type": "uml.Extension",
   "from": "owned",
   "to": "mc-class",
   "props": {
    "isRequired": true
   }
  },
  {
   "id": "column-extends-property",
   "type": "uml.Extension",
   "from": "column",
   "to": "mc-property"
  },
  {
   "id": "root-is-entity",
   "type": "uml.Generalization",
   "from": "aggregate-root",
   "to": "entity"
  },
  {
   "id": "api-to-checkout",
   "type": "uml.Connector",
   "from": "order-service.api",
   "to": "checkout-class.requests",
   "props": {
    "ends": {
     "to": {
      "part": "order-service.checkout"
     }
    }
   }
  },
  {
   "id": "checkout-to-pricing",
   "type": "uml.Connector",
   "from": "checkout-class.quotes",
   "to": "price-calculator.quotes",
   "props": {
    "ends": {
     "from": {
      "part": "order-service.checkout"
     },
     "to": {
      "part": "order-service.pricing"
     }
    }
   }
  },
  {
   "id": "checkout-to-payments",
   "type": "uml.Connector",
   "from": "checkout-class.charges",
   "to": "order-service.payments",
   "props": {
    "ends": {
     "from": {
      "part": "order-service.checkout"
     }
    }
   }
  },
  {
   "id": "checkout-to-orders",
   "type": "uml.Connector",
   "from": "order-service.checkout",
   "to": "order-service.orders"
  },
  {
   "id": "checkout-to-listeners",
   "type": "uml.Connector",
   "from": "order-service.checkout",
   "to": "order-service.listeners"
  },
  {
   "id": "publisher-to-subscriber",
   "type": "uml.Connector",
   "from": "publish-subscribe.publisher",
   "to": "publish-subscribe.subscriber"
  },
  {
   "id": "checkout-is-publisher",
   "type": "uml.RoleBinding",
   "from": "order-service.checkout",
   "to": "order-events",
   "label": "publisher"
  },
  {
   "id": "listeners-are-subscribers",
   "type": "uml.RoleBinding",
   "from": "order-service.listeners",
   "to": "order-events",
   "label": "subscriber"
  },
  {
   "id": "flow-shopper-storefront",
   "type": "uml.InformationFlow",
   "from": "shopper",
   "to": "storefront-component",
   "props": {
    "conveyed": [
     "order-info",
     "card-details"
    ]
   }
  },
  {
   "id": "storefront-payments",
   "type": "uml.InformationFlow",
   "from": "storefront-component",
   "to": "payment-provider-component",
   "props": {
    "conveyed": [
     "card-details"
    ]
   }
  },
  {
   "id": "flow-storefront-api",
   "type": "uml.InformationFlow",
   "from": "storefront-component",
   "to": "shop-api",
   "props": {
    "conveyed": [
     "order-info"
    ]
   }
  },
  {
   "id": "api-warehouse",
   "type": "uml.InformationFlow",
   "from": "shop-api",
   "to": "warehouse",
   "props": {
    "conveyed": [
     "order-info"
    ]
   }
  },
  {
   "id": "warehouse-api",
   "type": "uml.InformationFlow",
   "from": "warehouse",
   "to": "shop-api",
   "props": {
    "conveyed": [
     "stock-info"
    ]
   }
  },
  {
   "id": "api-storefront",
   "type": "uml.InformationFlow",
   "from": "shop-api",
   "to": "storefront-component",
   "props": {
    "conveyed": [
     "stock-info"
    ]
   }
  },
  {
   "id": "api-email",
   "type": "uml.InformationFlow",
   "from": "shop-api",
   "to": "email-service",
   "props": {
    "conveyed": [
     "order-info",
     "receipt-info"
    ]
   }
  },
  {
   "id": "email-shopper",
   "type": "uml.InformationFlow",
   "from": "email-service",
   "to": "shopper",
   "props": {
    "conveyed": [
     "receipt-info"
    ]
   }
  },
  {
   "id": "er-customer-orders",
   "type": "er.Relationship",
   "from": "er-customer",
   "to": "er-order",
   "label": "places",
   "props": {
    "identifying": false,
    "ends": {
     "from": {
      "multiplicity": "1"
     },
     "to": {
      "multiplicity": "0..*"
     }
    }
   }
  },
  {
   "id": "er-order-lines",
   "type": "er.Relationship",
   "from": "er-order",
   "to": "er-order_line",
   "label": "contains",
   "props": {
    "identifying": true,
    "ends": {
     "from": {
      "multiplicity": "1"
     },
     "to": {
      "multiplicity": "1..*"
     }
    }
   }
  },
  {
   "id": "er-book-lines",
   "type": "er.Relationship",
   "from": "er-book",
   "to": "er-order_line",
   "props": {
    "identifying": false,
    "ends": {
     "from": {
      "multiplicity": "1"
     },
     "to": {
      "multiplicity": "0..*"
     }
    }
   }
  },
  {
   "id": "er-book-authors",
   "type": "er.Relationship",
   "from": "er-book",
   "to": "er-book_author",
   "props": {
    "identifying": true,
    "ends": {
     "from": {
      "multiplicity": "1"
     },
     "to": {
      "multiplicity": "1..*"
     }
    }
   }
  },
  {
   "id": "er-author-books",
   "type": "er.Relationship",
   "from": "er-author",
   "to": "er-book_author",
   "props": {
    "identifying": true,
    "ends": {
     "from": {
      "multiplicity": "1"
     },
     "to": {
      "multiplicity": "0..*"
     }
    }
   }
  },
  {
   "id": "er-order-payment",
   "type": "er.Relationship",
   "from": "er-order",
   "to": "er-payment",
   "props": {
    "identifying": false,
    "ends": {
     "from": {
      "multiplicity": "1"
     },
     "to": {
      "multiplicity": "0..1"
     }
    }
   }
  },
  {
   "id": "er-customer-referrals",
   "type": "er.Relationship",
   "from": "er-customer",
   "to": "er-customer",
   "label": "referred",
   "props": {
    "identifying": false,
    "ends": {
     "from": {
      "multiplicity": "0..1"
     },
     "to": {
      "multiplicity": "0..*"
     }
    }
   }
  },
  {
   "id": "dfd-basket",
   "type": "dfd.DataFlow",
   "from": "dfd-customer",
   "to": "dfd-take-order",
   "label": "basket"
  },
  {
   "id": "dfd-price-and-stock",
   "type": "dfd.DataFlow",
   "from": "dfd-books",
   "to": "dfd-take-order",
   "label": "price and stock"
  },
  {
   "id": "dfd-new-order",
   "type": "dfd.DataFlow",
   "from": "dfd-take-order",
   "to": "dfd-orders",
   "label": "new order"
  },
  {
   "id": "dfd-confirmation",
   "type": "dfd.DataFlow",
   "from": "dfd-take-order",
   "to": "dfd-customer",
   "label": "order confirmation"
  },
  {
   "id": "dfd-amount-due",
   "type": "dfd.DataFlow",
   "from": "dfd-orders",
   "to": "dfd-take-payment",
   "label": "amount due"
  },
  {
   "id": "dfd-charge-request",
   "type": "dfd.DataFlow",
   "from": "dfd-take-payment",
   "to": "dfd-provider",
   "label": "charge request"
  },
  {
   "id": "dfd-charge-result",
   "type": "dfd.DataFlow",
   "from": "dfd-provider",
   "to": "dfd-take-payment",
   "label": "charge result"
  },
  {
   "id": "dfd-paid-order",
   "type": "dfd.DataFlow",
   "from": "dfd-take-payment",
   "to": "dfd-ship-order",
   "label": "paid order"
  },
  {
   "id": "dfd-stock-change",
   "type": "dfd.DataFlow",
   "from": "dfd-ship-order",
   "to": "dfd-books",
   "label": "stock change"
  },
  {
   "id": "dfd-shipping-label",
   "type": "dfd.DataFlow",
   "from": "dfd-ship-order",
   "to": "dfd-courier",
   "label": "shipping label"
  },
  {
   "id": "dfd-shipping-notice",
   "type": "dfd.DataFlow",
   "from": "dfd-ship-order",
   "to": "dfd-customer",
   "label": "shipping notice"
  },
  {
   "id": "dfd-l2-basket",
   "type": "dfd.DataFlow",
   "from": "dfd-customer",
   "to": "dfd-check-basket",
   "label": "basket"
  },
  {
   "id": "dfd-l2-price-and-stock",
   "type": "dfd.DataFlow",
   "from": "dfd-books",
   "to": "dfd-check-basket",
   "label": "price and stock"
  },
  {
   "id": "dfd-l2-checked-lines",
   "type": "dfd.DataFlow",
   "from": "dfd-check-basket",
   "to": "dfd-total-order",
   "label": "checked lines"
  },
  {
   "id": "dfd-l2-totalled-order",
   "type": "dfd.DataFlow",
   "from": "dfd-total-order",
   "to": "dfd-record-order",
   "label": "totalled order"
  },
  {
   "id": "dfd-l2-new-order",
   "type": "dfd.DataFlow",
   "from": "dfd-record-order",
   "to": "dfd-orders",
   "label": "new order"
  },
  {
   "id": "dfd-l2-confirmation",
   "type": "dfd.DataFlow",
   "from": "dfd-record-order",
   "to": "dfd-customer",
   "label": "order confirmation"
  },
  {
   "id": "f-start",
   "type": "uml.ControlFlow",
   "from": "start",
   "to": "take-order"
  },
  {
   "id": "f-order-out",
   "type": "uml.ObjectFlow",
   "from": "take-order",
   "to": "order-object"
  },
  {
   "id": "f-order-in",
   "type": "uml.ObjectFlow",
   "from": "order-object",
   "to": "check-stock"
  },
  {
   "id": "f-stock-read",
   "type": "uml.ObjectFlow",
   "from": "stock",
   "to": "check-stock"
  },
  {
   "id": "f-checked",
   "type": "uml.ControlFlow",
   "from": "check-stock",
   "to": "in-stock"
  },
  {
   "id": "f-in-stock",
   "type": "uml.ControlFlow",
   "from": "in-stock",
   "to": "stock-ready",
   "props": {
    "guard": "all books in stock"
   }
  },
  {
   "id": "f-short",
   "type": "uml.ControlFlow",
   "from": "in-stock",
   "to": "ask-restock",
   "props": {
    "guard": "else"
   }
  },
  {
   "id": "f-wait",
   "type": "uml.ControlFlow",
   "from": "ask-restock",
   "to": "books-arrive"
  },
  {
   "id": "f-arrived",
   "type": "uml.ControlFlow",
   "from": "books-arrive",
   "to": "stock-ready"
  },
  {
   "id": "f-ready",
   "type": "uml.ControlFlow",
   "from": "stock-ready",
   "to": "split"
  },
  {
   "id": "f-to-pay",
   "type": "uml.ControlFlow",
   "from": "split",
   "to": "call-payment"
  },
  {
   "id": "f-to-pick",
   "type": "uml.ControlFlow",
   "from": "split",
   "to": "pick"
  },
  {
   "id": "f-to-tell",
   "type": "uml.ControlFlow",
   "from": "split",
   "to": "tell-shopper"
  },
  {
   "id": "f-told",
   "type": "uml.ControlFlow",
   "from": "tell-shopper",
   "to": "told"
  },
  {
   "id": "f-stock-write",
   "type": "uml.ObjectFlow",
   "from": "pick",
   "to": "stock"
  },
  {
   "id": "f-paid",
   "type": "uml.ControlFlow",
   "from": "call-payment",
   "to": "packed-and-paid"
  },
  {
   "id": "f-packed",
   "type": "uml.ControlFlow",
   "from": "pick",
   "to": "packed-and-paid"
  },
  {
   "id": "f-ship",
   "type": "uml.ControlFlow",
   "from": "packed-and-paid",
   "to": "ship"
  },
  {
   "id": "f-done",
   "type": "uml.ControlFlow",
   "from": "ship",
   "to": "done"
  },
  {
   "id": "f-pay-start",
   "type": "uml.ControlFlow",
   "from": "pay-start",
   "to": "charge"
  },
  {
   "id": "f-charged",
   "type": "uml.ControlFlow",
   "from": "charge",
   "to": "record"
  },
  {
   "id": "f-recorded",
   "type": "uml.ControlFlow",
   "from": "record",
   "to": "pay-done"
  },
  {
   "id": "f-basket",
   "type": "bpmn.SequenceFlow",
   "from": "basket-ready",
   "to": "place-order"
  },
  {
   "id": "f-placed",
   "type": "bpmn.SequenceFlow",
   "from": "place-order",
   "to": "order-placed"
  },
  {
   "id": "f-received",
   "type": "bpmn.SequenceFlow",
   "from": "order-received",
   "to": "bp-take-payment"
  },
  {
   "id": "bp-f-charged",
   "type": "bpmn.SequenceFlow",
   "from": "bp-take-payment",
   "to": "paid"
  },
  {
   "id": "bp-f-paid",
   "type": "bpmn.SequenceFlow",
   "from": "paid",
   "to": "fork",
   "label": "yes"
  },
  {
   "id": "bp-f-declined",
   "type": "bpmn.SequenceFlow",
   "from": "paid",
   "to": "not-paid",
   "label": "no"
  },
  {
   "id": "f-timeout",
   "type": "bpmn.SequenceFlow",
   "from": "payment-timeout",
   "to": "not-paid"
  },
  {
   "id": "f-cancel",
   "type": "bpmn.SequenceFlow",
   "from": "not-paid",
   "to": "cancel-order"
  },
  {
   "id": "f-cancelled",
   "type": "bpmn.SequenceFlow",
   "from": "cancel-order",
   "to": "order-cancelled"
  },
  {
   "id": "bp-f-to-pick",
   "type": "bpmn.SequenceFlow",
   "from": "fork",
   "to": "pick-pack"
  },
  {
   "id": "f-to-invoice",
   "type": "bpmn.SequenceFlow",
   "from": "fork",
   "to": "send-invoice"
  },
  {
   "id": "bp-f-packed",
   "type": "bpmn.SequenceFlow",
   "from": "pick-pack",
   "to": "bp-join"
  },
  {
   "id": "f-invoiced",
   "type": "bpmn.SequenceFlow",
   "from": "send-invoice",
   "to": "bp-join"
  },
  {
   "id": "bp-f-wait",
   "type": "bpmn.SequenceFlow",
   "from": "bp-join",
   "to": "courier-pickup"
  },
  {
   "id": "f-pickup",
   "type": "bpmn.SequenceFlow",
   "from": "courier-pickup",
   "to": "bp-ship"
  },
  {
   "id": "f-handed",
   "type": "bpmn.SequenceFlow",
   "from": "bp-ship",
   "to": "shipping-notice"
  },
  {
   "id": "f-shipped",
   "type": "bpmn.SequenceFlow",
   "from": "shipping-notice",
   "to": "order-shipped"
  },
  {
   "id": "f-pick",
   "type": "bpmn.SequenceFlow",
   "from": "picking-starts",
   "to": "pick-books"
  },
  {
   "id": "f-pack",
   "type": "bpmn.SequenceFlow",
   "from": "pick-books",
   "to": "pack-parcel"
  },
  {
   "id": "bp-f-done",
   "type": "bpmn.SequenceFlow",
   "from": "pack-parcel",
   "to": "parcel-packed"
  },
  {
   "id": "m-order",
   "type": "bpmn.MessageFlow",
   "from": "place-order",
   "to": "order-received",
   "label": "Order"
  },
  {
   "id": "bp-m-charge",
   "type": "bpmn.MessageFlow",
   "from": "bp-take-payment",
   "to": "bp-payment-provider",
   "label": "Charge request"
  },
  {
   "id": "m-result",
   "type": "bpmn.MessageFlow",
   "from": "bp-payment-provider",
   "to": "bp-take-payment",
   "label": "Payment result"
  },
  {
   "id": "m-notice",
   "type": "bpmn.MessageFlow",
   "from": "shipping-notice",
   "to": "bp-shopper",
   "label": "Shipping notice"
  },
  {
   "id": "d-order-out",
   "type": "bpmn.DataAssociation",
   "from": "order-received",
   "to": "bp-order"
  },
  {
   "id": "d-order-in",
   "type": "bpmn.DataAssociation",
   "from": "bp-order",
   "to": "pick-pack"
  },
  {
   "id": "d-stock-read",
   "type": "bpmn.DataAssociation",
   "from": "bp-stock",
   "to": "pick-pack"
  },
  {
   "id": "d-stock-write",
   "type": "bpmn.DataAssociation",
   "from": "pick-pack",
   "to": "bp-stock"
  },
  {
   "id": "a-note-card",
   "type": "bpmn.Association",
   "from": "note-card",
   "to": "bp-take-payment"
  },
  {
   "id": "start-slip",
   "type": "flow.Flow",
   "from": "return-arrives",
   "to": "slip"
  },
  {
   "id": "slip-key-in",
   "type": "flow.Flow",
   "from": "slip",
   "to": "key-in"
  },
  {
   "id": "key-in-inspect",
   "type": "flow.Flow",
   "from": "key-in",
   "to": "inspect"
  },
  {
   "id": "inspect-resaleable",
   "type": "flow.Flow",
   "from": "inspect",
   "to": "resaleable"
  },
  {
   "id": "resaleable-yes",
   "type": "flow.Flow",
   "from": "resaleable",
   "to": "refund",
   "label": "yes"
  },
  {
   "id": "resaleable-no",
   "type": "flow.Flow",
   "from": "resaleable",
   "to": "letter",
   "label": "no"
  },
  {
   "id": "refund-wait",
   "type": "flow.Flow",
   "from": "refund",
   "to": "wait"
  },
  {
   "id": "wait-restock",
   "type": "flow.Flow",
   "from": "wait",
   "to": "restock"
  },
  {
   "id": "restock-stock",
   "type": "flow.Flow",
   "from": "restock",
   "to": "stock-records"
  },
  {
   "id": "stock-join",
   "type": "flow.Flow",
   "from": "stock-records",
   "to": "join"
  },
  {
   "id": "letter-post-back",
   "type": "flow.Flow",
   "from": "letter",
   "to": "post-back"
  },
  {
   "id": "post-back-join",
   "type": "flow.Flow",
   "from": "post-back",
   "to": "join"
  },
  {
   "id": "join-end",
   "type": "flow.Flow",
   "from": "join",
   "to": "end"
  },
  {
   "id": "routes-on-edge",
   "type": "uml.Deployment",
   "from": "edge-routes",
   "to": "edge-node"
  },
  {
   "id": "worker-jar-manifests-worker",
   "type": "uml.Manifestation",
   "from": "order-worker-jar",
   "to": "order-worker"
  },
  {
   "id": "config-for-api-jar",
   "type": "uml.Dependency",
   "from": "shop-api-config",
   "to": "shop-api-jar"
  },
  {
   "id": "device-to-edge",
   "type": "uml.CommunicationPath",
   "from": "shopper-device",
   "to": "edge-node",
   "label": "HTTPS"
  },
  {
   "id": "edge-to-app",
   "type": "uml.CommunicationPath",
   "from": "edge-node",
   "to": "app-server",
   "label": "HTTP"
  },
  {
   "id": "app-to-database",
   "type": "uml.CommunicationPath",
   "from": "app-server",
   "to": "database",
   "label": "PostgreSQL wire protocol"
  },
  {
   "id": "app-to-queue",
   "type": "uml.CommunicationPath",
   "from": "app-server",
   "to": "queue-node",
   "label": "PostgreSQL wire protocol"
  },
  {
   "id": "gcp-users-dns",
   "type": "gcp.Path",
   "from": "gcp-users",
   "to": "gcp-dns",
   "label": "looks up"
  },
  {
   "id": "gcp-users-lb",
   "type": "gcp.Path",
   "from": "gcp-users",
   "to": "gcp-lb",
   "label": "HTTPS"
  },
  {
   "id": "gcp-lb-cdn",
   "type": "gcp.Path",
   "from": "gcp-lb",
   "to": "gcp-cdn",
   "label": "storefront"
  },
  {
   "id": "gcp-cdn-assets",
   "type": "gcp.Path",
   "from": "gcp-cdn",
   "to": "gcp-assets",
   "label": "cache fill"
  },
  {
   "id": "gcp-lb-api",
   "type": "gcp.Path",
   "from": "gcp-lb",
   "to": "gcp-api",
   "label": "/api"
  },
  {
   "id": "gcp-api-db",
   "type": "gcp.Path",
   "from": "gcp-api",
   "to": "gcp-db",
   "label": "SQL"
  },
  {
   "id": "gcp-api-queue",
   "type": "gcp.Path",
   "from": "gcp-api",
   "to": "gcp-queue",
   "label": "paid order"
  },
  {
   "id": "gcp-queue-worker",
   "type": "gcp.Path",
   "from": "gcp-queue",
   "to": "gcp-worker",
   "label": "pushes"
  },
  {
   "id": "gcp-worker-db",
   "type": "gcp.Path",
   "from": "gcp-worker",
   "to": "gcp-db",
   "label": "SQL"
  },
  {
   "id": "gcp-db-replica",
   "type": "gcp.Path",
   "from": "gcp-db",
   "to": "gcp-db-standby",
   "label": "replicates"
  },
  {
   "id": "az-front-door-assets",
   "type": "azure.Connector",
   "from": "az-front-door",
   "to": "az-assets",
   "label": "storefront"
  },
  {
   "id": "az-front-door-api",
   "type": "azure.Connector",
   "from": "az-front-door",
   "to": "az-api",
   "label": "/api"
  },
  {
   "id": "az-api-db",
   "type": "azure.Connector",
   "from": "az-api",
   "to": "az-db",
   "label": "SQL"
  },
  {
   "id": "az-api-queue",
   "type": "azure.Connector",
   "from": "az-api",
   "to": "az-queue",
   "label": "paid order"
  },
  {
   "id": "az-queue-worker",
   "type": "azure.Connector",
   "from": "az-queue",
   "to": "az-worker",
   "label": "next order"
  },
  {
   "id": "az-worker-db",
   "type": "azure.Connector",
   "from": "az-worker",
   "to": "az-db",
   "label": "SQL"
  },
  {
   "id": "az-api-vault",
   "type": "azure.Connector",
   "from": "az-api",
   "to": "az-vault",
   "label": "secrets"
  },
  {
   "id": "az-worker-vault",
   "type": "azure.Connector",
   "from": "az-worker",
   "to": "az-vault",
   "label": "secrets"
  },
  {
   "id": "az-apps-monitor",
   "type": "azure.Connector",
   "from": "az-snet-apps",
   "to": "az-monitor",
   "label": "logs, metrics"
  },
  {
   "id": "aws-users-dns",
   "type": "aws.Connection",
   "from": "aws-users",
   "to": "aws-dns",
   "label": "looks up"
  },
  {
   "id": "aws-users-cdn",
   "type": "aws.Connection",
   "from": "aws-users",
   "to": "aws-cdn",
   "label": "HTTPS"
  },
  {
   "id": "aws-cdn-assets",
   "type": "aws.Connection",
   "from": "aws-cdn",
   "to": "aws-assets",
   "label": "storefront"
  },
  {
   "id": "aws-cdn-alb",
   "type": "aws.Connection",
   "from": "aws-cdn",
   "to": "aws-alb",
   "label": "/api"
  },
  {
   "id": "aws-alb-api-a",
   "type": "aws.Connection",
   "from": "aws-alb",
   "to": "aws-api-a",
   "label": "HTTP"
  },
  {
   "id": "aws-alb-api-b",
   "type": "aws.Connection",
   "from": "aws-alb",
   "to": "aws-api-b",
   "label": "HTTP"
  },
  {
   "id": "aws-api-a-db",
   "type": "aws.Connection",
   "from": "aws-api-a",
   "to": "aws-db",
   "label": "SQL"
  },
  {
   "id": "aws-api-b-db",
   "type": "aws.Connection",
   "from": "aws-api-b",
   "to": "aws-db",
   "label": "SQL"
  },
  {
   "id": "aws-db-replica",
   "type": "aws.Connection",
   "from": "aws-db",
   "to": "aws-db-standby",
   "label": "replicates"
  },
  {
   "id": "aws-api-a-queue",
   "type": "aws.Connection",
   "from": "aws-api-a",
   "to": "aws-queue",
   "label": "paid order"
  },
  {
   "id": "aws-api-b-queue",
   "type": "aws.Connection",
   "from": "aws-api-b",
   "to": "aws-queue",
   "label": "paid order"
  },
  {
   "id": "aws-worker-queue",
   "type": "aws.Connection",
   "from": "aws-worker",
   "to": "aws-queue",
   "label": "claims"
  },
  {
   "id": "aws-worker-db",
   "type": "aws.Connection",
   "from": "aws-worker",
   "to": "aws-db",
   "label": "SQL"
  },
  {
   "id": "aws-worker-email",
   "type": "aws.Connection",
   "from": "aws-worker",
   "to": "aws-email",
   "label": "confirmation"
  },
  {
   "id": "aws-private-a-nat",
   "type": "aws.Connection",
   "from": "aws-private-a",
   "to": "aws-nat-a",
   "label": "outbound"
  },
  {
   "id": "aws-private-b-nat",
   "type": "aws.Connection",
   "from": "aws-private-b",
   "to": "aws-nat-b",
   "label": "outbound"
  },
  {
   "id": "aws-vpc-monitoring",
   "type": "aws.Connection",
   "from": "aws-vpc",
   "to": "aws-monitoring",
   "label": "logs, metrics"
  },
  {
   "id": "bs-e1",
   "from": "bs-shopper",
   "to": "bs-storefront",
   "label": "browses, buys",
   "weight": 2
  },
  {
   "id": "bs-e2",
   "from": "bs-storefront",
   "to": "bs-api",
   "label": "JSON over HTTPS",
   "weight": 2
  },
  {
   "id": "bs-e3",
   "from": "bs-api",
   "to": "bs-db",
   "label": "reads, writes",
   "kind": "state"
  },
  {
   "id": "bs-e4",
   "from": "bs-api",
   "to": "bs-payments",
   "label": "charges cards"
  },
  {
   "id": "bs-e5",
   "from": "bs-api",
   "to": "bs-queue",
   "label": "queues paid orders",
   "kind": "feeds"
  },
  {
   "id": "bs-e6",
   "from": "bs-queue",
   "to": "bs-worker",
   "label": "oldest first",
   "kind": "feeds"
  },
  {
   "id": "bs-e7",
   "from": "bs-worker",
   "to": "bs-warehouse",
   "label": "pick lists",
   "kind": "triggers"
  },
  {
   "id": "bs-e8",
   "from": "bs-worker",
   "to": "bs-mail",
   "label": "sends emails"
  },
  {
   "id": "bs-e9",
   "from": "bs-warehouse",
   "to": "bs-courier",
   "label": "parcels",
   "kind": "feeds"
  },
  {
   "id": "bs-e10",
   "from": "bs-staff",
   "to": "bs-warehouse",
   "label": "pick and pack"
  },
  {
   "id": "bs-e11",
   "from": "bs-hosting",
   "to": "bs-shop",
   "label": "runs"
  },
  {
   "id": "bs-e12",
   "from": "bs-plan",
   "to": "bs-hosting",
   "label": "chooses"
  }
 ],
 "views": [
  {
   "id": "overview",
   "parent": null,
   "title": "Bookshop",
   "caption": "The whole bookshop business. Double-click a card to go in: each opens a diagram of its part, and those open further.",
   "nodeIds": [
    "bs-shopper",
    "bs-staff",
    "bs-storefront",
    "bs-api",
    "bs-db",
    "bs-queue",
    "bs-worker",
    "bs-payments",
    "bs-warehouse",
    "bs-mail",
    "bs-courier",
    "bs-hosting",
    "bs-plan"
   ],
   "layout": {
    "bs-shopper": [
     0,
     0.5
    ],
    "bs-storefront": [
     1,
     0.5
    ],
    "bs-api": [
     2,
     0.5
    ],
    "bs-db": [
     3,
     0
    ],
    "bs-queue": [
     3,
     1.5
    ],
    "bs-worker": [
     4,
     1.5
    ],
    "bs-payments": [
     5,
     0
    ],
    "bs-warehouse": [
     5,
     1.5
    ],
    "bs-mail": [
     6,
     0.5
    ],
    "bs-courier": [
     6,
     1.5
    ],
    "bs-staff": [
     4,
     2.5
    ],
    "bs-hosting": [
     1,
     3
    ],
    "bs-plan": [
     0,
     3
    ]
   },
   "containers": [
    {
     "id": "bs-shop",
     "label": "Bookshop",
     "nodeIds": [
      "bs-storefront",
      "bs-api",
      "bs-db",
      "bs-queue",
      "bs-worker"
     ]
    }
   ]
  },
  {
   "id": "c4-context",
   "diagram": "c4.context",
   "title": "Bookshop: system context",
   "parent": "overview",
   "subject": "c4-bookshop",
   "nodeIds": [
    "c4-shopper",
    "c4-staff",
    "c4-bookshop",
    "c4-payments",
    "c4-mail",
    "c4-courier"
   ]
  },
  {
   "id": "shopping",
   "diagram": "uml.use-case",
   "title": "Shopping",
   "parent": "c4-context",
   "nodeIds": [
    "shopper",
    "member",
    "payment-provider",
    "bookshop",
    "browse",
    "check-out",
    "pay",
    "pay-by-card",
    "redeem-voucher",
    "gift-wrap",
    "sign-in",
    "track"
   ],
   "edges": [
    {
     "id": "member-is-shopper",
     "type": "uml.Generalization",
     "from": "member",
     "to": "shopper"
    },
    "shopper-browses",
    "shopper-checks-out",
    "member-tracks",
    "provider-takes-card",
    "checkout-includes-pay",
    "track-includes-sign-in",
    {
     "id": "card-is-pay",
     "type": "uml.Generalization",
     "from": "pay-by-card",
     "to": "pay"
    },
    "voucher-extends-checkout",
    "gift-wrap-extends-checkout"
   ]
  },
  {
   "id": "c4-containers",
   "diagram": "c4.container",
   "title": "Bookshop: containers",
   "parent": "c4-context",
   "subject": "c4-bookshop",
   "nodeIds": [
    "c4-bookshop",
    "c4-shopper",
    "c4-staff",
    "c4-storefront",
    "c4-api",
    "c4-worker",
    "c4-db",
    "c4-queue",
    "c4-payments",
    "c4-mail",
    "c4-courier"
   ]
  },
  {
   "id": "c4-components",
   "diagram": "c4.component",
   "title": "Shop API: components",
   "parent": "c4-containers",
   "subject": "c4-api",
   "nodeIds": [
    "c4-api",
    "c4-storefront",
    "c4-catalogue",
    "c4-checkout",
    "c4-accounts",
    "c4-payment-client",
    "c4-order-store",
    "c4-db",
    "c4-queue",
    "c4-payments"
   ]
  },
  {
   "id": "c4-placing-an-order",
   "diagram": "c4.dynamic",
   "title": "Placing an order",
   "parent": "c4-components",
   "subject": "c4-bookshop",
   "nodeIds": [
    "c4-shopper",
    "c4-storefront",
    "c4-api",
    "c4-payments",
    "c4-db",
    "c4-queue",
    "c4-worker",
    "c4-courier",
    "c4-mail"
   ],
   "edges": [
    "c4-shopper-storefront",
    "c4-storefront-api",
    "c4-api-payments",
    "c4-api-db",
    "c4-api-queue",
    "c4-worker-queue",
    "c4-worker-courier",
    "c4-worker-mail",
    "c4-mail-shopper",
    "c4-worker-db"
   ]
  },
  {
   "id": "buy-book",
   "diagram": "uml.interaction-overview",
   "title": "Buying a book",
   "parent": "overview",
   "direction": "down",
   "nodeIds": [
    "buy-start",
    "ref-find",
    "try-payment",
    "ref-checkout",
    "payment-ok",
    "buy-split",
    "ref-receipt",
    "sd-queue",
    "both-done",
    "buy-done"
   ]
  },
  {
   "id": "find-book",
   "diagram": "uml.sequence",
   "title": "Find a book",
   "parent": "buy-book",
   "nodeIds": [
    "lifeline-shopper",
    "lifeline-storefront",
    "lifeline-api"
   ],
   "edges": [
    {
     "id": "find-1",
     "type": "uml.Message",
     "from": "lifeline-shopper",
     "to": "lifeline-storefront",
     "label": "search(title)",
     "props": {
      "sort": "call"
     }
    },
    {
     "id": "find-2",
     "type": "uml.Message",
     "from": "lifeline-storefront",
     "to": "lifeline-api",
     "label": "findBooks(title)",
     "props": {
      "sort": "call"
     }
    },
    {
     "id": "find-3",
     "type": "uml.Message",
     "from": "lifeline-api",
     "to": "lifeline-storefront",
     "label": "books",
     "props": {
      "sort": "reply",
      "replyTo": "find-2"
     }
    },
    {
     "id": "find-4",
     "type": "uml.Message",
     "from": "lifeline-storefront",
     "to": "lifeline-shopper",
     "label": "results page",
     "props": {
      "sort": "reply",
      "replyTo": "find-1"
     }
    }
   ]
  },
  {
   "id": "buy-checkout",
   "diagram": "uml.sequence",
   "title": "Check out",
   "parent": "buy-book",
   "nodeIds": [
    "lifeline-storefront",
    "lifeline-api",
    "lifeline-payments"
   ],
   "edges": [
    {
     "id": "pay-1",
     "type": "uml.Message",
     "from": "lifeline-storefront",
     "to": "lifeline-api",
     "label": "place(order)",
     "props": {
      "sort": "call"
     }
    },
    {
     "id": "pay-2",
     "type": "uml.Message",
     "from": "lifeline-api",
     "to": "lifeline-payments",
     "label": "charge(total)",
     "props": {
      "sort": "call"
     }
    },
    {
     "id": "pay-3",
     "type": "uml.Message",
     "from": "lifeline-payments",
     "to": "lifeline-api",
     "label": "accepted or declined",
     "props": {
      "sort": "reply",
      "replyTo": "pay-2"
     }
    },
    {
     "id": "pay-4",
     "type": "uml.Message",
     "from": "lifeline-api",
     "to": "lifeline-storefront",
     "label": "result",
     "props": {
      "sort": "reply",
      "replyTo": "pay-1"
     }
    }
   ]
  },
  {
   "id": "email-receipt",
   "diagram": "uml.sequence",
   "title": "Email the receipt",
   "parent": "buy-book",
   "nodeIds": [
    "lifeline-api",
    "email",
    "lifeline-shopper"
   ],
   "edges": [
    {
     "id": "mail-1",
     "type": "uml.Message",
     "from": "lifeline-api",
     "to": "email",
     "label": "send(receipt)",
     "props": {
      "sort": "async"
     }
    },
    {
     "id": "mail-2",
     "type": "uml.Message",
     "from": "email",
     "to": "lifeline-shopper",
     "label": "receipt email",
     "props": {
      "sort": "async"
     }
    }
   ]
  },
  {
   "id": "queue-order",
   "diagram": "uml.sequence",
   "title": "Queue the order",
   "parent": "buy-book",
   "nodeIds": [
    "lifeline-api",
    "lifeline-queue",
    "lifeline-worker"
   ],
   "edges": [
    {
     "id": "queue-1",
     "type": "uml.Message",
     "from": "lifeline-api",
     "to": "lifeline-queue",
     "label": "enqueue(order)",
     "props": {
      "sort": "call"
     }
    },
    {
     "id": "queue-2",
     "type": "uml.Message",
     "from": "lifeline-queue",
     "to": "lifeline-api",
     "label": "queued",
     "props": {
      "sort": "reply",
      "replyTo": "queue-1"
     }
    },
    {
     "id": "queue-3",
     "type": "uml.Message",
     "from": "lifeline-queue",
     "to": "lifeline-worker",
     "label": "orderPlaced",
     "props": {
      "sort": "async"
     }
    }
   ]
  },
  {
   "id": "components",
   "diagram": "uml.component",
   "title": "Bookshop components",
   "parent": "overview",
   "nodeIds": [
    "storefront-component",
    "shop-api",
    "checkout-component",
    "accounts-component",
    "payment-provider-component",
    "order-worker",
    "i-orders",
    "i-sign-in",
    "shop-api-jar"
   ],
   "present": {
    "i-orders": {
     "as": "ball"
    }
   },
   "nodeOverrides": {
    "shop-api": {
     "opensView": "domain"
    }
   },
   "edges": [
    {
     "id": "api-provides-orders",
     "type": "uml.InterfaceRealization",
     "from": "shop-api.orders",
     "to": "i-orders"
    },
    "storefront-requires-orders",
    {
     "id": "accounts-provides-sign-in",
     "type": "uml.InterfaceRealization",
     "from": "accounts-component",
     "to": "i-sign-in"
    },
    "storefront-requires-sign-in",
    "api-requires-sign-in",
    "orders-to-checkout",
    "checkout-payments-out",
    "api-to-provider",
    "worker-needs-api",
    "api-jar-manifests-api"
   ]
  },
  {
   "id": "domain",
   "diagram": "uml.class",
   "title": "Sales domain",
   "parent": "components",
   "direction": "down",
   "nodeIds": [
    "sales",
    "customer",
    "order",
    "line",
    "book",
    "payable",
    "payment",
    "card-payment",
    "status",
    "money",
    "note-total"
   ],
   "layout": {
    "order": [
     1,
     0
    ]
   },
   "present": {
    "book": {
     "collapsed": [
      "operations"
     ]
    }
   }
  },
  {
   "id": "payments-only",
   "diagram": "uml.class",
   "title": "Payments only",
   "parent": "domain",
   "subject": "sales",
   "direction": "down",
   "nodeIds": [
    "order",
    "payable",
    "payment",
    "card-payment"
   ],
   "present": {
    "order": {
     "collapsed": [
      "attributes",
      "operations"
     ]
    }
   }
  },
  {
   "id": "order-life",
   "diagram": "uml.state-machine",
   "title": "An order's life",
   "parent": "domain",
   "nodeIds": [
    "created",
    "placed",
    "payment-outcome",
    "prepaid",
    "fulfilling",
    "parcel-start",
    "picking",
    "packed",
    "payment-start",
    "capturing",
    "captured",
    "ready",
    "delivery",
    "delivery-start",
    "in-transit",
    "out-for-delivery",
    "delivery-history",
    "enquiry",
    "cancelled",
    "erased",
    "delivered"
   ]
  },
  {
   "id": "snapshot",
   "diagram": "uml.object",
   "title": "Order 1042, just placed",
   "parent": "order-life",
   "direction": "down",
   "nodeIds": [
    "ada",
    "order-1042",
    "line-1",
    "line-2",
    "middlemarch",
    "frankenstein",
    "card-1"
   ]
  },
  {
   "id": "packages",
   "diagram": "uml.package",
   "title": "Bookshop packages",
   "parent": "domain",
   "direction": "down",
   "nodeIds": [
    "shared",
    "money",
    "catalog",
    "book",
    "sales",
    "customer",
    "order",
    "line",
    "status",
    "payments-package",
    "payable",
    "payment",
    "card",
    "card-payment",
    "wholesale",
    "wholesale-order",
    "conventions"
   ],
   "edges": [
    "catalog-imports-shared",
    "sales-imports-catalog",
    "sales-applies-conventions",
    "payments-accesses-shared",
    "wholesale-merges-sales",
    "sales-needs-payments"
   ]
  },
  {
   "id": "profile",
   "diagram": "uml.profile",
   "title": "Bookshop conventions profile",
   "parent": "packages",
   "direction": "down",
   "nodeIds": [
    "conventions",
    "mc-class",
    "mc-property",
    "entity",
    "aggregate-root",
    "owned",
    "column",
    "sales",
    "order"
   ]
  },
  {
   "id": "internals",
   "diagram": "uml.composite-structure",
   "title": "Inside OrderService",
   "parent": "components",
   "subject": "order-service",
   "nodeIds": [
    "order-service",
    "order-events",
    "publish-subscribe"
   ]
  },
  {
   "id": "order-flows",
   "diagram": "uml.information-flow",
   "title": "What travels with an order",
   "parent": "components",
   "nodeIds": [
    "shopper",
    "storefront-component",
    "shop-api",
    "payment-provider-component",
    "warehouse",
    "email-service",
    "order-info",
    "card-details",
    "receipt-info",
    "stock-info"
   ]
  },
  {
   "id": "er-schema",
   "diagram": "er",
   "title": "Bookshop schema",
   "parent": "overview",
   "notation": "crowsfoot",
   "nodeIds": [
    "er-customer",
    "er-order",
    "er-order_line",
    "er-book",
    "er-author",
    "er-book_author",
    "er-payment"
   ]
  },
  {
   "id": "dfd-level-1",
   "diagram": "dfd",
   "title": "Bookshop, level 1",
   "parent": "overview",
   "notation": "yourdon",
   "nodeIds": [
    "dfd-customer",
    "dfd-provider",
    "dfd-courier",
    "dfd-take-order",
    "dfd-take-payment",
    "dfd-ship-order",
    "dfd-books",
    "dfd-orders"
   ]
  },
  {
   "id": "dfd-level-2-take-order",
   "diagram": "dfd",
   "title": "1 Take order",
   "parent": "dfd-level-1",
   "notation": "yourdon",
   "nodeIds": [
    "dfd-customer",
    "dfd-books",
    "dfd-orders",
    "dfd-check-basket",
    "dfd-total-order",
    "dfd-record-order"
   ]
  },
  {
   "id": "fulfil",
   "diagram": "uml.activity",
   "title": "Fulfilling an order",
   "parent": "overview",
   "direction": "down",
   "nodeIds": [
    "lane-worker",
    "lane-warehouse",
    "lane-email",
    "start",
    "take-order",
    "order-object",
    "check-stock",
    "stock",
    "in-stock",
    "ask-restock",
    "books-arrive",
    "stock-ready",
    "split",
    "call-payment",
    "pick",
    "tell-shopper",
    "told",
    "packed-and-paid",
    "ship",
    "done"
   ]
  },
  {
   "id": "take-payment",
   "diagram": "uml.activity",
   "title": "Take payment",
   "parent": "fulfil",
   "direction": "down",
   "nodeIds": [
    "pay-start",
    "charge",
    "record",
    "pay-done"
   ]
  },
  {
   "id": "one-charge",
   "diagram": "uml.timing",
   "title": "One charge",
   "parent": "take-payment",
   "nodeIds": [
    "lifeline-worker",
    "lifeline-payments"
   ],
   "edges": [
    {
     "id": "m-charge",
     "type": "uml.Message",
     "from": "lifeline-worker",
     "to": "lifeline-payments",
     "label": "charge(total)",
     "props": {
      "sort": "call",
      "sentAt": 100,
      "receivedAt": 140
     }
    },
    {
     "id": "m-paid",
     "type": "uml.Message",
     "from": "lifeline-payments",
     "to": "lifeline-worker",
     "label": "paid",
     "props": {
      "sort": "reply",
      "replyTo": "m-charge",
      "sentAt": 720,
      "receivedAt": 760
     }
    }
   ],
   "timeline": {
    "unit": "ms",
    "changes": [
     {
      "id": "w-idle",
      "lifeline": "lifeline-worker",
      "at": 0,
      "state": "Idle"
     },
     {
      "id": "w-waiting",
      "lifeline": "lifeline-worker",
      "at": 100,
      "state": "Waiting for payment"
     },
     {
      "id": "w-recording",
      "lifeline": "lifeline-worker",
      "at": 760,
      "state": "Recording payment"
     },
     {
      "id": "w-done",
      "lifeline": "lifeline-worker",
      "at": 900,
      "state": "Idle"
     },
     {
      "id": "p-idle",
      "lifeline": "lifeline-payments",
      "at": 0,
      "state": "Idle"
     },
     {
      "id": "p-authorising",
      "lifeline": "lifeline-payments",
      "at": 140,
      "state": "Authorising"
     },
     {
      "id": "p-capturing",
      "lifeline": "lifeline-payments",
      "at": 480,
      "state": "Capturing"
     },
     {
      "id": "p-done",
      "lifeline": "lifeline-payments",
      "at": 720,
      "state": "Idle"
     }
    ],
    "constraints": [
     {
      "id": "c-wait",
      "type": "uml.DurationConstraint",
      "from": "w-waiting",
      "to": "w-recording",
      "label": "{<= 800 ms}"
     },
     {
      "id": "c-finished",
      "type": "uml.TimeConstraint",
      "from": "w-done",
      "label": "{<= 1000 ms}"
     }
    ]
   }
  },
  {
   "id": "checkout-sequence",
   "diagram": "uml.sequence",
   "title": "Checkout",
   "parent": "overview",
   "nodeIds": [
    "lifeline-shopper",
    "lifeline-storefront",
    "lifeline-api",
    "lifeline-payments",
    "receipt"
   ],
   "edges": [
    {
     "id": "m1",
     "type": "uml.Message",
     "from": "lifeline-shopper",
     "to": "lifeline-storefront",
     "label": "checkout()",
     "props": {
      "sort": "call"
     }
    },
    {
     "id": "m2",
     "type": "uml.Message",
     "from": "lifeline-storefront",
     "to": "lifeline-api",
     "label": "place(order)",
     "props": {
      "sort": "call"
     }
    },
    {
     "id": "m3",
     "type": "uml.Message",
     "from": "lifeline-api",
     "to": "lifeline-api",
     "label": "validate(order)",
     "props": {
      "sort": "call"
     }
    },
    {
     "id": "m4",
     "type": "uml.Message",
     "from": "lifeline-api",
     "to": "lifeline-payments",
     "label": "charge(total)",
     "props": {
      "sort": "call"
     }
    },
    {
     "id": "m5",
     "type": "uml.Message",
     "from": "lifeline-payments",
     "to": "lifeline-api",
     "label": "paid",
     "parent": "f1-paid",
     "props": {
      "sort": "reply",
      "replyTo": "m4"
     }
    },
    {
     "id": "m6",
     "type": "uml.Message",
     "from": "lifeline-api",
     "to": "receipt",
     "label": "new(order)",
     "parent": "f1-paid",
     "props": {
      "sort": "create"
     }
    },
    {
     "id": "m7",
     "type": "uml.Message",
     "from": "lifeline-api",
     "to": "lifeline-storefront",
     "label": "orderPlaced",
     "parent": "f2-notify",
     "props": {
      "sort": "async"
     }
    },
    {
     "id": "f3",
     "type": "uml.InteractionUse",
     "label": "Send receipt email",
     "parent": "f1-paid",
     "props": {
      "covers": [
       "lifeline-api",
       "lifeline-payments",
       "receipt"
      ]
     }
    },
    {
     "id": "m8",
     "type": "uml.Message",
     "from": "lifeline-payments",
     "to": "lifeline-api",
     "label": "declined",
     "parent": "f1-declined",
     "props": {
      "sort": "reply",
      "replyTo": "m4"
     }
    },
    {
     "id": "m9",
     "type": "uml.Message",
     "from": "lifeline-api",
     "to": "lifeline-storefront",
     "label": "result",
     "props": {
      "sort": "reply",
      "replyTo": "m2"
     }
    },
    {
     "id": "m10",
     "type": "uml.Message",
     "from": "lifeline-storefront",
     "to": "lifeline-shopper",
     "label": "confirmation page",
     "props": {
      "sort": "reply",
      "replyTo": "m1"
     }
    }
   ],
   "fragments": [
    {
     "id": "f1",
     "type": "uml.CombinedFragment",
     "props": {
      "operator": "alt"
     },
     "members": [
      {
       "id": "f1-paid",
       "type": "uml.InteractionOperand",
       "label": "payment accepted"
      },
      {
       "id": "f1-declined",
       "type": "uml.InteractionOperand",
       "label": "else"
      }
     ]
    },
    {
     "id": "f2",
     "type": "uml.CombinedFragment",
     "parent": "f1-paid",
     "props": {
      "operator": "opt"
     },
     "members": [
      {
       "id": "f2-notify",
       "type": "uml.InteractionOperand",
       "label": "shopper is still on the page"
      }
     ]
    }
   ],
   "nodeOverrides": {
    "lifeline-api": {
     "opensView": "checkout-communication"
    }
   }
  },
  {
   "id": "checkout-communication",
   "diagram": "uml.communication",
   "title": "Checkout: payment accepted",
   "parent": "checkout-sequence",
   "nodeIds": [
    "lifeline-shopper",
    "lifeline-storefront",
    "lifeline-api",
    "lifeline-payments",
    "receipt"
   ],
   "edges": [
    "shopper-storefront",
    "storefront-api",
    "api-self",
    "api-payments",
    "api-receipt",
    "cm1",
    "cm2",
    "cm3",
    "cm4",
    "cm5",
    "cm6",
    "cm7",
    "cm8",
    "cm9"
   ]
  },
  {
   "id": "order-to-shipment",
   "diagram": "bpmn",
   "title": "From order to shipment",
   "parent": "overview",
   "nodeIds": [
    "bp-shopper",
    "basket-ready",
    "place-order",
    "order-placed",
    "bp-bookshop",
    "order-received",
    "bp-take-payment",
    "payment-timeout",
    "paid",
    "not-paid",
    "cancel-order",
    "order-cancelled",
    "fork",
    "send-invoice",
    "pick-pack",
    "bp-join",
    "courier-pickup",
    "bp-ship",
    "shipping-notice",
    "order-shipped",
    "bp-payment-provider",
    "bp-order",
    "bp-stock",
    "note-card",
    "dispatch"
   ]
  },
  {
   "id": "pick-and-pack",
   "diagram": "bpmn",
   "title": "Pick and pack",
   "parent": "order-to-shipment",
   "subject": "pick-pack",
   "nodeIds": [
    "picking-starts",
    "pick-books",
    "pack-parcel",
    "parcel-packed"
   ]
  },
  {
   "id": "returns",
   "diagram": "flowchart",
   "title": "Handling a returned book",
   "parent": "overview",
   "direction": "down",
   "nodeIds": [
    "return-arrives",
    "slip",
    "key-in",
    "inspect",
    "resaleable",
    "refund",
    "wait",
    "restock",
    "stock-records",
    "letter",
    "post-back",
    "join",
    "end"
   ]
  },
  {
   "id": "c4-deployment",
   "diagram": "c4.deployment",
   "title": "Bookshop: production deployment",
   "parent": "overview",
   "nodeIds": [
    "c4-device",
    "c4-browser",
    "c4-storefront-1",
    "c4-web-host",
    "c4-docker",
    "c4-api-1",
    "c4-worker-1",
    "c4-db-host",
    "c4-postgres",
    "c4-db-1",
    "c4-queue-1"
   ]
  },
  {
   "id": "production",
   "diagram": "uml.deployment",
   "title": "Production",
   "parent": "c4-deployment",
   "nodeIds": [
    "shopper-device",
    "browser",
    "storefront-bundle",
    "edge-node",
    "edge-routes",
    "app-server",
    "jvm",
    "shop-api-jar",
    "order-worker-jar",
    "shop-api-config",
    "database",
    "queue-node",
    "shop-api",
    "order-worker"
   ],
   "edges": [
    "routes-on-edge",
    "api-jar-manifests-api",
    "worker-jar-manifests-worker",
    "config-for-api-jar",
    "device-to-edge",
    "edge-to-app",
    "app-to-database",
    "app-to-queue"
   ]
  },
  {
   "id": "mm-plan",
   "diagram": "mindmap",
   "title": "Opening the bookshop",
   "parent": "overview",
   "nodeIds": [
    "mm-opening",
    "mm-catalogue",
    "mm-first-titles",
    "mm-wholesalers",
    "mm-website",
    "mm-storefront",
    "mm-checkout",
    "mm-card-payments",
    "mm-order-emails",
    "mm-launch",
    "mm-newsletter",
    "mm-opening-offer",
    "mm-warehouse",
    "mm-shelving",
    "mm-courier",
    "mm-legal",
    "mm-company",
    "mm-bank",
    "mm-hosting",
    "mm-on-gcp",
    "mm-on-azure",
    "mm-on-aws"
   ],
   "present": {
    "mm-catalogue": {
     "side": "right"
    },
    "mm-website": {
     "side": "right"
    },
    "mm-launch": {
     "side": "right"
    },
    "mm-warehouse": {
     "side": "left"
    },
    "mm-legal": {
     "side": "left"
    },
    "mm-hosting": {
     "side": "left"
    }
   }
  },
  {
   "id": "gcp-on-gcp",
   "diagram": "gcp",
   "title": "Bookshop on Google Cloud",
   "caption": "Icons from a pack you fetch: umlimator.py pack fetch gcp, after Google's terms; glyphs and full names without it. Umlimator is not affiliated with, endorsed by or sponsored by Amazon Web Services, Google or Microsoft.",
   "parent": "mm-plan",
   "nodeIds": [
    "gcp-users",
    "gcp-project",
    "gcp-dns",
    "gcp-lb",
    "gcp-cdn",
    "gcp-assets",
    "gcp-queue",
    "gcp-region",
    "gcp-api",
    "gcp-worker",
    "gcp-network",
    "gcp-subnet",
    "gcp-zone-b",
    "gcp-db",
    "gcp-zone-c",
    "gcp-db-standby"
   ]
  },
  {
   "id": "az-on-azure",
   "diagram": "azure",
   "title": "Bookshop on Azure",
   "caption": "Icons from a pack you fetch: umlimator.py pack fetch azure, after Microsoft's terms; glyphs and full names without it. Umlimator is not affiliated with, endorsed by or sponsored by Amazon Web Services, Google or Microsoft.",
   "parent": "mm-plan",
   "nodeIds": [
    "az-subscription",
    "az-rg",
    "az-front-door",
    "az-monitor",
    "az-region",
    "az-assets",
    "az-queue",
    "az-vault",
    "az-vnet",
    "az-snet-apps",
    "az-api",
    "az-worker",
    "az-snet-data",
    "az-db"
   ]
  },
  {
   "id": "aws-on-aws",
   "diagram": "aws",
   "title": "Bookshop on AWS",
   "parent": "mm-plan",
   "nodeIds": [
    "aws-users",
    "aws-cloud",
    "aws-dns",
    "aws-cdn",
    "aws-region",
    "aws-assets",
    "aws-queue",
    "aws-email",
    "aws-monitoring",
    "aws-vpc",
    "aws-alb",
    "aws-az-a",
    "aws-public-a",
    "aws-nat-a",
    "aws-private-a",
    "aws-api-a",
    "aws-db-sg",
    "aws-db",
    "aws-az-b",
    "aws-public-b",
    "aws-nat-b",
    "aws-private-b",
    "aws-api-b",
    "aws-worker",
    "aws-db-standby"
   ]
  }
 ],
 "iconPacks": {
  "gcp": "2026-11-14",
  "azure": "V25",
  "aws": "2026-07-31"
 }
}
