{
  "schema_version": 1,
  "diagram_type": "architecture",
  "meta": {
    "title": "SSA: B dự phòng, chưa được chọn",
    "quality_profile": "showcase",
    "viewBox": [
      850,
      446
    ],
    "output": "docs/ssa-miniapp/archify/hybrid.html",
    "repository": {
      "url": "git@github.com:skan2026/ssa.git",
      "revision": "05bb7ca2dfe249d1bfb325b901ee8d7d2958d19e",
      "link_mode": "local-only"
    }
  },
  "components": [
    {
      "id": "zalo-client",
      "type": "frontend",
      "label": "Zalo Mini App",
      "sublabel": "Bundle phát hành qua Zalo",
      "pos": [
        36,
        94
      ],
      "size": [
        166,
        65
      ],
      "sources": [
        {
          "path": "docs/ssa-miniapp/PLAN.md",
          "line": 128,
          "end_line": 134
        }
      ]
    },
    {
      "id": "vn-origin",
      "type": "backend",
      "label": "API tại Việt Nam",
      "sublabel": "Node / TypeScript / TLS tại VN",
      "pos": [
        342,
        94
      ],
      "size": [
        166,
        65
      ],
      "sources": [
        {
          "path": "docs/ssa-miniapp/PLAN.md",
          "line": 128,
          "end_line": 134
        }
      ]
    },
    {
      "id": "vn-postgres",
      "type": "database",
      "label": "PostgreSQL tại VN",
      "sublabel": "Quyền / outbox / giao dịch",
      "pos": [
        648,
        94
      ],
      "size": [
        166,
        65
      ],
      "sources": [
        {
          "path": "docs/ssa-miniapp/PLAN.md",
          "line": 128,
          "end_line": 134
        }
      ]
    },
    {
      "id": "vn-jobs",
      "type": "messagebus",
      "label": "Jobs tại Việt Nam",
      "sublabel": "Lease / retry / gửi có quyền",
      "pos": [
        342,
        317
      ],
      "size": [
        166,
        65
      ],
      "sources": [
        {
          "path": "docs/ssa-miniapp/PLAN.md",
          "line": 128,
          "end_line": 134
        }
      ]
    },
    {
      "id": "vn-objects",
      "type": "cloud",
      "label": "Files / backup tại VN",
      "sublabel": "Cam kết nơi lưu / restore",
      "pos": [
        648,
        317
      ],
      "size": [
        166,
        65
      ],
      "sources": [
        {
          "path": "docs/ssa-miniapp/PLAN.md",
          "line": 128,
          "end_line": 134
        }
      ]
    }
  ],
  "connections": [
    {
      "id": "zalo-client-to-vn-origin",
      "from": "zalo-client",
      "to": "vn-origin",
      "label": "HTTPS trực tiếp"
    },
    {
      "id": "vn-origin-to-vn-postgres",
      "from": "vn-origin",
      "to": "vn-postgres",
      "label": "SQL / atomic"
    },
    {
      "id": "vn-origin-to-vn-jobs",
      "from": "vn-postgres",
      "to": "vn-jobs",
      "label": "Đọc outbox",
      "labelDy": 79
    },
    {
      "id": "vn-jobs-to-vn-objects",
      "from": "vn-jobs",
      "to": "vn-objects",
      "label": "Private objects"
    }
  ],
  "cards": [
    {
      "dot": "amber",
      "title": "Phương án B dự phòng",
      "items": [
        "Cần SSA chấp thuận thay đổi hạ tầng.",
        "Chưa lựa chọn nhà cung cấp Việt Nam."
      ]
    },
    {
      "dot": "cyan",
      "title": "Ranh giới Cloudflare",
      "items": [
        "DNS-only cho hostname API.",
        "Public assets không chứa dữ liệu cá nhân."
      ]
    },
    {
      "dot": "emerald",
      "title": "Hồ sơ xử lý",
      "items": [
        "Rà soát TLS, logs, IP và nhà cung cấp tin.",
        "DB tại VN sau Worker toàn cầu chưa đủ."
      ]
    }
  ]
}
