{
  "title": "SaaS Platform Architecture",
  "description": "Follow a request from the browser to durable data, then into independent background delivery.",
  "graph": {
    "direction": "LR",
    "nodes": [
      {
        "id": "browser",
        "type": "terminal",
        "label": "Browser",
        "description": "Starts a secure session and loads the application. This is an authored reference architecture, not a capture of a deployed platform.",
        "group": "",
        "groupId": "experience",
        "category": "frontend",
        "position": {
          "x": 80,
          "y": 280
        },
        "basis": "unknown",
        "sources": [
          {
            "repository": "",
            "path": "",
            "revision": "",
            "note": "Authored reference design for Mapfable Showcase. Components describe a coherent illustrative platform; no production telemetry or deployment verification is claimed."
          }
        ]
      },
      {
        "id": "web",
        "type": "process",
        "label": "Web application",
        "description": "Renders the interface and sends authenticated API requests. Long-running work is accepted without blocking the page.",
        "group": "",
        "groupId": "experience",
        "category": "frontend",
        "position": {
          "x": 80,
          "y": 560
        },
        "basis": "unknown",
        "sources": []
      },
      {
        "id": "gateway",
        "type": "process",
        "label": "API gateway",
        "description": "Authenticates incoming requests, applies limits and routes accepted traffic to the application service.",
        "group": "",
        "groupId": "application",
        "category": "backend",
        "position": {
          "x": 480,
          "y": 280
        },
        "basis": "unknown",
        "sources": []
      },
      {
        "id": "core",
        "type": "process",
        "label": "Application API",
        "description": "Applies domain rules. Reads the cache, commits authoritative records and submits durable background work.",
        "group": "",
        "groupId": "application",
        "category": "backend",
        "position": {
          "x": 480,
          "y": 560
        },
        "basis": "unknown",
        "sources": []
      },
      {
        "id": "audit",
        "type": "datastore",
        "label": "Audit log",
        "description": "Stores security-relevant actions and request identifiers for later investigation.",
        "group": "",
        "groupId": "application",
        "category": "database",
        "position": {
          "x": 480,
          "y": 840
        },
        "basis": "unknown",
        "sources": []
      },
      {
        "id": "queue",
        "type": "process",
        "label": "Work queue",
        "description": "Buffers accepted jobs so workers can retry independently. Acknowledgement follows successful processing.",
        "group": "",
        "groupId": "async",
        "category": "backend",
        "position": {
          "x": 1280,
          "y": 280
        },
        "basis": "unknown",
        "sources": []
      },
      {
        "id": "worker",
        "type": "process",
        "label": "Background worker",
        "description": "Consumes queued jobs, produces files and requests an email after the work completes. Job identifiers make repeated delivery safe.",
        "group": "",
        "groupId": "async",
        "category": "backend",
        "position": {
          "x": 1280,
          "y": 560
        },
        "basis": "unknown",
        "sources": []
      },
      {
        "id": "email",
        "type": "io",
        "label": "Email provider",
        "description": "Delivers the completion message through an external provider. Provider delivery does not determine the original request outcome.",
        "group": "",
        "groupId": "async",
        "category": "external",
        "position": {
          "x": 1280,
          "y": 840
        },
        "basis": "unknown",
        "sources": []
      },
      {
        "id": "cache",
        "type": "datastore",
        "label": "Redis cache",
        "description": "Holds short-lived read models. A cache miss falls back to the authoritative database; cache content is replaceable.",
        "group": "",
        "groupId": "data",
        "category": "database",
        "position": {
          "x": 880,
          "y": 280
        },
        "basis": "unknown",
        "sources": []
      },
      {
        "id": "database",
        "type": "datastore",
        "label": "PostgreSQL",
        "description": "Owns transactional application state. The cache is an optimization, never the sole source of durable data.",
        "group": "",
        "groupId": "data",
        "category": "database",
        "position": {
          "x": 880,
          "y": 560
        },
        "basis": "unknown",
        "sources": []
      },
      {
        "id": "objects",
        "type": "datastore",
        "label": "Object storage",
        "description": "Stores files produced by the worker. The application database retains the corresponding metadata.",
        "group": "",
        "groupId": "data",
        "category": "database",
        "position": {
          "x": 880,
          "y": 840
        },
        "basis": "unknown",
        "sources": []
      }
    ],
    "edges": [
      {
        "id": "load",
        "source": "browser",
        "target": "web",
        "label": "Load app",
        "description": "",
        "sourceHandle": "bottom",
        "targetHandle": "top",
        "basis": "unknown",
        "sources": []
      },
      {
        "id": "https",
        "source": "web",
        "target": "gateway",
        "label": "HTTPS",
        "description": "",
        "sourceHandle": "right",
        "targetHandle": "left",
        "basis": "unknown",
        "sources": []
      },
      {
        "id": "route",
        "source": "gateway",
        "target": "core",
        "label": "Authorized",
        "description": "",
        "sourceHandle": "bottom",
        "targetHandle": "top",
        "basis": "unknown",
        "sources": []
      },
      {
        "id": "cache-read",
        "source": "core",
        "target": "cache",
        "label": "Read model",
        "description": "",
        "sourceHandle": "right",
        "targetHandle": "left",
        "labelOffset": {
          "x": 0,
          "y": -40
        },
        "basis": "unknown",
        "sources": []
      },
      {
        "id": "persist",
        "source": "core",
        "target": "database",
        "label": "Read / commit",
        "description": "",
        "sourceHandle": "right",
        "targetHandle": "left",
        "basis": "unknown",
        "sources": []
      },
      {
        "id": "audit-write",
        "source": "core",
        "target": "audit",
        "label": "Record action",
        "description": "",
        "sourceHandle": "bottom",
        "targetHandle": "top",
        "basis": "unknown",
        "sources": []
      },
      {
        "id": "enqueue",
        "source": "core",
        "target": "queue",
        "label": "Enqueue job",
        "description": "",
        "sourceHandle": "right",
        "targetHandle": "left",
        "basis": "unknown",
        "sources": []
      },
      {
        "id": "consume",
        "source": "queue",
        "target": "worker",
        "label": "Consume",
        "description": "",
        "sourceHandle": "bottom",
        "targetHandle": "top",
        "basis": "unknown",
        "sources": []
      },
      {
        "id": "files",
        "source": "worker",
        "target": "objects",
        "label": "Write file",
        "description": "",
        "sourceHandle": "left",
        "targetHandle": "right",
        "basis": "unknown",
        "sources": []
      },
      {
        "id": "notify",
        "source": "worker",
        "target": "email",
        "label": "Notify",
        "description": "",
        "sourceHandle": "bottom",
        "targetHandle": "top",
        "basis": "unknown",
        "sources": []
      }
    ],
    "groups": [
      {
        "id": "experience",
        "label": "Client experience",
        "description": "The browser and the application interface."
      },
      {
        "id": "application",
        "label": "Application services",
        "description": "Request routing, domain rules and durable audit records."
      },
      {
        "id": "async",
        "label": "Background delivery",
        "description": "Durable work is decoupled from the interactive request."
      },
      {
        "id": "data",
        "label": "Data & storage",
        "description": "Fast reads, authoritative records and generated files."
      }
    ]
  },
  "investigation": null
}
