{
  "schema_version": 1,
  "diagram_type": "sequence",
  "meta": {
    "title": "iSpeed.my — Signup & eKYC Flow",
    "subtitle": "Web registration with identity and face verification",
    "output": "ispeed-signup-ekyc.html",
    "viewBox": [1080, 710],
    "column_fit": "spread",
    "animation": "trace",
    "quality_profile": "showcase",
    "views": [
      { "id": "registration", "label": "Registration", "focus": ["applicant", "web", "web-api", "vbroker"], "note": "Availability checks and signup steps" },
      { "id": "ekyc", "label": "eKYC", "focus": ["web", "web-api", "ekyc", "vbroker"], "note": "Document, face, and scorecard verification" },
      { "id": "full-flow", "label": "Full Flow", "focus": ["applicant", "web", "web-api", "vbroker", "ekyc"], "note": "Complete onboarding lifecycle" }
    ]
  },
  "participants": [
    { "id": "applicant", "type": "external", "label": "Applicant", "sublabel": "Browser" },
    { "id": "web", "type": "frontend", "label": "Register Page", "sublabel": "/register" },
    { "id": "web-api", "type": "backend", "label": "Web API", "sublabel": "rt-mx-web-api" },
    { "id": "vbroker", "type": "backend", "label": "VBroker API", "sublabel": "/account/signup" },
    { "id": "ekyc", "type": "external", "label": "MX EKYC", "sublabel": "mx-ekyc service" }
  ],
  "segments": [
    { "from": 150, "to": 295, "label": "Registration" },
    { "from": 305, "to": 655, "label": "eKYC Verification" }
  ],
  "messages": [
    { "id": "s1", "from": "applicant", "to": "web", "y": 160, "label": "Open /register", "variant": "default" },
    { "id": "s2", "from": "web", "to": "web-api", "y": 190, "label": "EmailAvailability", "variant": "default" },
    { "id": "s3", "from": "web-api", "to": "vbroker", "y": 220, "label": "/customer/email_available", "variant": "default" },
    { "id": "s4", "from": "web", "to": "web-api", "y": 250, "label": "Signup1 (identity)", "variant": "emphasis" },
    { "id": "s5", "from": "web-api", "to": "vbroker", "y": 280, "label": "/account/signup1", "variant": "default" },
    { "id": "s6", "from": "web", "to": "web-api", "y": 310, "label": "ValidateDocument", "variant": "default" },
    { "id": "s7", "from": "web-api", "to": "ekyc", "y": 340, "label": "ValidateIdentificationImage", "variant": "emphasis" },
    { "id": "s8", "from": "ekyc", "to": "web-api", "y": 370, "label": "journeyId + OCR", "variant": "return" },
    { "id": "s9", "from": "web", "to": "web-api", "y": 400, "label": "EvaluateFaceImage", "variant": "default" },
    { "id": "s10", "from": "web-api", "to": "ekyc", "y": 430, "label": "ValidatePortrait", "variant": "emphasis" },
    { "id": "s11", "from": "web-api", "to": "vbroker", "y": 460, "label": "/account/ekyc/updateokfl", "variant": "default" },
    { "id": "s12", "from": "web", "to": "web-api", "y": 490, "label": "RetrieveScoreCard", "variant": "default" },
    { "id": "s13", "from": "web-api", "to": "ekyc", "y": 520, "label": "RetrieveScoreCard", "variant": "emphasis" },
    { "id": "s14", "from": "web-api", "to": "vbroker", "y": 550, "label": "/account/ekyc/updatescorecard", "variant": "default" },
    { "id": "s15", "from": "vbroker", "to": "web-api", "y": 580, "label": "ekyc_done = true", "variant": "return" },
    { "id": "s16", "from": "web-api", "to": "web", "y": 610, "label": "Signup complete", "variant": "return" }
  ],
  "activations": [
    { "participant": "web", "from": 155, "to": 615, "type": "frontend" },
    { "participant": "web-api", "from": 185, "to": 615, "type": "backend" },
    { "participant": "vbroker", "from": 215, "to": 585, "type": "backend" },
    { "participant": "ekyc", "from": 335, "to": 375, "type": "external" }
  ],
  "cards": [
    {
      "dot": "emerald",
      "title": "Web-Only Signup",
      "items": [
        "Mobile app just opens EXPO_PUBLIC_SIGN_UP_URL",
        "Register page drives 23 SignupController endpoints",
        "Signup routes through vbroker, not ORS"
      ]
    },
    {
      "dot": "violet",
      "title": "eKYC Chain",
      "items": [
        "MX EKYC validates ID image and portrait",
        "Results stored in vb_ekyc_customer / vb_ekyc_document",
        "Scorecard sets vb_customer.ekyc_done"
      ]
    },
    {
      "dot": "orange",
      "title": "Config Gap",
      "items": [
        "vbAPI.signup3 missing from active config.properties",
        "Only present in per-environment .exclude variants",
        "Signup3Service cannot resolve endpoint by default"
      ]
    }
  ]
}
