{
  "schema_version": 1,
  "diagram_type": "architecture",
  "meta": {
    "title": "SSA: audit và phục hồi",
    "quality_profile": "showcase",
    "viewBox": [
      850,
      446
    ],
    "output": "docs/ssa-miniapp/archify/audit.html",
    "repository": {
      "url": "git@github.com:skan2026/ssa.git",
      "revision": "05bb7ca2dfe249d1bfb325b901ee8d7d2958d19e",
      "link_mode": "local-only"
    }
  },
  "components": [
    {
      "id": "business-command",
      "type": "backend",
      "label": "Lệnh nghiệp vụ",
      "sublabel": "Actor / role / request ID",
      "pos": [
        36,
        94
      ],
      "size": [
        166,
        65
      ],
      "sources": [
        {
          "path": "docs/ssa-miniapp/PLAN.md",
          "line": 447,
          "end_line": 505
        }
      ]
    },
    {
      "id": "atomic-record",
      "type": "database",
      "label": "Commit giao dịch",
      "sublabel": "Dữ liệu + audit + outbox",
      "pos": [
        342,
        94
      ],
      "size": [
        166,
        65
      ],
      "sources": [
        {
          "path": "docs/ssa-miniapp/PLAN.md",
          "line": 447,
          "end_line": 505
        }
      ]
    },
    {
      "id": "ops-observe",
      "type": "security",
      "label": "Theo dõi vận hành",
      "sublabel": "Event ID / cảnh báo đã lọc",
      "pos": [
        648,
        94
      ],
      "size": [
        166,
        65
      ],
      "sources": [
        {
          "path": "docs/ssa-miniapp/PLAN.md",
          "line": 447,
          "end_line": 505
        }
      ]
    },
    {
      "id": "incident-owner",
      "type": "external",
      "label": "Người trực xử lý",
      "sublabel": "Runbook / phạm vi ảnh hưởng",
      "pos": [
        648,
        317
      ],
      "size": [
        166,
        65
      ],
      "sources": [
        {
          "path": "docs/ssa-miniapp/PLAN.md",
          "line": 447,
          "end_line": 505
        }
      ]
    },
    {
      "id": "isolated-restore",
      "type": "database",
      "label": "Restore cách ly",
      "sublabel": "Đối soát / replay hợp lệ",
      "pos": [
        342,
        317
      ],
      "size": [
        166,
        65
      ],
      "sources": [
        {
          "path": "docs/ssa-miniapp/PLAN.md",
          "line": 447,
          "end_line": 505
        }
      ]
    },
    {
      "id": "release-approval",
      "type": "security",
      "label": "Xác nhận phục hồi",
      "sublabel": "RPO / RTO đo thực tế",
      "pos": [
        36,
        317
      ],
      "size": [
        166,
        65
      ],
      "sources": [
        {
          "path": "docs/ssa-miniapp/PLAN.md",
          "line": 447,
          "end_line": 505
        }
      ]
    }
  ],
  "connections": [
    {
      "id": "business-command-to-atomic-record",
      "from": "business-command",
      "to": "atomic-record",
      "label": "Transaction"
    },
    {
      "id": "atomic-record-to-ops-observe",
      "from": "atomic-record",
      "to": "ops-observe",
      "label": "Sự kiện đã commit"
    },
    {
      "id": "ops-observe-to-incident-owner",
      "from": "ops-observe",
      "to": "incident-owner",
      "label": "Alert / escalation",
      "labelDy": 79
    },
    {
      "id": "incident-owner-to-isolated-restore",
      "from": "incident-owner",
      "to": "isolated-restore",
      "label": "Backup độc lập"
    },
    {
      "id": "isolated-restore-to-release-approval",
      "from": "isolated-restore",
      "to": "release-approval",
      "label": "Evidence / ký duyệt"
    }
  ],
  "cards": [
    {
      "dot": "amber",
      "title": "Đề xuất, chưa đo",
      "items": [
        "RPO ≤24 giờ; RTO ≤4 giờ.",
        "Diễn tập T12 trước go-live."
      ]
    },
    {
      "dot": "cyan",
      "title": "Không lộ nội dung",
      "items": [
        "Không log token, raw phone, phiếu trẻ.",
        "Audit tối thiểu, quyền đọc tách riêng."
      ]
    },
    {
      "dot": "emerald",
      "title": "Rollback đúng phạm vi",
      "items": [
        "Import: đổi generation, giữ orders / consent.",
        "DB: replay ledger xóa / thu hồi quyền."
      ]
    }
  ]
}
