{
  "schema_version": 1,
  "diagram_type": "dataflow",
  "meta": {
    "title": "Bambu Print Monitor — Data and Evidence Flow",
    "animation": "trace",
    "quality_profile": "showcase",
    "viewBox": [1450, 760],
    "views": [
      {
        "id": "observation-path",
        "label": "Observation path",
        "focus": ["cloud", "camera", "printguard", "lifecycle"],
        "note": "Cloud lifecycle reads and an independent camera feed converge only at local read-only monitoring."
      },
      {
        "id": "private-evidence",
        "label": "Private evidence",
        "focus": ["lifecycle", "evidence", "publisher"],
        "note": "Redacted observations and bounded JPEG evidence feed authenticated publication."
      },
      {
        "id": "two-consumers",
        "label": "Two consumers",
        "focus": ["d1", "site", "bridge", "telegram"],
        "note": "Public status and private human review are separate downstream paths with different gates."
      }
    ]
  },
  "stages": [
    { "label": "Sources" },
    { "label": "Observe" },
    { "label": "Record" },
    { "label": "Publish" },
    { "label": "Consume" }
  ],
  "nodes": [
    { "id": "cloud", "type": "cloud", "label": "Bambu Cloud", "stage": 0, "row": 0, "tag": "RUNNING only" },
    { "id": "camera", "type": "external", "label": "Tapo C210", "stage": 0, "row": 2, "tag": "visual / RTSP" },
    { "id": "lifecycle", "type": "backend", "label": "Lifecycle Monitor", "stage": 1, "row": 0, "tag": "redacted / 5s" },
    { "id": "printguard", "type": "backend", "label": "PrintGuard", "stage": 1, "row": 2, "tag": "loopback :8000" },
    { "id": "evidence", "type": "database", "label": "Evidence Bundle", "stage": 2, "row": 1, "tag": "JPEG + NDJSON" },
    { "id": "publisher", "type": "backend", "label": "Status Publisher", "stage": 3, "row": 0, "tag": "privacy + ingest" },
    { "id": "d1", "type": "database", "label": "Cloudflare D1", "stage": 3, "row": 2, "tag": "current + last" },
    { "id": "bridge", "type": "security", "label": "Defect Bridge", "stage": 3, "row": 4, "tag": "claim once" },
    { "id": "site", "type": "frontend", "label": "print.arrgee.org", "stage": 4, "row": 0, "tag": "public GET / HEAD" },
    { "id": "telegram", "type": "external", "label": "Telegram", "stage": 4, "row": 3, "tag": "private JPEG" }
  ],
  "flows": [
    { "id": "cloud-lifecycle", "from": "cloud", "to": "lifecycle", "label": "RUNNING + hash", "classification": "fresh observation", "variant": "emphasis", "labelAt": [208, 200] },
    { "id": "camera-printguard", "from": "camera", "to": "printguard", "label": "RTSP /stream2", "classification": "visual source", "variant": "default" },
    { "id": "printguard-lifecycle", "from": "printguard", "to": "lifecycle", "label": "loopback frame + score", "classification": "local read-only", "variant": "default", "route": "vertical-channel" },
    { "id": "lifecycle-evidence", "from": "lifecycle", "to": "evidence", "label": "5s redacted log + JPEG", "classification": "private evidence", "variant": "emphasis" },
    { "id": "lifecycle-publisher", "from": "lifecycle", "to": "publisher", "label": "redacted current status", "classification": "status contract", "variant": "dashed", "route": "straight" },
    { "id": "evidence-publisher", "from": "evidence", "to": "publisher", "label": "selected JPEG + sealed manifest", "classification": "protected evidence", "variant": "dashed", "labelAt": [638, 200] },
    { "id": "publisher-d1", "from": "publisher", "to": "d1", "label": "bearer ingest", "classification": "write path", "variant": "security", "labelDy": 90 },
    { "id": "d1-site", "from": "d1", "to": "site", "label": "current + last slots", "classification": "public read-only", "variant": "emphasis" },
    { "id": "printguard-bridge", "from": "printguard", "to": "bridge", "label": "alert + matching snapshot", "classification": "validated defect only", "variant": "security" },
    { "id": "bridge-telegram", "from": "bridge", "to": "telegram", "label": "exact alert + media", "classification": "human review", "variant": "security" }
  ]
}
