{
  "schema_version": 1,
  "diagram_type": "sequence",
  "meta": {
    "title": "iSpeed.my — Profile & Settings Flow",
    "subtitle": "Profile retrieval and update with declarations",
    "output": "ispeed-profile-settings.html",
    "viewBox": [1080, 590],
    "column_fit": "spread",
    "animation": "trace",
    "quality_profile": "showcase",
    "views": [
      { "id": "retrieve", "label": "Retrieve Profile", "focus": ["user", "app", "mobile-api", "vbroker"], "note": "Load profile with declarations" },
      { "id": "update", "label": "Update Profile", "focus": ["app", "mobile-api", "vbroker", "profile-db"], "note": "Address/contact update persistence" },
      { "id": "full-flow", "label": "Full Flow", "focus": ["user", "app", "mobile-api", "vbroker", "profile-db"], "note": "Complete profile lifecycle" }
    ]
  },
  "participants": [
    { "id": "user", "type": "external", "label": "User", "sublabel": "Customer" },
    { "id": "app", "type": "frontend", "label": "React Native App", "sublabel": "Expo SDK 56" },
    { "id": "mobile-api", "type": "backend", "label": "Mobile API", "sublabel": "rt-mx-mobile-api" },
    { "id": "vbroker", "type": "backend", "label": "VBroker API", "sublabel": "/customer" },
    { "id": "profile-db", "type": "database", "label": "Profile DB", "sublabel": "vb_customer_*" }
  ],
  "segments": [
    { "from": 150, "to": 295, "label": "Retrieve" },
    { "from": 305, "to": 535, "label": "Update" }
  ],
  "messages": [
    { "id": "ps1", "from": "user", "to": "app", "y": 160, "label": "Open profile", "variant": "default" },
    { "id": "ps2", "from": "app", "to": "mobile-api", "y": 190, "label": "RetrieveProfile (12420)", "variant": "emphasis" },
    { "id": "ps3", "from": "mobile-api", "to": "vbroker", "y": 220, "label": "/customer/profile", "variant": "default" },
    { "id": "ps4", "from": "vbroker", "to": "mobile-api", "y": 250, "label": "profile + declarations", "variant": "return" },
    { "id": "ps5", "from": "mobile-api", "to": "app", "y": 280, "label": "profile", "variant": "return" },
    { "id": "ps6", "from": "user", "to": "app", "y": 310, "label": "Edit address + save", "variant": "default" },
    { "id": "ps7", "from": "app", "to": "mobile-api", "y": 340, "label": "UpdateProfile (12423)", "variant": "emphasis" },
    { "id": "ps8", "from": "mobile-api", "to": "vbroker", "y": 370, "label": "/customer/update", "variant": "default" },
    { "id": "ps9", "from": "vbroker", "to": "profile-db", "y": 400, "label": "update vb_customer_address", "variant": "default" },
    { "id": "ps10", "from": "vbroker", "to": "mobile-api", "y": 430, "label": "updated", "variant": "return" },
    { "id": "ps11", "from": "mobile-api", "to": "app", "y": 460, "label": "success", "variant": "return" },
    { "id": "ps12", "from": "app", "to": "user", "y": 490, "label": "Show saved", "variant": "return" }
  ],
  "activations": [
    { "participant": "app", "from": 155, "to": 500, "type": "frontend" },
    { "participant": "mobile-api", "from": 185, "to": 475, "type": "backend" },
    { "participant": "vbroker", "from": 215, "to": 440, "type": "backend" },
    { "participant": "profile-db", "from": 395, "to": 410, "type": "database" }
  ],
  "cards": [
    {
      "dot": "emerald",
      "title": "Profile Model",
      "items": [
        "custAddr, custJob, custSpouse, custNok",
        "custBank, custAccount",
        "Declarations: W8BEN, FATCA, PEP, cross-selling"
      ]
    },
    {
      "dot": "violet",
      "title": "Storage",
      "items": [
        "vb_customer_address, vb_customer_job, vb_customer_nok",
        "vb_customer_bank, vb_customer_acct",
        "Pending changes in vb_customer_change_rqs"
      ]
    },
    {
      "dot": "cyan",
      "title": "Settings",
      "items": [
        "Mail/SMS settings and market feed subscription",
        "FT remind-me updates /reminder/update",
        "Menu sort and font size are local-only"
      ]
    }
  ]
}
