Orreryexamples

Examples

Every example, rendered.

These are the 43 example models in the Orrery repository, each drawn by the tool. Every one has three tabs: the picture as an image tag shows it, the same SVG inline, and the JSON it was drawn from.

Whole models

Four models, start to finish

The checkout used on the front page, Orrery drawn in Orrery, and two small ones to start from.

Checkout 8 components · 8 connections · direction down

Checkout

Plain image tag: this is what a README shows. Script and pointer events are stripped, animation is not. Open interactive — the same file as a document: outline, click to fail, scenarios, views.

Checkout Data Session cache writes Storefront Checkout API Orders DB Read replica
{
  "$schema": "https://raw.githubusercontent.com/adamgilman/Orrery/main/packages/core/schema/v1.json",
  "title": "Checkout",
  "direction": "down",
  "kinds": {
    "use": [
      "aws"
    ]
  },
  "groups": [
    {
      "id": "data",
      "label": "Data",
      "kind": "tier"
    },
    {
      "id": "sessions",
      "label": "Session cache",
      "kind": "cluster",
      "parent": "data"
    },
    {
      "id": "cache-a",
      "label": "Node A",
      "kind": "cluster",
      "parent": "sessions"
    },
    {
      "id": "cache-b",
      "label": "Node B",
      "kind": "cluster",
      "parent": "sessions"
    }
  ],
  "components": [
    {
      "id": "web",
      "label": "Storefront",
      "kind": "client"
    },
    {
      "id": "api",
      "label": "Checkout API",
      "kind": "aws:fargate"
    },
    {
      "id": "db",
      "label": "Orders DB",
      "kind": "aws:rds",
      "group": "data"
    },
    {
      "id": "replica",
      "label": "Read replica",
      "kind": "aws:rds",
      "group": "data"
    },
    {
      "id": "redis-a",
      "label": "Redis",
      "kind": "aws:elasticache",
      "group": "cache-a"
    },
    {
      "id": "aof-a",
      "label": "Append-only file",
      "kind": "aws:s3",
      "group": "cache-a"
    },
    {
      "id": "redis-b",
      "label": "Redis",
      "kind": "aws:elasticache",
      "group": "cache-b"
    },
    {
      "id": "aof-b",
      "label": "Append-only file",
      "kind": "aws:s3",
      "group": "cache-b"
    }
  ],
  "connections": [
    {
      "from": "web",
      "to": "api",
      "load": 0.8
    },
    {
      "from": "api",
      "to": "db",
      "load": 0.6,
      "label": "writes"
    },
    {
      "id": "failover",
      "from": "api",
      "to": "replica",
      "load": 0
    },
    {
      "from": "db",
      "to": "replica",
      "kind": "replication",
      "load": 0.2
    },
    {
      "from": "api",
      "to": "sessions",
      "load": 0.5
    },
    {
      "from": "redis-a",
      "to": "aof-a",
      "kind": "dataflow",
      "load": 0.3
    },
    {
      "from": "redis-b",
      "to": "aof-b",
      "kind": "dataflow",
      "load": 0.3
    },
    {
      "from": "cache-a",
      "to": "cache-b",
      "kind": "replication",
      "load": 0.2
    }
  ],
  "views": [
    {
      "id": "overview",
      "title": "Overview",
      "collapse": [
        "sessions",
        "cache-a",
        "cache-b"
      ]
    },
    {
      "id": "data",
      "title": "Data tier",
      "scope": "data",
      "direction": "down",
      "collapse": [
        "sessions"
      ]
    },
    {
      "id": "checkout-seq",
      "type": "sequence",
      "title": "A customer checks out",
      "description": "The happy path: the storefront calls the API, the API writes the order and clears the session.",
      "messages": [
        {
          "from": "web",
          "to": "api",
          "text": "POST /checkout"
        },
        {
          "from": "api",
          "to": "sessions",
          "text": "read cart"
        },
        {
          "from": "api",
          "to": "db",
          "text": "insert order"
        },
        {
          "from": "db",
          "to": "api",
          "text": "ok",
          "reply": true
        },
        {
          "from": "api",
          "to": "sessions",
          "text": "clear cart"
        },
        {
          "from": "api",
          "to": "web",
          "text": "201 Created",
          "reply": true
        }
      ]
    }
  ],
  "scenarios": [
    {
      "id": "db-fails",
      "label": "Primary fails",
      "steps": [
        {
          "note": "Orders DB goes down",
          "set": {
            "failed": "db",
            "degraded": {
              "api": "reads from the replica; writes are queued",
              "web": "checkout is slower"
            }
          },
          "load": [
            {
              "id": "failover",
              "load": 0.6
            }
          ],
          "callouts": [
            {
              "at": "replica",
              "text": "Reads move to the replica; writes queue until the primary is back"
            }
          ]
        }
      ]
    },
    {
      "id": "redis-fails",
      "label": "A cache process dies",
      "steps": [
        {
          "note": "Redis on node A dies",
          "set": {
            "failed": {
              "redis-a": "out of memory",
              "cache-a": "its process is down"
            },
            "degraded": {
              "sessions": "one node left",
              "api": "sessions load slowly"
            }
          },
          "load": [
            {
              "from": "cache-a",
              "to": "cache-b",
              "load": 0
            }
          ],
          "callouts": [
            {
              "at": "cache-a",
              "text": "One node left; sessions load slowly until it is back"
            }
          ]
        }
      ]
    }
  ],
  "tour": {
    "seconds": 4,
    "scenes": [
      {
        "view": "overview",
        "note": "The whole system. The session cache is one box."
      },
      {
        "view": "overview",
        "open": [
          "sessions"
        ],
        "note": "Open the session cache. The picture reflows; you still see everything."
      },
      {
        "view": "overview",
        "open": [
          "sessions",
          "cache-a",
          "cache-b"
        ],
        "note": "Open both nodes too. Still the whole system."
      },
      {
        "view": "overview",
        "open": [
          "sessions",
          "cache-a",
          "cache-b"
        ],
        "zoom": "cache-a",
        "note": "Zoom in on node A: a Redis process and its append-only file."
      },
      {
        "view": "overview",
        "open": [
          "sessions",
          "cache-a",
          "cache-b"
        ],
        "zoom": "cache-a",
        "scenario": "redis-fails",
        "step": 1,
        "note": "Redis dies. The step marks the node failed and the cluster and API degraded."
      },
      {
        "view": "overview",
        "open": [
          "sessions",
          "cache-a",
          "cache-b"
        ],
        "scenario": "redis-fails",
        "step": 1,
        "note": "Zoom out. Everything is still open; the states are where they were put."
      },
      {
        "view": "overview",
        "scenario": "redis-fails",
        "step": 1,
        "note": "Close it all. The closed boxes carry the state."
      }
    ]
  },
  "exports": [
    {
      "id": "overview"
    },
    {
      "id": "primary-fails",
      "play": "db-fails"
    },
    {
      "id": "primary-failed",
      "scenario": "db-fails",
      "step": 1
    },
    {
      "id": "inside-the-cache",
      "open": [
        "sessions"
      ]
    },
    {
      "id": "inside-node-a",
      "open": [
        "sessions",
        "cache-a"
      ],
      "zoom": "cache-a"
    },
    {
      "id": "drill-down",
      "tour": true
    },
    {
      "id": "checkout-sequence",
      "view": "checkout-seq"
    }
  ]
}

How Orrery works 37 components · 31 connections · direction right

How Orrery works

Plain image tag: this is what a README shows. Script and pointer events are stripped, animation is not. Open interactive — the same file as a document: outline, click to fail, scenarios, views.

How Orrery works orrery-diagrams The providers' icon sets @orrery-diagrams/core Vocabulary @orrery-diagrams/layout-elk @orrery-diagrams/runtime What comes out @orrery-diagrams/raster writes reads merged before yours layout graph / boxes and routes laid out img tag opened directly clicks and keys mount / change frame at t Coding agent or a person app.orrery.json one file JSON Schema v1.json λ validate λ render λ export / embed λ explain Validate schema + pointers Declare states, reasons, loads Scope views, closed groups ELK elkjs 0.9 Fake engine tests Render SVG + CSS Your page orrery embed Scene SVGs CSS animation only ×3 Interactive SVG model + engine inside GitHub README an img tag Browser Reader on a laptop or a phone Freeze at t resvg native PNG frames One file: the model, itsviews, scenarios, tour andexports planned: On the roadmap, not built
{
  "$schema": "../packages/core/schema/v1.json",
  "title": "How Orrery works",
  "description": "Orrery, drawn in Orrery. An agent writes one file: the model, its views, scenarios, tour and exports. The command line validates it, folds the declared states in, scopes a view, lays it out through an engine behind one interface, and renders SVG that animates in a README and is interactive in a browser. This diagram uses every feature the model offers, and the test suite checks that it keeps doing so.",
  "direction": "right",
  "states": {
    "use": "sre",
    "replace": false,
    "define": {
      "planned": {
        "look": {
          "stroke": "#94a3b8",
          "fill": "#f8fafc",
          "text": "#64748b",
          "dash": true,
          "pulse": false,
          "opacity": 0.7
        },
        "flows": "stop",
        "description": "On the roadmap, not built"
      },
      "brownout": {
        "description": "Working with a feature switched off"
      },
      "retired": {
        "look": "muted",
        "description": "Kept so old files still validate"
      }
    },
    "default": "healthy"
  },
  "kinds": {
    "use": [
      "aws",
      "gcp",
      "azure",
      "user"
    ],
    "replace": false,
    "components": {
      "file": {
        "glyph": "M3 1.5h7l3.5 3.5v9.5H3z M10 1.5V5h3.5",
        "shape": "document",
        "description": "A file on disk"
      },
      "command": {
        "glyph": "function",
        "shape": "tag",
        "box": {
          "fill": "#f8fafc",
          "stroke": "#475569"
        },
        "description": "A subcommand of the orrery CLI"
      },
      "engine": {
        "glyph": "gateway",
        "shape": "hexagon",
        "description": "A layout engine behind the LayoutEngine interface"
      },
      "word": {
        "glyph": "M2 4h12M2 8h8M2 12h10",
        "shape": "pill",
        "description": "A block of the author's vocabulary",
        "box": {
          "dash": true
        }
      },
      "stage": {
        "shape": "chevron",
        "description": "A stage of the rendering pipeline"
      },
      "mark": {
        "glyph": {
          "viewBox": "0 0 16 16",
          "svg": "<circle cx=\"8\" cy=\"8\" r=\"6.5\" fill=\"none\" stroke=\"#FF7A1A\" stroke-width=\"1.5\"/><circle cx=\"8\" cy=\"8\" r=\"2\" fill=\"#FF7A1A\"/><circle cx=\"13\" cy=\"5\" r=\"1.2\" fill=\"#0f172a\"/>"
        },
        "description": "The orrery mark: an interactive file with the engine inside"
      }
    },
    "groups": {
      "package": {
        "frame": "tier",
        "description": "A published npm package"
      },
      "documents": {
        "frame": {
          "stroke": "#94a3b8",
          "fill": "#f1f5f9",
          "fillOpacity": 0.6,
          "dash": true
        },
        "shape": "cloud",
        "description": "What comes out, wherever it is read"
      },
      "sets": {
        "frame": {
          "stroke": "#94a3b8",
          "dotted": true
        },
        "description": "Someone else's icon sets"
      }
    },
    "connections": {
      "reads": {
        "line": {
          "dash": "2 3",
          "stroke": "#0891b2",
          "flow": "#0891b2"
        },
        "description": "Read, not called"
      },
      "inlined": {
        "line": {
          "width": 2.5,
          "stroke": "#7c3aed",
          "flow": "#7c3aed"
        },
        "description": "Copied into the file verbatim"
      },
      "builds": {
        "line": "dotted",
        "description": "Generated by a script and committed"
      }
    }
  },
  "shapes": {
    "replace": false,
    "define": {
      "chevron": {
        "path": "M0 0H85L100 50 85 100H0L15 50Z",
        "pad": {
          "x": 16,
          "y": 0
        },
        "inner": [15, 0, 85, 100],
        "description": "A stage in a pipeline"
      },
      "tag": {
        "path": "M0 0H82L100 50 82 100H0Z",
        "pad": {
          "x": 12,
          "y": 0
        },
        "description": "A command"
      },
      "box": {
        "corner": 8
      },
      "pill": {
        "corner": "round",
        "pad": {
          "x": 6,
          "y": 0
        }
      }
    }
  },
  "groups": [
    {
      "id": "cli",
      "label": "orrery-diagrams",
      "kind": "package",
      "description": "The command line: validate, render, export, embed, packs"
    },
    {
      "id": "icon-sets",
      "label": "The providers' icon sets",
      "kind": "sets",
      "description": "Built into packs by a script and committed"
    },
    {
      "id": "core",
      "label": "@orrery-diagrams/core",
      "kind": "package"
    },
    {
      "id": "vocabulary",
      "label": "Vocabulary",
      "kind": "cluster",
      "parent": "core",
      "description": "States, kinds, shapes and packs: presets the author overrides, extends or replaces"
    },
    {
      "id": "packs",
      "label": "Packs",
      "kind": "cluster",
      "parent": "vocabulary",
      "description": "aws, gcp and azure as kinds; sre as states",
      "meta": {
        "built-by": "tools/packs/build.mjs"
      }
    },
    {
      "id": "pack-npm",
      "label": "Its npm package",
      "kind": "cluster",
      "parent": "packs",
      "replicas": 3
    },
    {
      "id": "layout",
      "label": "@orrery-diagrams/layout-elk",
      "kind": "package"
    },
    {
      "id": "runtime",
      "label": "@orrery-diagrams/runtime",
      "kind": "package",
      "description": "The engine inlined into every interactive file"
    },
    {
      "id": "outputs",
      "label": "What comes out",
      "kind": "documents"
    },
    {
      "id": "raster",
      "label": "@orrery-diagrams/raster",
      "kind": "package",
      "state": "healthy"
    }
  ],
  "components": [
    {
      "id": "agent",
      "label": "Coding agent",
      "kind": "client",
      "tech": "or a person",
      "description": "Writes the model from the schema and the specification"
    },
    {
      "id": "model",
      "label": "app.orrery.json",
      "kind": "file",
      "tech": "one file",
      "meta": {
        "spec": "docs/MODEL.md"
      }
    },
    {
      "id": "schema",
      "label": "JSON Schema",
      "kind": "file",
      "tech": "v1.json",
      "description": "Every property explains itself"
    },
    {
      "id": "validate",
      "label": "validate",
      "kind": "command",
      "group": "cli"
    },
    {
      "id": "render",
      "label": "render",
      "kind": "command",
      "group": "cli"
    },
    {
      "id": "export",
      "label": "export / embed",
      "kind": "command",
      "group": "cli"
    },
    {
      "id": "explain",
      "label": "explain",
      "kind": "command",
      "group": "cli",
      "state": "planned",
      "description": "The model and a scenario in prose (N2)"
    },
    {
      "id": "aws-set",
      "label": "AWS icons",
      "kind": "aws:lambda",
      "group": "icon-sets"
    },
    {
      "id": "gcp-set",
      "label": "Google Cloud icons",
      "kind": "gcp:run",
      "group": "icon-sets"
    },
    {
      "id": "azure-set",
      "label": "Azure icons",
      "kind": "azure:functions",
      "group": "icon-sets"
    },
    {
      "id": "states",
      "label": "States",
      "kind": "word",
      "group": "vocabulary"
    },
    {
      "id": "kinds",
      "label": "Kinds",
      "kind": "word",
      "group": "vocabulary"
    },
    {
      "id": "shapes",
      "label": "Shapes",
      "kind": "word",
      "group": "vocabulary"
    },
    {
      "id": "aws-pack",
      "label": "aws",
      "kind": "aws:lambda",
      "group": "packs"
    },
    {
      "id": "gcp-pack",
      "label": "gcp",
      "kind": "gcp:run",
      "group": "packs"
    },
    {
      "id": "azure-pack",
      "label": "azure",
      "kind": "azure:functions",
      "group": "packs"
    },
    {
      "id": "pack-file",
      "label": "pack.json",
      "kind": "file",
      "group": "pack-npm",
      "tech": "every icon as a kind"
    },
    {
      "id": "pack-terms",
      "label": "LICENSE",
      "kind": "file",
      "group": "pack-npm",
      "tech": "the provider's terms"
    },
    {
      "id": "sre-pack",
      "label": "sre",
      "kind": "word",
      "group": "packs"
    },
    {
      "id": "validator",
      "label": "Validate",
      "kind": "stage",
      "group": "core",
      "tech": "schema + pointers"
    },
    {
      "id": "declare",
      "label": "Declare",
      "kind": "stage",
      "group": "core",
      "tech": "states, reasons, loads"
    },
    {
      "id": "scope",
      "label": "Scope",
      "kind": "stage",
      "group": "core",
      "tech": "views, closed groups"
    },
    {
      "id": "elk",
      "label": "ELK",
      "kind": "engine",
      "group": "layout",
      "tech": "elkjs 0.9"
    },
    {
      "id": "fake",
      "label": "Fake engine",
      "kind": "engine",
      "group": "layout",
      "tech": "tests",
      "description": "A row or a column; what the renderer tests run against"
    },
    {
      "id": "renderer",
      "label": "Render",
      "kind": "stage",
      "group": "core",
      "tech": "SVG + CSS"
    },
    {
      "id": "page",
      "label": "Your page",
      "kind": "client",
      "tech": "orrery embed",
      "description": "Mounts the engine and builds its own controls"
    },
    {
      "id": "camera",
      "label": "Camera",
      "group": "runtime"
    },
    {
      "id": "session",
      "label": "Session",
      "group": "runtime",
      "tech": "declare + overrides"
    },
    {
      "id": "morph",
      "label": "Morph",
      "group": "runtime",
      "description": "Slides shared boxes between layouts"
    },
    {
      "id": "scene",
      "label": "Scene SVGs",
      "kind": "file",
      "group": "outputs",
      "replicas": 3,
      "tech": "CSS animation only"
    },
    {
      "id": "interactive",
      "label": "Interactive SVG",
      "kind": "mark",
      "group": "outputs",
      "tech": "model + engine inside"
    },
    {
      "id": "readme",
      "label": "GitHub README",
      "kind": "external",
      "tech": "an img tag"
    },
    {
      "id": "browser",
      "label": "Browser",
      "kind": "client"
    },
    {
      "id": "reader",
      "label": "Reader",
      "kind": "user:user",
      "tech": "on a laptop or a phone"
    },
    {
      "id": "freeze",
      "label": "Freeze at t",
      "group": "raster"
    },
    {
      "id": "resvg",
      "label": "resvg",
      "kind": "external",
      "group": "raster",
      "tech": "native"
    },
    {
      "id": "png",
      "label": "PNG frames",
      "kind": "file",
      "group": "outputs"
    }
  ],
  "connections": [
    {
      "from": "agent",
      "to": "model",
      "load": 0.8,
      "label": "writes"
    },
    {
      "from": "agent",
      "to": "schema",
      "kind": "reads",
      "load": 0.3,
      "label": "reads"
    },
    {
      "id": "to-validate",
      "from": "model",
      "to": "validate",
      "load": 0.5
    },
    {
      "id": "to-render",
      "from": "model",
      "to": "render",
      "load": 0.7
    },
    {
      "from": "model",
      "to": "export",
      "load": 0.6
    },
    {
      "id": "to-explain",
      "from": "model",
      "to": "explain",
      "load": 0,
      "state": "planned"
    },
    {
      "from": "validate",
      "to": "validator",
      "load": 0.5
    },
    {
      "from": "render",
      "to": "validator",
      "load": 0.7
    },
    {
      "from": "export",
      "to": "validator",
      "load": 0.6
    },
    {
      "from": "schema",
      "to": "validator",
      "kind": "reads",
      "load": 0.4
    },
    {
      "from": "vocabulary",
      "to": "validator",
      "kind": "async",
      "load": 0.3,
      "label": "merged before yours"
    },
    {
      "from": "validator",
      "to": "declare",
      "load": 0.7
    },
    {
      "from": "declare",
      "to": "scope",
      "load": 0.7
    },
    {
      "id": "to-elk",
      "from": "scope",
      "to": "elk",
      "load": 0.7,
      "label": "layout graph / boxes and routes",
      "bidirectional": true
    },
    {
      "id": "to-fake",
      "from": "scope",
      "to": "fake",
      "load": 0,
      "bidirectional": true
    },
    {
      "id": "to-draw",
      "from": "scope",
      "to": "renderer",
      "load": 0.7,
      "label": "laid out"
    },
    {
      "from": "runtime",
      "to": "interactive",
      "kind": "inlined",
      "load": 0.4
    },
    {
      "from": "renderer",
      "to": "scene",
      "kind": "dataflow",
      "load": 0.8
    },
    {
      "from": "renderer",
      "to": "interactive",
      "kind": "dataflow",
      "load": 0.5
    },
    {
      "from": "scene",
      "to": "readme",
      "load": 0.6,
      "label": "img tag"
    },
    {
      "from": "interactive",
      "to": "browser",
      "load": 0.5,
      "label": "opened directly"
    },
    {
      "from": "browser",
      "to": "reader",
      "load": 0.4,
      "label": "clicks and keys"
    },
    {
      "from": "readme",
      "to": "reader",
      "kind": "dataflow",
      "load": 0.3
    },
    {
      "from": "page",
      "to": "session",
      "kind": "async",
      "load": 0.4,
      "bidirectional": true,
      "label": "mount / change"
    },
    {
      "from": "scene",
      "to": "freeze",
      "load": 0.3,
      "label": "frame at t"
    },
    {
      "from": "freeze",
      "to": "resvg",
      "load": 0.3
    },
    {
      "from": "resvg",
      "to": "png",
      "kind": "dataflow",
      "load": 0.3
    },
    {
      "from": "aws-set",
      "to": "aws-pack",
      "kind": "builds",
      "load": 0.2
    },
    {
      "from": "gcp-set",
      "to": "gcp-pack",
      "kind": "builds",
      "load": 0.2
    },
    {
      "from": "azure-set",
      "to": "azure-pack",
      "kind": "replication",
      "load": 0.2,
      "meta": {
        "why": "the same drawing, copied"
      }
    },
    {
      "from": "azure-pack",
      "to": "pack-npm",
      "kind": "dataflow",
      "load": 0.2,
      "label": "ships as"
    }
  ],
  "callouts": [
    {
      "at": "model",
      "text": "One file: the model, its views, scenarios, tour and exports",
      "side": "top"
    }
  ],
  "views": [
    {
      "id": "overview",
      "title": "How Orrery works",
      "type": "topology",
      "description": "The whole pipeline, with the vocabulary, the runtime and the icon sets folded away.",
      "collapse": [
        "vocabulary",
        "packs",
        "runtime",
        "icon-sets"
      ]
    },
    {
      "id": "core",
      "title": "Inside core",
      "scope": "core",
      "direction": "down",
      "description": "Validate, declare, scope, render; the vocabulary is one box until you open it.",
      "collapse": [
        "vocabulary",
        "packs"
      ]
    },
    {
      "id": "author",
      "title": "The author's side",
      "only": [
        "agent",
        "model",
        "schema",
        "cli"
      ]
    },
    {
      "id": "out",
      "title": "What comes out",
      "only": [
        "renderer",
        "runtime",
        "outputs",
        "readme",
        "browser",
        "page"
      ],
      "collapse": [
        "runtime"
      ],
      "play": {
        "scenario": "invalid-model",
        "seconds": 3
      }
    },
    {
      "id": "render-seq",
      "type": "sequence",
      "title": "One render, as a sequence",
      "description": "What happens between the file and the picture when the agent runs orrery render.",
      "messages": [
        {
          "from": "agent",
          "to": "model",
          "text": "writes app.orrery.json"
        },
        {
          "from": "model",
          "to": "render",
          "text": "orrery render"
        },
        {
          "from": "render",
          "to": "validator",
          "text": "the file"
        },
        {
          "from": "validator",
          "to": "render",
          "text": "OK, or pointers",
          "reply": true
        },
        {
          "from": "validator",
          "to": "declare",
          "text": "the model"
        },
        {
          "from": "declare",
          "to": "scope",
          "text": "states, reasons, loads folded"
        },
        {
          "from": "scope",
          "to": "elk",
          "text": "layout graph"
        },
        {
          "from": "elk",
          "to": "scope",
          "text": "boxes and routes",
          "reply": true
        },
        {
          "from": "scope",
          "to": "renderer",
          "text": "laid out"
        },
        {
          "from": "renderer",
          "to": "renderer",
          "text": "CSS tracks"
        },
        {
          "from": "renderer",
          "to": "scene",
          "text": "SVG",
          "kind": "dataflow"
        },
        {
          "from": "scene",
          "to": "readme",
          "text": "img tag"
        }
      ],
      "play": {
        "seconds": 1
      }
    }
  ],
  "scenarios": [
    {
      "id": "invalid-model",
      "label": "The model has a mistake",
      "steps": [
        {
          "note": "A connection names a kind that does not exist",
          "set": {
            "outage": {
              "model": "/connections/7/kind: unknown connection kind \"grpc\""
            },
            "impaired": {
              "validate": "prints the pointer and the message"
            },
            "drained": [
              "declare",
              "scope",
              "elk",
              "renderer"
            ]
          },
          "load": [
            {
              "id": "to-render",
              "load": 0
            },
            {
              "from": "model",
              "to": "export",
              "load": 0
            }
          ],
          "callouts": [
            {
              "at": "validate",
              "text": "One line per error: a JSON pointer and a sentence. Nothing renders until the file is right."
            }
          ]
        },
        {
          "note": "The agent fixes the file; valid first time on the next run",
          "restore": [
            "model",
            "validate",
            "declare",
            "scope",
            "elk",
            "renderer"
          ],
          "load": [
            {
              "id": "to-render",
              "load": 0.7
            },
            {
              "from": "model",
              "to": "export",
              "load": 0.6
            }
          ],
          "callouts": [
            {
              "at": "model",
              "text": "Fixed at the pointer the error named",
              "side": "top"
            }
          ]
        }
      ]
    },
    {
      "id": "swap-engine",
      "label": "Swap the layout engine",
      "steps": [
        {
          "note": "ELK is drained; the fake engine takes the graph",
          "set": {
            "drained": {
              "elk": "replaced behind the LayoutEngine interface"
            },
            "brownout": "renderer"
          },
          "load": [
            {
              "id": "to-elk",
              "load": 0
            },
            {
              "id": "to-fake",
              "load": 0.7
            }
          ],
          "callouts": [
            {
              "at": "fake",
              "text": "Any engine behind one interface: a test engine today, a custom one tomorrow"
            }
          ]
        },
        {
          "note": "ELK is back",
          "restore": "elk",
          "set": {
            "healthy": "renderer"
          },
          "load": [
            {
              "id": "to-elk",
              "load": 0.7
            },
            {
              "id": "to-fake",
              "load": 0
            }
          ]
        }
      ]
    }
  ],
  "tour": {
    "seconds": 4,
    "scenes": [
      {
        "view": "overview",
        "note": "One file in, pictures out. Three groups are folded away."
      },
      {
        "view": "overview",
        "open": [
          "vocabulary"
        ],
        "note": "The vocabulary: states, kinds, shapes and packs, merged before the author's own."
      },
      {
        "view": "overview",
        "open": [
          "vocabulary",
          "packs"
        ],
        "zoom": "packs",
        "note": "Packs, two levels down: the providers' icon sets as kinds, sre as states."
      },
      {
        "view": "overview",
        "open": [
          "vocabulary",
          "runtime"
        ],
        "zoom": "runtime",
        "note": "The runtime, inlined into every interactive file: camera, session, morph.",
        "callouts": [
          {
            "at": "morph",
            "text": "Shared boxes slide between layouts",
            "side": "right"
          }
        ]
      },
      {
        "view": "overview",
        "scenario": "invalid-model",
        "step": 1,
        "note": "A mistake in the file: the validator answers, nothing renders."
      },
      {
        "view": "overview",
        "scenario": "invalid-model",
        "step": 2,
        "note": "Fixed at the pointer. Everything flows again."
      },
      {
        "view": "overview",
        "set": {
          "brownout": {
            "explain": "coming: the model and a scenario in prose"
          }
        },
        "seconds": 6,
        "note": "What is next: explain, in the author's words."
      }
    ]
  },
  "exports": [
    {
      "id": "overview"
    },
    {
      "id": "core",
      "view": "core"
    },
    {
      "id": "author",
      "view": "author"
    },
    {
      "id": "out",
      "view": "out",
      "play": "invalid-model",
      "seconds": 3
    },
    {
      "id": "open-vocabulary",
      "open": [
        "vocabulary"
      ]
    },
    {
      "id": "open-packs",
      "open": [
        "vocabulary",
        "packs"
      ],
      "zoom": "packs"
    },
    {
      "id": "zoom-renderer",
      "zoom": "renderer"
    },
    {
      "id": "open-runtime",
      "open": [
        "runtime"
      ],
      "zoom": "runtime"
    },
    {
      "id": "invalid-1",
      "scenario": "invalid-model",
      "step": 1
    },
    {
      "id": "invalid-2",
      "scenario": "invalid-model",
      "step": 2
    },
    {
      "id": "swap-engine",
      "scenario": "swap-engine",
      "step": 1
    },
    {
      "id": "what-if",
      "set": {
        "outage": {
          "resvg": "no native binary for this platform"
        }
      },
      "callouts": [
        {
          "at": "png",
          "text": "No frames without resvg; the SVGs are unaffected",
          "side": "right"
        }
      ]
    },
    {
      "id": "heading",
      "heading": true
    },
    {
      "id": "heading-left",
      "view": "core",
      "heading": "left"
    },
    {
      "id": "tour",
      "tour": true
    },
    {
      "id": "sequence",
      "view": "render-seq"
    }
  ]
}

The solar system, as a service 5 components · 4 connections · direction down

The solar system, as a service

Plain image tag: this is what a README shows. Script and pointer events are stripped, animation is not. Open interactive — the same file as a document: outline, click to fail, scenarios, views.

The solar system, as a service heat sunlight solar wind tides Sun Venus Earth Mars Moon
{
  "$schema": "https://raw.githubusercontent.com/adamgilman/Orrery/main/packages/core/schema/v1.json",
  "title": "The solar system, as a service",
  "direction": "down",
  "components": [
    {
      "id": "sun",
      "label": "Sun"
    },
    {
      "id": "venus",
      "label": "Venus"
    },
    {
      "id": "earth",
      "label": "Earth"
    },
    {
      "id": "mars",
      "label": "Mars"
    },
    {
      "id": "moon",
      "label": "Moon"
    }
  ],
  "connections": [
    {
      "from": "sun",
      "to": "venus",
      "load": 0.9,
      "label": "heat"
    },
    {
      "from": "sun",
      "to": "earth",
      "load": 0.7,
      "label": "sunlight"
    },
    {
      "from": "sun",
      "to": "mars",
      "load": 0.3,
      "label": "solar wind"
    },
    {
      "from": "earth",
      "to": "moon",
      "load": 0.2,
      "label": "tides"
    }
  ]
}

try-it 4 components · 3 connections · direction right

try-it

Plain image tag: this is what a README shows. Script and pointer events are stripped, animation is not. Open interactive — the same file as a document: outline, click to fail, scenarios, views.

Web API Orders DB Payments
{
  "components": [
    { "id": "web", "label": "Web", "kind": "client" },
    { "id": "api", "label": "API" },
    { "id": "db", "label": "Orders DB", "kind": "database" },
    { "id": "pay", "label": "Payments", "kind": "external" }
  ],
  "connections": [
    { "from": "web", "to": "api", "load": 0.8 },
    { "from": "api", "to": "db", "load": 0.5 },
    { "from": "api", "to": "pay", "load": 0.2 }
  ]
}

Checkout in eight stages

One model, grown a step at a time

The same checkout, from five loose parts to scenarios, views, drill-down, its own vocabulary and a sequence.

Checkout: the parts 5 components · 0 connections · direction right

Checkout: the parts

Plain image tag: this is what a README shows. Script and pointer events are stripped, animation is not. Open interactive — the same file as a document: outline, click to fail, scenarios, views.

Checkout: the parts Storefront Checkout API Orders DB Read replica Session cache
{
  "$schema": "https://raw.githubusercontent.com/adamgilman/Orrery/main/packages/core/schema/v1.json",
  "title": "Checkout: the parts",
  "direction": "right",
  "kinds": {
    "use": [
      "aws"
    ]
  },
  "components": [
    {
      "id": "web",
      "label": "Storefront",
      "kind": "client"
    },
    {
      "id": "api",
      "label": "Checkout API",
      "kind": "aws:fargate"
    },
    {
      "id": "db",
      "label": "Orders DB",
      "kind": "aws:rds"
    },
    {
      "id": "replica",
      "label": "Read replica",
      "kind": "aws:rds"
    },
    {
      "id": "sessions",
      "label": "Session cache",
      "kind": "aws:elasticache"
    }
  ],
  "exports": [
    {
      "id": "1-parts"
    }
  ]
}

Checkout: grouped 8 components · 0 connections · direction right

Checkout: grouped

Plain image tag: this is what a README shows. Script and pointer events are stripped, animation is not. Open interactive — the same file as a document: outline, click to fail, scenarios, views.

Checkout: grouped Data Session cache Storefront Checkout API Orders DB Read replica
{
  "$schema": "https://raw.githubusercontent.com/adamgilman/Orrery/main/packages/core/schema/v1.json",
  "title": "Checkout: grouped",
  "direction": "right",
  "kinds": {
    "use": [
      "aws"
    ]
  },
  "groups": [
    {
      "id": "data",
      "label": "Data",
      "kind": "tier"
    },
    {
      "id": "sessions",
      "label": "Session cache",
      "kind": "cluster",
      "parent": "data"
    },
    {
      "id": "cache-a",
      "label": "Node A",
      "kind": "cluster",
      "parent": "sessions"
    },
    {
      "id": "cache-b",
      "label": "Node B",
      "kind": "cluster",
      "parent": "sessions"
    }
  ],
  "components": [
    {
      "id": "web",
      "label": "Storefront",
      "kind": "client"
    },
    {
      "id": "api",
      "label": "Checkout API",
      "kind": "aws:fargate"
    },
    {
      "id": "db",
      "label": "Orders DB",
      "kind": "aws:rds",
      "group": "data"
    },
    {
      "id": "replica",
      "label": "Read replica",
      "kind": "aws:rds",
      "group": "data"
    },
    {
      "id": "redis-a",
      "label": "Redis",
      "kind": "aws:elasticache",
      "group": "cache-a"
    },
    {
      "id": "aof-a",
      "label": "Append-only file",
      "kind": "aws:s3",
      "group": "cache-a"
    },
    {
      "id": "redis-b",
      "label": "Redis",
      "kind": "aws:elasticache",
      "group": "cache-b"
    },
    {
      "id": "aof-b",
      "label": "Append-only file",
      "kind": "aws:s3",
      "group": "cache-b"
    }
  ],
  "views": [
    {
      "id": "overview",
      "title": "Overview",
      "collapse": [
        "sessions"
      ]
    }
  ],
  "exports": [
    {
      "id": "2-groups"
    }
  ]
}

Checkout: connected 8 components · 8 connections · direction down

Checkout: connected

Plain image tag: this is what a README shows. Script and pointer events are stripped, animation is not. Open interactive — the same file as a document: outline, click to fail, scenarios, views.

Checkout: connected Data Session cache writes Storefront Checkout API Orders DB Read replica
{
  "$schema": "https://raw.githubusercontent.com/adamgilman/Orrery/main/packages/core/schema/v1.json",
  "title": "Checkout: connected",
  "direction": "down",
  "kinds": {
    "use": [
      "aws"
    ]
  },
  "groups": [
    {
      "id": "data",
      "label": "Data",
      "kind": "tier"
    },
    {
      "id": "sessions",
      "label": "Session cache",
      "kind": "cluster",
      "parent": "data"
    },
    {
      "id": "cache-a",
      "label": "Node A",
      "kind": "cluster",
      "parent": "sessions"
    },
    {
      "id": "cache-b",
      "label": "Node B",
      "kind": "cluster",
      "parent": "sessions"
    }
  ],
  "components": [
    {
      "id": "web",
      "label": "Storefront",
      "kind": "client"
    },
    {
      "id": "api",
      "label": "Checkout API",
      "kind": "aws:fargate"
    },
    {
      "id": "db",
      "label": "Orders DB",
      "kind": "aws:rds",
      "group": "data"
    },
    {
      "id": "replica",
      "label": "Read replica",
      "kind": "aws:rds",
      "group": "data"
    },
    {
      "id": "redis-a",
      "label": "Redis",
      "kind": "aws:elasticache",
      "group": "cache-a"
    },
    {
      "id": "aof-a",
      "label": "Append-only file",
      "kind": "aws:s3",
      "group": "cache-a"
    },
    {
      "id": "redis-b",
      "label": "Redis",
      "kind": "aws:elasticache",
      "group": "cache-b"
    },
    {
      "id": "aof-b",
      "label": "Append-only file",
      "kind": "aws:s3",
      "group": "cache-b"
    }
  ],
  "connections": [
    {
      "from": "web",
      "to": "api",
      "load": 0.8
    },
    {
      "from": "api",
      "to": "db",
      "load": 0.6,
      "label": "writes"
    },
    {
      "id": "failover",
      "from": "api",
      "to": "replica",
      "load": 0
    },
    {
      "from": "db",
      "to": "replica",
      "kind": "replication",
      "load": 0.2
    },
    {
      "from": "api",
      "to": "sessions",
      "load": 0.5
    },
    {
      "from": "redis-a",
      "to": "aof-a",
      "kind": "dataflow",
      "load": 0.3
    },
    {
      "from": "redis-b",
      "to": "aof-b",
      "kind": "dataflow",
      "load": 0.3
    },
    {
      "from": "cache-a",
      "to": "cache-b",
      "kind": "replication",
      "load": 0.2
    }
  ],
  "views": [
    {
      "id": "overview",
      "title": "Overview",
      "collapse": [
        "sessions"
      ]
    }
  ],
  "exports": [
    {
      "id": "3-connections"
    }
  ]
}

Checkout: what happens 8 components · 8 connections · direction down

Checkout: what happens

Plain image tag: this is what a README shows. Script and pointer events are stripped, animation is not. Open interactive — the same file as a document: outline, click to fail, scenarios, views.

Checkout: what happens Data Session cache writes Storefront Checkout API Orders DB Read replica
{
  "$schema": "https://raw.githubusercontent.com/adamgilman/Orrery/main/packages/core/schema/v1.json",
  "title": "Checkout: what happens",
  "direction": "down",
  "kinds": {
    "use": [
      "aws"
    ]
  },
  "groups": [
    {
      "id": "data",
      "label": "Data",
      "kind": "tier"
    },
    {
      "id": "sessions",
      "label": "Session cache",
      "kind": "cluster",
      "parent": "data"
    },
    {
      "id": "cache-a",
      "label": "Node A",
      "kind": "cluster",
      "parent": "sessions"
    },
    {
      "id": "cache-b",
      "label": "Node B",
      "kind": "cluster",
      "parent": "sessions"
    }
  ],
  "components": [
    {
      "id": "web",
      "label": "Storefront",
      "kind": "client"
    },
    {
      "id": "api",
      "label": "Checkout API",
      "kind": "aws:fargate"
    },
    {
      "id": "db",
      "label": "Orders DB",
      "kind": "aws:rds",
      "group": "data"
    },
    {
      "id": "replica",
      "label": "Read replica",
      "kind": "aws:rds",
      "group": "data"
    },
    {
      "id": "redis-a",
      "label": "Redis",
      "kind": "aws:elasticache",
      "group": "cache-a"
    },
    {
      "id": "aof-a",
      "label": "Append-only file",
      "kind": "aws:s3",
      "group": "cache-a"
    },
    {
      "id": "redis-b",
      "label": "Redis",
      "kind": "aws:elasticache",
      "group": "cache-b"
    },
    {
      "id": "aof-b",
      "label": "Append-only file",
      "kind": "aws:s3",
      "group": "cache-b"
    }
  ],
  "connections": [
    {
      "from": "web",
      "to": "api",
      "load": 0.8
    },
    {
      "from": "api",
      "to": "db",
      "load": 0.6,
      "label": "writes"
    },
    {
      "id": "failover",
      "from": "api",
      "to": "replica",
      "load": 0
    },
    {
      "from": "db",
      "to": "replica",
      "kind": "replication",
      "load": 0.2
    },
    {
      "from": "api",
      "to": "sessions",
      "load": 0.5
    },
    {
      "from": "redis-a",
      "to": "aof-a",
      "kind": "dataflow",
      "load": 0.3
    },
    {
      "from": "redis-b",
      "to": "aof-b",
      "kind": "dataflow",
      "load": 0.3
    },
    {
      "from": "cache-a",
      "to": "cache-b",
      "kind": "replication",
      "load": 0.2
    }
  ],
  "scenarios": [
    {
      "id": "db-fails",
      "label": "Primary fails",
      "steps": [
        {
          "note": "Orders DB goes down",
          "set": {
            "failed": "db",
            "degraded": {
              "api": "reads from the replica; writes are queued",
              "web": "checkout is slower"
            }
          },
          "load": [
            {
              "id": "failover",
              "load": 0.6
            }
          ],
          "callouts": [
            {
              "at": "replica",
              "text": "Reads move to the replica; writes queue until the primary is back"
            }
          ]
        }
      ]
    }
  ],
  "views": [
    {
      "id": "overview",
      "title": "Overview",
      "collapse": [
        "sessions"
      ]
    }
  ],
  "exports": [
    {
      "id": "4-scenarios-failed",
      "scenario": "db-fails",
      "step": 1
    },
    {
      "id": "4-scenarios-play",
      "play": "db-fails",
      "seconds": 3
    }
  ]
}

Checkout: views 8 components · 8 connections · direction down

Checkout: views

Plain image tag: this is what a README shows. Script and pointer events are stripped, animation is not. Open interactive — the same file as a document: outline, click to fail, scenarios, views.

Checkout: views Data Session cache writes Storefront Checkout API Orders DB Read replica
{
  "$schema": "https://raw.githubusercontent.com/adamgilman/Orrery/main/packages/core/schema/v1.json",
  "title": "Checkout: views",
  "direction": "down",
  "kinds": {
    "use": [
      "aws"
    ]
  },
  "groups": [
    {
      "id": "data",
      "label": "Data",
      "kind": "tier"
    },
    {
      "id": "sessions",
      "label": "Session cache",
      "kind": "cluster",
      "parent": "data"
    },
    {
      "id": "cache-a",
      "label": "Node A",
      "kind": "cluster",
      "parent": "sessions"
    },
    {
      "id": "cache-b",
      "label": "Node B",
      "kind": "cluster",
      "parent": "sessions"
    }
  ],
  "components": [
    {
      "id": "web",
      "label": "Storefront",
      "kind": "client"
    },
    {
      "id": "api",
      "label": "Checkout API",
      "kind": "aws:fargate"
    },
    {
      "id": "db",
      "label": "Orders DB",
      "kind": "aws:rds",
      "group": "data"
    },
    {
      "id": "replica",
      "label": "Read replica",
      "kind": "aws:rds",
      "group": "data"
    },
    {
      "id": "redis-a",
      "label": "Redis",
      "kind": "aws:elasticache",
      "group": "cache-a"
    },
    {
      "id": "aof-a",
      "label": "Append-only file",
      "kind": "aws:s3",
      "group": "cache-a"
    },
    {
      "id": "redis-b",
      "label": "Redis",
      "kind": "aws:elasticache",
      "group": "cache-b"
    },
    {
      "id": "aof-b",
      "label": "Append-only file",
      "kind": "aws:s3",
      "group": "cache-b"
    }
  ],
  "connections": [
    {
      "from": "web",
      "to": "api",
      "load": 0.8
    },
    {
      "from": "api",
      "to": "db",
      "load": 0.6,
      "label": "writes"
    },
    {
      "id": "failover",
      "from": "api",
      "to": "replica",
      "load": 0
    },
    {
      "from": "db",
      "to": "replica",
      "kind": "replication",
      "load": 0.2
    },
    {
      "from": "api",
      "to": "sessions",
      "load": 0.5
    },
    {
      "from": "redis-a",
      "to": "aof-a",
      "kind": "dataflow",
      "load": 0.3
    },
    {
      "from": "redis-b",
      "to": "aof-b",
      "kind": "dataflow",
      "load": 0.3
    },
    {
      "from": "cache-a",
      "to": "cache-b",
      "kind": "replication",
      "load": 0.2
    }
  ],
  "scenarios": [
    {
      "id": "db-fails",
      "label": "Primary fails",
      "steps": [
        {
          "note": "Orders DB goes down",
          "set": {
            "failed": "db",
            "degraded": {
              "api": "reads from the replica; writes are queued",
              "web": "checkout is slower"
            }
          },
          "load": [
            {
              "id": "failover",
              "load": 0.6
            }
          ],
          "callouts": [
            {
              "at": "replica",
              "text": "Reads move to the replica; writes queue until the primary is back"
            }
          ]
        }
      ]
    },
    {
      "id": "redis-fails",
      "label": "A cache process dies",
      "steps": [
        {
          "note": "Redis on node A dies",
          "set": {
            "failed": {
              "redis-a": "out of memory",
              "cache-a": "its process is down"
            },
            "degraded": {
              "sessions": "one node left",
              "api": "sessions load slowly"
            }
          },
          "load": [
            {
              "from": "cache-a",
              "to": "cache-b",
              "load": 0
            }
          ],
          "callouts": [
            {
              "at": "cache-a",
              "text": "One node left; sessions load slowly until it is back"
            }
          ]
        }
      ]
    }
  ],
  "views": [
    {
      "id": "overview",
      "title": "Overview",
      "collapse": [
        "sessions"
      ]
    },
    {
      "id": "data",
      "title": "Data tier",
      "scope": "data",
      "direction": "down",
      "collapse": [
        "sessions"
      ]
    }
  ],
  "exports": [
    {
      "id": "5-views-overview",
      "view": "overview"
    },
    {
      "id": "5-views-data",
      "view": "data"
    }
  ]
}

Checkout: drill down 8 components · 8 connections · direction down

Checkout: drill down

Plain image tag: this is what a README shows. Script and pointer events are stripped, animation is not. Open interactive — the same file as a document: outline, click to fail, scenarios, views.

Checkout: drill down Data Session cache writes Storefront Checkout API Orders DB Read replica
{
  "$schema": "https://raw.githubusercontent.com/adamgilman/Orrery/main/packages/core/schema/v1.json",
  "title": "Checkout: drill down",
  "direction": "down",
  "kinds": {
    "use": [
      "aws"
    ]
  },
  "groups": [
    {
      "id": "data",
      "label": "Data",
      "kind": "tier"
    },
    {
      "id": "sessions",
      "label": "Session cache",
      "kind": "cluster",
      "parent": "data"
    },
    {
      "id": "cache-a",
      "label": "Node A",
      "kind": "cluster",
      "parent": "sessions"
    },
    {
      "id": "cache-b",
      "label": "Node B",
      "kind": "cluster",
      "parent": "sessions"
    }
  ],
  "components": [
    {
      "id": "web",
      "label": "Storefront",
      "kind": "client"
    },
    {
      "id": "api",
      "label": "Checkout API",
      "kind": "aws:fargate"
    },
    {
      "id": "db",
      "label": "Orders DB",
      "kind": "aws:rds",
      "group": "data"
    },
    {
      "id": "replica",
      "label": "Read replica",
      "kind": "aws:rds",
      "group": "data"
    },
    {
      "id": "redis-a",
      "label": "Redis",
      "kind": "aws:elasticache",
      "group": "cache-a"
    },
    {
      "id": "aof-a",
      "label": "Append-only file",
      "kind": "aws:s3",
      "group": "cache-a"
    },
    {
      "id": "redis-b",
      "label": "Redis",
      "kind": "aws:elasticache",
      "group": "cache-b"
    },
    {
      "id": "aof-b",
      "label": "Append-only file",
      "kind": "aws:s3",
      "group": "cache-b"
    }
  ],
  "connections": [
    {
      "from": "web",
      "to": "api",
      "load": 0.8
    },
    {
      "from": "api",
      "to": "db",
      "load": 0.6,
      "label": "writes"
    },
    {
      "id": "failover",
      "from": "api",
      "to": "replica",
      "load": 0
    },
    {
      "from": "db",
      "to": "replica",
      "kind": "replication",
      "load": 0.2
    },
    {
      "from": "api",
      "to": "sessions",
      "load": 0.5
    },
    {
      "from": "redis-a",
      "to": "aof-a",
      "kind": "dataflow",
      "load": 0.3
    },
    {
      "from": "redis-b",
      "to": "aof-b",
      "kind": "dataflow",
      "load": 0.3
    },
    {
      "from": "cache-a",
      "to": "cache-b",
      "kind": "replication",
      "load": 0.2
    }
  ],
  "scenarios": [
    {
      "id": "db-fails",
      "label": "Primary fails",
      "steps": [
        {
          "note": "Orders DB goes down",
          "set": {
            "failed": "db",
            "degraded": {
              "api": "reads from the replica; writes are queued",
              "web": "checkout is slower"
            }
          },
          "load": [
            {
              "id": "failover",
              "load": 0.6
            }
          ],
          "callouts": [
            {
              "at": "replica",
              "text": "Reads move to the replica; writes queue until the primary is back"
            }
          ]
        }
      ]
    },
    {
      "id": "redis-fails",
      "label": "A cache process dies",
      "steps": [
        {
          "note": "Redis on node A dies",
          "set": {
            "failed": {
              "redis-a": "out of memory",
              "cache-a": "its process is down"
            },
            "degraded": {
              "sessions": "one node left",
              "api": "sessions load slowly"
            }
          },
          "load": [
            {
              "from": "cache-a",
              "to": "cache-b",
              "load": 0
            }
          ],
          "callouts": [
            {
              "at": "cache-a",
              "text": "One node left; sessions load slowly until it is back"
            }
          ]
        }
      ]
    }
  ],
  "views": [
    {
      "id": "overview",
      "title": "Overview",
      "collapse": [
        "sessions",
        "cache-a",
        "cache-b"
      ]
    },
    {
      "id": "data",
      "title": "Data tier",
      "scope": "data",
      "direction": "down",
      "collapse": [
        "sessions"
      ]
    },
    {
      "id": "checkout-seq",
      "type": "sequence",
      "title": "A customer checks out",
      "description": "The happy path: the storefront calls the API, the API writes the order and clears the session.",
      "messages": [
        {
          "from": "web",
          "to": "api",
          "text": "POST /checkout"
        },
        {
          "from": "api",
          "to": "sessions",
          "text": "read cart"
        },
        {
          "from": "api",
          "to": "db",
          "text": "insert order"
        },
        {
          "from": "db",
          "to": "api",
          "text": "ok",
          "reply": true
        },
        {
          "from": "api",
          "to": "sessions",
          "text": "clear cart"
        },
        {
          "from": "api",
          "to": "web",
          "text": "201 Created",
          "reply": true
        }
      ]
    }
  ],
  "tour": {
    "seconds": 4,
    "scenes": [
      {
        "view": "overview",
        "note": "The whole system. The session cache is one box."
      },
      {
        "view": "overview",
        "open": [
          "sessions"
        ],
        "note": "Open the session cache. The picture reflows; you still see everything."
      },
      {
        "view": "overview",
        "open": [
          "sessions",
          "cache-a",
          "cache-b"
        ],
        "note": "Open both nodes too. Still the whole system."
      },
      {
        "view": "overview",
        "open": [
          "sessions",
          "cache-a",
          "cache-b"
        ],
        "zoom": "cache-a",
        "note": "Zoom in on node A: a Redis process and its append-only file."
      },
      {
        "view": "overview",
        "open": [
          "sessions",
          "cache-a",
          "cache-b"
        ],
        "zoom": "cache-a",
        "scenario": "redis-fails",
        "step": 1,
        "note": "Redis dies. The step marks the node failed and the cluster and API degraded."
      },
      {
        "view": "overview",
        "open": [
          "sessions",
          "cache-a",
          "cache-b"
        ],
        "scenario": "redis-fails",
        "step": 1,
        "note": "Zoom out. Everything is still open; the states are where they were put."
      },
      {
        "view": "overview",
        "scenario": "redis-fails",
        "step": 1,
        "note": "Close it all. The closed boxes carry the state."
      }
    ]
  },
  "exports": [
    {
      "id": "6-drill-down"
    },
    {
      "id": "6-drill-down-inside",
      "open": [
        "sessions",
        "cache-a"
      ],
      "zoom": "cache-a"
    },
    {
      "id": "6-drill-down-tour",
      "tour": true
    }
  ]
}

Checkout, in our words 8 components · 8 connections · direction down

Checkout, in our words

Plain image tag: this is what a README shows. Script and pointer events are stripped, animation is not. Open interactive — the same file as a document: outline, click to fail, scenarios, views.

Checkout, in our words Data Session cache writes Storefront Checkout API Orders DB Read replica
{
  "$schema": "https://raw.githubusercontent.com/adamgilman/Orrery/main/packages/core/schema/v1.json",
  "title": "Checkout, in our words",
  "direction": "down",
  "kinds": {
    "use": [
      "aws"
    ]
  },
  "groups": [
    {
      "id": "data",
      "label": "Data",
      "kind": "tier"
    },
    {
      "id": "sessions",
      "label": "Session cache",
      "kind": "cluster",
      "parent": "data"
    },
    {
      "id": "cache-a",
      "label": "Node A",
      "kind": "cluster",
      "parent": "sessions"
    },
    {
      "id": "cache-b",
      "label": "Node B",
      "kind": "cluster",
      "parent": "sessions"
    }
  ],
  "views": [
    {
      "id": "overview",
      "title": "Overview",
      "collapse": [
        "sessions"
      ]
    }
  ],
  "states": {
    "replace": true,
    "default": "healthy",
    "define": {
      "healthy": {
        "look": "normal",
        "description": "Within SLO"
      },
      "impaired": {
        "look": "warn",
        "description": "Serving; redundancy or latency SLO breached"
      },
      "brownout": {
        "look": {
          "stroke": "#7c3aed",
          "fill": "#f5f3ff",
          "text": "#5b21b6",
          "pulse": true
        },
        "description": "Serving with a feature switched off"
      },
      "outage": {
        "look": "alert",
        "flows": "stop",
        "description": "Customer-visible failure"
      },
      "drained": {
        "look": "muted",
        "flows": "stop",
        "description": "Deliberately out of rotation"
      }
    }
  },
  "components": [
    {
      "id": "web",
      "label": "Storefront",
      "kind": "client"
    },
    {
      "id": "api",
      "label": "Checkout API",
      "kind": "aws:fargate"
    },
    {
      "id": "db",
      "label": "Orders DB",
      "kind": "aws:rds",
      "group": "data"
    },
    {
      "id": "replica",
      "label": "Read replica",
      "kind": "aws:rds",
      "group": "data"
    },
    {
      "id": "redis-a",
      "label": "Redis",
      "kind": "aws:elasticache",
      "group": "cache-a"
    },
    {
      "id": "aof-a",
      "label": "Append-only file",
      "kind": "aws:s3",
      "group": "cache-a"
    },
    {
      "id": "redis-b",
      "label": "Redis",
      "kind": "aws:elasticache",
      "group": "cache-b"
    },
    {
      "id": "aof-b",
      "label": "Append-only file",
      "kind": "aws:s3",
      "group": "cache-b"
    }
  ],
  "connections": [
    {
      "from": "web",
      "to": "api",
      "load": 0.8
    },
    {
      "from": "api",
      "to": "db",
      "load": 0.6,
      "label": "writes"
    },
    {
      "id": "failover",
      "from": "api",
      "to": "replica",
      "load": 0
    },
    {
      "from": "db",
      "to": "replica",
      "kind": "replication",
      "load": 0.2
    },
    {
      "from": "api",
      "to": "sessions",
      "load": 0.5
    },
    {
      "from": "redis-a",
      "to": "aof-a",
      "kind": "dataflow",
      "load": 0.3
    },
    {
      "from": "redis-b",
      "to": "aof-b",
      "kind": "dataflow",
      "load": 0.3
    },
    {
      "from": "cache-a",
      "to": "cache-b",
      "kind": "replication",
      "load": 0.2
    }
  ],
  "exports": [
    {
      "id": "7-vocabulary-play",
      "play": "cache-maintenance",
      "seconds": 4
    }
  ],
  "scenarios": [
    {
      "id": "cache-maintenance",
      "label": "Session cache maintenance",
      "steps": [
        {
          "note": "The cache cluster is drained: checkout continues for guests",
          "set": {
            "drained": [
              "sessions",
              "cache-a",
              "cache-b",
              "redis-a",
              "aof-a",
              "redis-b",
              "aof-b"
            ],
            "brownout": {
              "api": "guest checkout only: no saved carts"
            },
            "impaired": {
              "web": "signed-in customers check out as guests"
            }
          }
        }
      ]
    }
  ]
}

Checkout: one request 8 components · 8 connections · direction down

Checkout: one request

Plain image tag: this is what a README shows. Script and pointer events are stripped, animation is not. Open interactive — the same file as a document: outline, click to fail, scenarios, views.

Checkout: one request Data Session cache writes Storefront Checkout API Orders DB Read replica
{
  "$schema": "https://raw.githubusercontent.com/adamgilman/Orrery/main/packages/core/schema/v1.json",
  "title": "Checkout: one request",
  "direction": "down",
  "kinds": {
    "use": [
      "aws"
    ]
  },
  "groups": [
    {
      "id": "data",
      "label": "Data",
      "kind": "tier"
    },
    {
      "id": "sessions",
      "label": "Session cache",
      "kind": "cluster",
      "parent": "data"
    },
    {
      "id": "cache-a",
      "label": "Node A",
      "kind": "cluster",
      "parent": "sessions"
    },
    {
      "id": "cache-b",
      "label": "Node B",
      "kind": "cluster",
      "parent": "sessions"
    }
  ],
  "components": [
    {
      "id": "web",
      "label": "Storefront",
      "kind": "client"
    },
    {
      "id": "api",
      "label": "Checkout API",
      "kind": "aws:fargate"
    },
    {
      "id": "db",
      "label": "Orders DB",
      "kind": "aws:rds",
      "group": "data"
    },
    {
      "id": "replica",
      "label": "Read replica",
      "kind": "aws:rds",
      "group": "data"
    },
    {
      "id": "redis-a",
      "label": "Redis",
      "kind": "aws:elasticache",
      "group": "cache-a"
    },
    {
      "id": "aof-a",
      "label": "Append-only file",
      "kind": "aws:s3",
      "group": "cache-a"
    },
    {
      "id": "redis-b",
      "label": "Redis",
      "kind": "aws:elasticache",
      "group": "cache-b"
    },
    {
      "id": "aof-b",
      "label": "Append-only file",
      "kind": "aws:s3",
      "group": "cache-b"
    }
  ],
  "connections": [
    {
      "from": "web",
      "to": "api",
      "load": 0.8
    },
    {
      "from": "api",
      "to": "db",
      "load": 0.6,
      "label": "writes"
    },
    {
      "id": "failover",
      "from": "api",
      "to": "replica",
      "load": 0
    },
    {
      "from": "db",
      "to": "replica",
      "kind": "replication",
      "load": 0.2
    },
    {
      "from": "api",
      "to": "sessions",
      "load": 0.5
    },
    {
      "from": "redis-a",
      "to": "aof-a",
      "kind": "dataflow",
      "load": 0.3
    },
    {
      "from": "redis-b",
      "to": "aof-b",
      "kind": "dataflow",
      "load": 0.3
    },
    {
      "from": "cache-a",
      "to": "cache-b",
      "kind": "replication",
      "load": 0.2
    }
  ],
  "views": [
    {
      "id": "overview",
      "title": "Overview",
      "collapse": [
        "sessions"
      ]
    },
    {
      "id": "checkout-seq",
      "type": "sequence",
      "title": "A customer checks out",
      "description": "The happy path: the storefront calls the API, the API writes the order and clears the session.",
      "messages": [
        {
          "from": "web",
          "to": "api",
          "text": "POST /checkout"
        },
        {
          "from": "api",
          "to": "sessions",
          "text": "read cart"
        },
        {
          "from": "api",
          "to": "db",
          "text": "insert order"
        },
        {
          "from": "db",
          "to": "api",
          "text": "ok",
          "reply": true
        },
        {
          "from": "api",
          "to": "sessions",
          "text": "clear cart"
        },
        {
          "from": "api",
          "to": "web",
          "text": "201 Created",
          "reply": true
        }
      ]
    }
  ],
  "exports": [
    {
      "id": "8-sequence",
      "view": "checkout-seq"
    }
  ]
}

The kitchen sink

Everything the vocabulary can draw

Every kind, shape, state, look and pack, each in a model of its own.

States on connections 7 components · 6 connections · direction right

States on connections

Plain image tag: this is what a README shows. Script and pointer events are stripped, animation is not. Open interactive — the same file as a document: outline, click to fail, scenarios, views.

States on connections Caller on degraded failed off load 0 a failed box degraded: Working with reduced redundancy or capacity failed: Broken off: Deliberately switched off
{
  "$schema": "../../packages/core/schema/v1.json",
  "title": "States on connections",
  "direction": "right",
  "components": [
    { "id": "src", "label": "Caller", "kind": "client" },
    { "id": "on", "label": "on" }, { "id": "degraded", "label": "degraded" }, { "id": "failed", "label": "failed" }, { "id": "off", "label": "off" },
    { "id": "idle", "label": "load 0" }, { "id": "down", "label": "a failed box", "state": "failed" }
  ],
  "connections": [
    { "id": "to-on", "from": "src", "to": "on", "load": 0.6 },
    { "id": "to-degraded", "from": "src", "to": "degraded", "load": 0.6, "state": "degraded" },
    { "id": "to-failed", "from": "src", "to": "failed", "load": 0.6, "state": "failed" },
    { "id": "to-off", "from": "src", "to": "off", "load": 0.6, "state": "off" },
    { "from": "src", "to": "idle", "load": 0 },
    { "from": "src", "to": "down", "load": 0.6 }
  ],
  "exports": [{ "id": "connection-states" }]
}

The connection kinds and their loads 8 components · 7 connections · direction right

The connection kinds and their loads

Plain image tag: this is what a README shows. Script and pointer events are stripped, animation is not. Open interactive — the same file as a document: outline, click to fail, scenarios, views.

The connection kinds and their loads sync async replication dataflow gossip no load both ways Source sync, load 1 async, load 0.6 replication, load 0.3 dataflow, load 0.8 your own, load 0.5 load 0 bidirectional
{
  "$schema": "../../packages/core/schema/v1.json",
  "title": "The connection kinds and their loads",
  "direction": "right",
  "kinds": { "connections": { "gossip": { "line": { "stroke": "#0891b2", "dash": "2 3", "width": 2, "flow": "#0891b2" }, "description": "Your own line style" } } },
  "components": [
    { "id": "src", "label": "Source" },
    { "id": "sync", "label": "sync, load 1" }, { "id": "async", "label": "async, load 0.6" }, { "id": "replication", "label": "replication, load 0.3" },
    { "id": "dataflow", "label": "dataflow, load 0.8" }, { "id": "gossip", "label": "your own, load 0.5" }, { "id": "idle", "label": "load 0" }, { "id": "both", "label": "bidirectional" }
  ],
  "connections": [
    { "from": "src", "to": "sync", "kind": "sync", "load": 1, "label": "sync" },
    { "from": "src", "to": "async", "kind": "async", "load": 0.6, "label": "async" },
    { "from": "src", "to": "replication", "kind": "replication", "load": 0.3, "label": "replication" },
    { "from": "src", "to": "dataflow", "kind": "dataflow", "load": 0.8, "label": "dataflow" },
    { "from": "src", "to": "gossip", "kind": "gossip", "load": 0.5, "label": "gossip" },
    { "from": "src", "to": "idle", "load": 0, "label": "no load" },
    { "from": "src", "to": "both", "load": 0.4, "bidirectional": true, "label": "both ways" }
  ],
  "exports": [{ "id": "connections" }]
}

Replicas, tech lines, labels and ghosts 6 components · 4 connections · direction right

Replicas, tech lines, labels and ghosts

Plain image tag: this is what a README shows. Script and pointer events are stripped, animation is not. Open interactive — the same file as a document: outline, click to fail, scenarios, views.

Replicas, tech lines, labels and ghosts Data ×3 Server HTTPS writes sessions Storefront Next.js Checkout API Node 22 ×3 Orders DB PostgreSQL 16 Sessions ×2
{
  "$schema": "../../packages/core/schema/v1.json",
  "title": "Replicas, tech lines, labels and ghosts",
  "direction": "right",
  "groups": [
    {
      "id": "data",
      "label": "Data",
      "kind": "tier"
    },
    {
      "id": "server",
      "label": "Server",
      "kind": "cluster",
      "replicas": 3
    }
  ],
  "components": [
    {
      "id": "web",
      "label": "Storefront",
      "kind": "client",
      "tech": "Next.js"
    },
    {
      "id": "api",
      "label": "Checkout API",
      "tech": "Node 22",
      "replicas": 3
    },
    {
      "id": "db",
      "label": "Orders DB",
      "kind": "database",
      "tech": "PostgreSQL 16",
      "group": "data"
    },
    {
      "id": "cache",
      "label": "Sessions",
      "kind": "cache",
      "replicas": 2,
      "group": "data"
    },
    {
      "id": "worker",
      "label": "Worker",
      "group": "server"
    },
    {
      "id": "agent",
      "label": "Log agent",
      "group": "server",
      "tech": "one per server"
    }
  ],
  "connections": [
    {
      "from": "web",
      "to": "api",
      "load": 0.8,
      "label": "HTTPS"
    },
    {
      "from": "api",
      "to": "db",
      "load": 0.6,
      "label": "writes"
    },
    {
      "from": "api",
      "to": "cache",
      "load": 0.5,
      "bidirectional": true,
      "label": "sessions"
    },
    {
      "from": "api",
      "to": "server",
      "load": 0.4
    }
  ],
  "views": [
    {
      "id": "all",
      "collapse": [
        "server"
      ]
    },
    {
      "id": "data",
      "scope": "data",
      "direction": "down"
    }
  ],
  "exports": [
    {
      "id": "details",
      "view": "all"
    },
    {
      "id": "details-scoped",
      "view": "data"
    },
    {
      "id": "details-replicas",
      "view": "all"
    }
  ]
}

The default group kinds 5 components · 0 connections · direction down

The default group kinds

Plain image tag: this is what a README shows. Script and pointer events are stripped, animation is not. Open interactive — the same file as a document: outline, click to fail, scenarios, views.

The default group kinds tier region zone cluster boundary Service Service Service Service Service
{
  "$schema": "../../packages/core/schema/v1.json",
  "title": "The default group kinds",
  "direction": "down",
  "groups": [
    { "id": "tier", "label": "tier", "kind": "tier" }, { "id": "region", "label": "region", "kind": "region" }, { "id": "zone", "label": "zone", "kind": "zone" },
    { "id": "cluster", "label": "cluster", "kind": "cluster" }, { "id": "boundary", "label": "boundary", "kind": "boundary" }
  ],
  "components": [
    { "id": "a", "label": "Service", "group": "tier" }, { "id": "b", "label": "Service", "group": "region" }, { "id": "c", "label": "Service", "group": "zone" },
    { "id": "d", "label": "Service", "group": "cluster" }, { "id": "e", "label": "Service", "group": "boundary" }
  ],
  "views": [{ "id": "open" }, { "id": "closed", "collapse": ["tier", "region", "zone", "cluster", "boundary"] }],
  "exports": [{ "id": "groups-open", "view": "open" }, { "id": "groups-closed", "view": "closed" }]
}

The default component kinds 9 components · 0 connections · direction down

The default component kinds

Plain image tag: this is what a README shows. Script and pointer events are stripped, animation is not. Open interactive — the same file as a document: outline, click to fail, scenarios, views.

The default component kinds service database queue cache gateway
{
  "$schema": "../../packages/core/schema/v1.json",
  "title": "The default component kinds",
  "direction": "down",
  "components": [
    { "id": "service", "label": "service" }, { "id": "database", "label": "database", "kind": "database" }, { "id": "queue", "label": "queue", "kind": "queue" },
    { "id": "cache", "label": "cache", "kind": "cache" }, { "id": "gateway", "label": "gateway", "kind": "gateway" },
    { "id": "client", "label": "client", "kind": "client" }, { "id": "storage", "label": "storage", "kind": "storage" }, { "id": "function", "label": "function", "kind": "function" },
    { "id": "external", "label": "external", "kind": "external" }
  ],
  "views": [{ "id": "a", "only": ["service", "database", "queue", "cache", "gateway"] }, { "id": "b", "only": ["client", "storage", "function", "external"] }],
  "exports": [{ "id": "kinds-1", "view": "a" }, { "id": "kinds-2", "view": "b" }]
}

The looks a state can wear 6 components · 0 connections · direction down

The looks a state can wear

Plain image tag: this is what a README shows. Script and pointer events are stripped, animation is not. Open interactive — the same file as a document: outline, click to fail, scenarios, views.

The looks a state can wear normal warn alert muted highlight your own normal: The preset normal look warn: The preset warn look alert: The preset alert look, pulsing muted: The preset muted look highlight: The preset highlight look brownout: Your own style object
{
  "$schema": "../../packages/core/schema/v1.json",
  "title": "The looks a state can wear",
  "direction": "down",
  "states": { "define": {
    "normal": { "look": "normal", "description": "The preset normal look" },
    "warn": { "look": "warn", "description": "The preset warn look" },
    "alert": { "look": "alert", "description": "The preset alert look, pulsing" },
    "muted": { "look": "muted", "description": "The preset muted look" },
    "highlight": { "look": "highlight", "description": "The preset highlight look" },
    "brownout": { "look": { "stroke": "#7c3aed", "fill": "#f5f3ff", "text": "#5b21b6", "dash": true, "pulse": true }, "description": "Your own style object" }
  } },
  "components": [
    { "id": "a", "label": "normal", "state": "normal" }, { "id": "b", "label": "warn", "state": "warn" }, { "id": "c", "label": "alert", "state": "alert" },
    { "id": "d", "label": "muted", "state": "muted" }, { "id": "e", "label": "highlight", "state": "highlight" }, { "id": "f", "label": "your own", "state": "brownout" }
  ],
  "exports": [{ "id": "looks" }]
}

The cloud packs 15 components · 12 connections · direction right

The cloud packs

Plain image tag: this is what a README shows. Script and pointer events are stripped, animation is not. Open interactive — the same file as a document: outline, click to fail, scenarios, views.

The cloud packs AWS Checkout Orders Events Assets Sessions
{
  "$schema": "../../packages/core/schema/v1.json",
  "title": "The cloud packs",
  "direction": "right",
  "kinds": { "use": ["aws", "gcp", "azure"] },
  "groups": [
    { "id": "aws", "label": "AWS", "kind": "aws:vpc" }, { "id": "gcp", "label": "Google Cloud", "kind": "gcp:project" }, { "id": "azure", "label": "Azure", "kind": "azure:resource-group" }
  ],
  "components": [
    { "id": "a1", "label": "Checkout", "kind": "aws:lambda", "group": "aws" }, { "id": "a2", "label": "Orders", "kind": "aws:rds", "group": "aws" }, { "id": "a3", "label": "Events", "kind": "aws:sqs", "group": "aws" }, { "id": "a4", "label": "Assets", "kind": "aws:s3", "group": "aws" }, { "id": "a5", "label": "Sessions", "kind": "aws:dynamodb", "group": "aws" },
    { "id": "g1", "label": "Checkout", "kind": "gcp:run", "group": "gcp" }, { "id": "g2", "label": "Orders", "kind": "gcp:cloudsql", "group": "gcp" }, { "id": "g3", "label": "Events", "kind": "gcp:pubsub", "group": "gcp" }, { "id": "g4", "label": "Assets", "kind": "gcp:storage", "group": "gcp" }, { "id": "g5", "label": "Warehouse", "kind": "gcp:bigquery", "group": "gcp" },
    { "id": "z1", "label": "Checkout", "kind": "azure:aks", "group": "azure" }, { "id": "z2", "label": "Orders", "kind": "azure:sql", "group": "azure" }, { "id": "z3", "label": "Events", "kind": "azure:service-bus", "group": "azure" }, { "id": "z4", "label": "Assets", "kind": "azure:blob", "group": "azure" }, { "id": "z5", "label": "Secrets", "kind": "azure:key-vault", "group": "azure" }
  ],
  "connections": [
    { "from": "a1", "to": "a2" }, { "from": "a1", "to": "a3", "kind": "async" }, { "from": "a1", "to": "a4" }, { "from": "a1", "to": "a5" },
    { "from": "g1", "to": "g2" }, { "from": "g1", "to": "g3", "kind": "async" }, { "from": "g1", "to": "g4" }, { "from": "g3", "to": "g5", "kind": "dataflow" },
    { "from": "z1", "to": "z2" }, { "from": "z1", "to": "z3", "kind": "async" }, { "from": "z1", "to": "z4" }, { "from": "z1", "to": "z5" }
  ],
  "views": [{ "id": "aws", "scope": "aws" }, { "id": "gcp", "scope": "gcp" }, { "id": "azure", "scope": "azure" }],
  "exports": [{ "id": "packs-aws", "view": "aws" }, { "id": "packs-gcp", "view": "gcp" }, { "id": "packs-azure", "view": "azure" }]
}

Every shape 14 components · 2 connections · direction down

Every shape

Plain image tag: this is what a README shows. Script and pointer events are stripped, animation is not. Open interactive — the same file as a document: outline, click to fail, scenarios, views.

Every shape box sharp pill ellipse cylinder hexagon
{
  "$schema": "../../packages/core/schema/v1.json",
  "title": "Every shape",
  "direction": "down",
  "shapes": { "define": { "chevron": { "path": "M0 0H85L100 50 85 100H0L15 50Z", "pad": { "x": 16, "y": 0 }, "inner": [15, 0, 85, 100], "description": "A stage in a pipeline" } } },
  "kinds": {
    "components": {
      "box": { "shape": "box" }, "sharp": { "shape": "sharp" }, "pill": { "shape": "pill" }, "ellipse": { "shape": "ellipse" }, "cylinder": { "shape": "cylinder" },
      "hexagon": { "shape": "hexagon" }, "diamond": { "shape": "diamond" }, "parallelogram": { "shape": "parallelogram" }, "document": { "shape": "document" }, "card": { "shape": "card" }, "cloud": { "shape": "cloud" },
      "stage": { "shape": "chevron", "description": "A pipeline stage" }
    },
    "groups": { "pipeline": { "shape": "cloud", "frame": { "stroke": "#0891b2" }, "description": "A pipeline, framed as a cloud" } }
  },
  "groups": [{ "id": "own", "label": "Your own", "kind": "pipeline" }],
  "components": [
    { "id": "box", "label": "box", "kind": "box" }, { "id": "sharp", "label": "sharp", "kind": "sharp" }, { "id": "pill", "label": "pill", "kind": "pill" },
    { "id": "ellipse", "label": "ellipse", "kind": "ellipse" }, { "id": "cylinder", "label": "cylinder", "kind": "cylinder" }, { "id": "hexagon", "label": "hexagon", "kind": "hexagon" },
    { "id": "diamond", "label": "diamond", "kind": "diamond" }, { "id": "parallelogram", "label": "parallelogram", "kind": "parallelogram" }, { "id": "document", "label": "document", "kind": "document" },
    { "id": "card", "label": "card", "kind": "card" }, { "id": "cloud", "label": "cloud", "kind": "cloud" },
    { "id": "ingest", "label": "Ingest", "kind": "stage", "group": "own" }, { "id": "enrich", "label": "Enrich", "kind": "stage", "group": "own" }, { "id": "publish", "label": "Publish", "kind": "stage", "group": "own" }
  ],
  "connections": [{ "from": "ingest", "to": "enrich" }, { "from": "enrich", "to": "publish" }],
  "views": [
    { "id": "a", "only": ["box", "sharp", "pill", "ellipse", "cylinder", "hexagon"] },
    { "id": "b", "only": ["diamond", "parallelogram", "document", "card", "cloud"] },
    { "id": "own", "only": ["own"], "direction": "right" },
    { "id": "own-closed", "only": ["own"], "collapse": ["own"] }
  ],
  "exports": [{ "id": "shapes-1", "view": "a" }, { "id": "shapes-2", "view": "b" }, { "id": "shapes-own", "view": "own" }, { "id": "shapes-own-closed", "view": "own-closed" }]
}

The sre states pack 5 components · 0 connections · direction down

The sre states pack

Plain image tag: this is what a README shows. Script and pointer events are stripped, animation is not. Open interactive — the same file as a document: outline, click to fail, scenarios, views.

The sre states pack healthy impaired brownout outage drained impaired: Serving; redundancy or latency SLO breached brownout: Serving with a feature switched off outage: Customer-visible failure drained: Deliberately out of rotation
{
  "$schema": "../../packages/core/schema/v1.json",
  "title": "The sre states pack",
  "direction": "down",
  "states": { "use": "sre" },
  "components": [
    { "id": "a", "label": "healthy" }, { "id": "b", "label": "impaired", "state": "impaired" }, { "id": "c", "label": "brownout", "state": "brownout" },
    { "id": "d", "label": "outage", "state": "outage" }, { "id": "e", "label": "drained", "state": "drained" }
  ],
  "exports": [{ "id": "sre" }]
}

The default states 5 components · 4 connections · direction right

The default states

Plain image tag: this is what a README shows. Script and pointer events are stripped, animation is not. Open interactive — the same file as a document: outline, click to fail, scenarios, views.

The default states Caller on degraded failed off
{
  "$schema": "../../packages/core/schema/v1.json",
  "title": "The default states",
  "direction": "right",
  "components": [
    { "id": "src", "label": "Caller", "kind": "client" },
    { "id": "on", "label": "on" }, { "id": "degraded", "label": "degraded" }, { "id": "failed", "label": "failed" }, { "id": "off", "label": "off" }
  ],
  "connections": [
    { "from": "src", "to": "on", "load": 0.6 }, { "from": "src", "to": "degraded", "load": 0.6 }, { "from": "src", "to": "failed", "load": 0.6 }, { "from": "src", "to": "off", "load": 0.6 }
  ],
  "exports": [{ "id": "states", "set": { "degraded": { "degraded": "one replica short" }, "failed": { "failed": "the reason is the tooltip" }, "off": "off" } }]
}

The user pack 5 components · 5 connections · direction right

The user pack

Plain image tag: this is what a README shows. Script and pointer events are stripped, animation is not. Open interactive — the same file as a document: outline, click to fail, scenarios, views.

The user pack Reader or a customer, or an operator Phone Laptop Their home one line out Storefront
{
  "$schema": "../../packages/core/schema/v1.json",
  "title": "The user pack",
  "direction": "right",
  "kinds": { "use": ["user"] },
  "components": [
    { "id": "reader", "label": "Reader", "kind": "user:user", "tech": "or a customer, or an operator" },
    { "id": "phone", "label": "Phone", "kind": "user:device" },
    { "id": "laptop", "label": "Laptop", "kind": "user:computer" },
    { "id": "home", "label": "Their home", "kind": "user:house", "tech": "one line out" },
    { "id": "site", "label": "Storefront", "kind": "client" }
  ],
  "connections": [
    { "from": "reader", "to": "phone", "load": 0.5 },
    { "from": "reader", "to": "laptop", "load": 0.5 },
    { "from": "phone", "to": "home", "load": 0.4 },
    { "from": "laptop", "to": "home", "load": 0.4 },
    { "from": "home", "to": "site", "kind": "sync", "load": 0.6 }
  ],
  "exports": [{ "id": "packs-user" }]
}

Moving parts

Every way a model moves

Views, scenarios, plays, tours, opening and zooming, in one model.

Checkout: the moving parts 8 components · 8 connections · direction down

Checkout: the moving parts

Plain image tag: this is what a README shows. Script and pointer events are stripped, animation is not. Open interactive — the same file as a document: outline, click to fail, scenarios, views.

Checkout: the moving parts Data Session cache writes Storefront Checkout API Orders DB Read replica
{
  "$schema": "https://raw.githubusercontent.com/adamgilman/Orrery/main/packages/core/schema/v1.json",
  "title": "Checkout: the moving parts",
  "description": "One small checkout, the README's own: a storefront, an API, an orders database with a read replica, and a session cache of two Redis nodes. Every picture on the moving parts page is a view, a moment or a story drawn from this one model.",
  "direction": "down",
  "kinds": {
    "use": [
      "aws"
    ]
  },
  "groups": [
    {
      "id": "data",
      "label": "Data",
      "kind": "tier"
    },
    {
      "id": "sessions",
      "label": "Session cache",
      "kind": "cluster",
      "parent": "data"
    },
    {
      "id": "cache-a",
      "label": "Node A",
      "kind": "cluster",
      "parent": "sessions"
    },
    {
      "id": "cache-b",
      "label": "Node B",
      "kind": "cluster",
      "parent": "sessions"
    }
  ],
  "components": [
    {
      "id": "web",
      "label": "Storefront",
      "kind": "client"
    },
    {
      "id": "api",
      "label": "Checkout API",
      "kind": "aws:fargate"
    },
    {
      "id": "db",
      "label": "Orders DB",
      "kind": "aws:rds",
      "group": "data"
    },
    {
      "id": "replica",
      "label": "Read replica",
      "kind": "aws:rds",
      "group": "data"
    },
    {
      "id": "redis-a",
      "label": "Redis",
      "kind": "aws:elasticache",
      "group": "cache-a"
    },
    {
      "id": "aof-a",
      "label": "Append-only file",
      "kind": "aws:s3",
      "group": "cache-a"
    },
    {
      "id": "redis-b",
      "label": "Redis",
      "kind": "aws:elasticache",
      "group": "cache-b"
    },
    {
      "id": "aof-b",
      "label": "Append-only file",
      "kind": "aws:s3",
      "group": "cache-b"
    }
  ],
  "connections": [
    {
      "from": "web",
      "to": "api",
      "load": 0.8
    },
    {
      "id": "writes",
      "from": "api",
      "to": "db",
      "load": 0.6,
      "label": "writes"
    },
    {
      "id": "failover",
      "from": "api",
      "to": "replica",
      "load": 0
    },
    {
      "from": "db",
      "to": "replica",
      "kind": "replication",
      "load": 0.2
    },
    {
      "from": "api",
      "to": "sessions",
      "load": 0.5
    },
    {
      "from": "redis-a",
      "to": "aof-a",
      "kind": "dataflow",
      "load": 0.3
    },
    {
      "from": "redis-b",
      "to": "aof-b",
      "kind": "dataflow",
      "load": 0.3
    },
    {
      "from": "cache-a",
      "to": "cache-b",
      "kind": "replication",
      "load": 0.2
    }
  ],
  "views": [
    {
      "id": "overview",
      "title": "Overview",
      "collapse": [
        "sessions",
        "cache-a",
        "cache-b"
      ]
    },
    {
      "id": "data",
      "title": "Data tier",
      "scope": "data",
      "direction": "down",
      "collapse": [
        "sessions"
      ]
    },
    {
      "id": "checkout-seq",
      "type": "sequence",
      "title": "A customer checks out",
      "description": "The happy path: the storefront calls the API, the API writes the order and clears the session.",
      "messages": [
        {
          "from": "web",
          "to": "api",
          "text": "POST /checkout"
        },
        {
          "from": "api",
          "to": "sessions",
          "text": "read cart"
        },
        {
          "from": "api",
          "to": "db",
          "text": "insert order"
        },
        {
          "from": "db",
          "to": "api",
          "text": "ok",
          "reply": true
        },
        {
          "from": "api",
          "to": "sessions",
          "text": "clear cart"
        },
        {
          "from": "api",
          "to": "web",
          "text": "201 Created",
          "reply": true
        }
      ]
    },
    {
      "id": "front",
      "title": "The front door",
      "only": [
        "web",
        "api"
      ]
    },
    {
      "id": "all",
      "title": "Everything open",
      "direction": "down"
    }
  ],
  "scenarios": [
    {
      "id": "db-fails",
      "label": "Primary fails",
      "steps": [
        {
          "note": "Orders DB goes down",
          "set": {
            "failed": "db",
            "degraded": {
              "api": "reads from the replica; writes are queued",
              "web": "checkout is slower"
            }
          },
          "load": [
            {
              "id": "failover",
              "load": 0.6
            }
          ],
          "callouts": [
            {
              "at": "replica",
              "text": "Reads move to the replica; writes queue until the primary is back"
            }
          ]
        },
        {
          "note": "The primary is back; queued writes replay",
          "restore": [
            "db",
            "web"
          ],
          "set": {
            "degraded": {
              "api": "replaying queued writes"
            }
          },
          "load": [
            {
              "id": "failover",
              "load": 0
            }
          ]
        },
        {
          "note": "Recovered",
          "restore": [
            "api"
          ]
        }
      ]
    },
    {
      "id": "redis-fails",
      "label": "A cache process dies",
      "steps": [
        {
          "note": "Redis on node A dies",
          "set": {
            "failed": {
              "redis-a": "out of memory",
              "cache-a": "its process is down"
            },
            "degraded": {
              "sessions": "one node left",
              "api": "sessions load slowly"
            }
          },
          "load": [
            {
              "from": "cache-a",
              "to": "cache-b",
              "load": 0
            }
          ],
          "callouts": [
            {
              "at": "cache-a",
              "text": "One node left; sessions load slowly until it is back"
            }
          ]
        }
      ]
    }
  ],
  "tour": {
    "seconds": 4,
    "scenes": [
      {
        "view": "overview",
        "note": "The whole system. The session cache is one box."
      },
      {
        "view": "overview",
        "open": [
          "sessions"
        ],
        "note": "Open the session cache. The picture reflows; you still see everything."
      },
      {
        "view": "overview",
        "open": [
          "sessions",
          "cache-a",
          "cache-b"
        ],
        "note": "Open both nodes too. Still the whole system."
      },
      {
        "view": "overview",
        "open": [
          "sessions",
          "cache-a",
          "cache-b"
        ],
        "zoom": "cache-a",
        "note": "Zoom in on node A: a Redis process and its append-only file."
      },
      {
        "view": "overview",
        "open": [
          "sessions",
          "cache-a",
          "cache-b"
        ],
        "zoom": "cache-a",
        "scenario": "redis-fails",
        "step": 1,
        "note": "Redis dies. The step marks the node failed and the cluster and API degraded."
      },
      {
        "view": "overview",
        "open": [
          "sessions",
          "cache-a",
          "cache-b"
        ],
        "scenario": "redis-fails",
        "step": 1,
        "note": "Zoom out. Everything is still open; the states are where they were put."
      },
      {
        "view": "overview",
        "scenario": "redis-fails",
        "step": 1,
        "note": "Close it all. The closed boxes carry the state."
      }
    ]
  },
  "exports": [
    {
      "id": "view-overview",
      "view": "overview"
    },
    {
      "id": "view-data",
      "view": "data"
    },
    {
      "id": "view-only",
      "view": "front"
    },
    {
      "id": "view-all",
      "view": "all"
    },
    {
      "id": "open-sessions",
      "open": [
        "sessions"
      ]
    },
    {
      "id": "open-deep",
      "open": [
        "sessions",
        "cache-a"
      ]
    },
    {
      "id": "zoom-db",
      "zoom": "db"
    },
    {
      "id": "open-and-zoom",
      "open": [
        "sessions"
      ],
      "zoom": "sessions"
    },
    {
      "id": "step-1",
      "scenario": "db-fails",
      "step": 1
    },
    {
      "id": "step-2",
      "scenario": "db-fails",
      "step": 2
    },
    {
      "id": "step-3",
      "scenario": "db-fails",
      "step": 3
    },
    {
      "id": "what-if",
      "set": {
        "off": {
          "replica": "out for maintenance"
        },
        "degraded": {
          "api": "no failover while the replica is out"
        }
      }
    },
    {
      "id": "what-if-link",
      "set": {
        "failed": {
          "writes": "TLS certificate expired"
        },
        "degraded": {
          "api": "writes failing"
        }
      }
    },
    {
      "id": "heading",
      "heading": true
    },
    {
      "id": "sequence",
      "view": "checkout-seq"
    },
    {
      "id": "sequence-failed",
      "view": "checkout-seq",
      "scenario": "db-fails",
      "step": 1
    },
    {
      "id": "play",
      "play": "db-fails",
      "seconds": 3
    },
    {
      "id": "tour",
      "tour": true
    }
  ]
}

Test fixtures

The small cases the tests draw

Edge cases kept for the test suite: cycles, parallel lines, nested groups, a warning.

Checkout with alternatives 7 components · 7 connections · direction down

Checkout with alternatives

Plain image tag: this is what a README shows. Script and pointer events are stripped, animation is not. Open interactive — the same file as a document: outline, click to fail, scenarios, views.

Checkout with alternatives Data tier Payment providers web Checkout API ×3 Orders DB Orders replica stripe adyen λ Fraud scoring
{
  "$schema": "https://raw.githubusercontent.com/adamgilman/Orrery/main/packages/core/schema/v1.json",
  "title": "Checkout with alternatives",
  "direction": "down",
  "groups": [
    {
      "id": "data",
      "label": "Data tier"
    },
    {
      "id": "psp",
      "label": "Payment providers",
      "kind": "boundary"
    }
  ],
  "components": [
    {
      "id": "web",
      "kind": "gateway"
    },
    {
      "id": "api",
      "label": "Checkout API",
      "replicas": 3
    },
    {
      "id": "orders",
      "label": "Orders DB",
      "kind": "database",
      "group": "data"
    },
    {
      "id": "replica",
      "label": "Orders replica",
      "kind": "database",
      "group": "data"
    },
    {
      "id": "stripe",
      "kind": "external",
      "group": "psp"
    },
    {
      "id": "adyen",
      "kind": "external",
      "group": "psp"
    },
    {
      "id": "fraud",
      "label": "Fraud scoring",
      "kind": "function"
    }
  ],
  "connections": [
    {
      "from": "web",
      "to": "api",
      "load": 0.8
    },
    {
      "from": "api",
      "to": "orders",
      "load": 0.6
    },
    {
      "from": "api",
      "to": "replica",
      "load": 0
    },
    {
      "from": "orders",
      "to": "replica",
      "kind": "replication",
      "load": 0.2
    },
    {
      "from": "api",
      "to": "stripe",
      "load": 0.3
    },
    {
      "from": "api",
      "to": "adyen",
      "load": 0
    },
    {
      "from": "api",
      "to": "fraud",
      "kind": "async",
      "load": 0.3
    }
  ],
  "scenarios": [
    {
      "id": "orders-failover",
      "label": "Orders DB failover",
      "steps": [
        {
          "note": "Primary goes down; reads move to the replica, API runs reduced",
          "set": {
            "failed": "orders",
            "degraded": {
              "api": "reads from the replica",
              "web": "checkout is slower"
            }
          },
          "load": [
            {
              "from": "api",
              "to": "replica",
              "load": 0.6
            }
          ]
        },
        {
          "note": "Fraud scoring also down; still serving",
          "set": {
            "failed": "fraud"
          }
        },
        {
          "note": "Replica dies too; API fails, web fails behind it",
          "set": {
            "failed": {
              "replica": "disk full",
              "api": "no database left",
              "web": "cannot check out"
            }
          }
        },
        {
          "note": "All back",
          "restore": [
            "orders",
            "fraud",
            "replica",
            "api",
            "web"
          ],
          "load": [
            {
              "from": "api",
              "to": "replica",
              "load": 0
            }
          ]
        }
      ]
    },
    {
      "id": "stripe-outage",
      "label": "Stripe outage",
      "steps": [
        {
          "note": "Stripe returns 5xx; traffic shifts to Adyen",
          "set": {
            "failed": "stripe"
          },
          "load": [
            {
              "from": "api",
              "to": "adyen",
              "load": 0.3
            }
          ]
        }
      ]
    }
  ],
  "views": [
    {
      "id": "overview"
    },
    {
      "id": "failover-loop",
      "title": "Failover, on a loop",
      "play": {
        "scenario": "orders-failover",
        "seconds": 2
      }
    }
  ],
  "exports": [
    {
      "id": "overview",
      "view": "overview"
    },
    {
      "id": "orders-down",
      "scenario": "orders-failover",
      "step": 1
    },
    {
      "id": "failover-loop",
      "play": "orders-failover",
      "seconds": 2
    },
    {
      "id": "what-if",
      "set": {
        "failed": "fraud",
        "degraded": {
          "api": "no fraud scoring"
        }
      }
    }
  ]
}

Checkout on AWS 5 components · 4 connections · direction right

Checkout on AWS

Plain image tag: this is what a README shows. Script and pointer events are stripped, animation is not. Open interactive — the same file as a document: outline, click to fail, scenarios, views.

Checkout on AWS Checkout VPC Storefront CDN Checkout API Orders DB Assets
{
  "$schema": "../../packages/core/schema/v1.json",
  "title": "Checkout on AWS",
  "description": "The checkout path on AWS: the storefront reaches the API through CloudFront, orders land in RDS, and static assets are served from S3. Drawn from the model in fixtures/valid/cloud.json, which every picture on this page shares.",
  "kinds": {
    "use": [
      "aws"
    ]
  },
  "states": {
    "use": "sre"
  },
  "groups": [
    {
      "id": "vpc",
      "label": "Checkout VPC",
      "kind": "aws:vpc"
    }
  ],
  "components": [
    {
      "id": "web",
      "label": "Storefront",
      "kind": "client"
    },
    {
      "id": "cdn",
      "label": "CDN",
      "kind": "aws:cloudfront"
    },
    {
      "id": "api",
      "label": "Checkout API",
      "kind": "aws:lambda",
      "group": "vpc"
    },
    {
      "id": "db",
      "label": "Orders DB",
      "kind": "aws:rds",
      "group": "vpc"
    },
    {
      "id": "assets",
      "label": "Assets",
      "kind": "aws:s3"
    }
  ],
  "connections": [
    {
      "from": "web",
      "to": "cdn"
    },
    {
      "from": "cdn",
      "to": "api"
    },
    {
      "from": "api",
      "to": "db"
    },
    {
      "from": "cdn",
      "to": "assets"
    }
  ],
  "scenarios": [
    {
      "id": "db-fails",
      "steps": [
        {
          "set": {
            "outage": "db",
            "impaired": {
              "api": "orders queue up"
            }
          }
        }
      ]
    }
  ],
  "views": [
    {
      "id": "overview",
      "title": "Checkout on AWS, overview",
      "description": "The overview's own description wins over the model's."
    }
  ]
}

Checkout 5 components · 5 connections · direction down

Checkout

Plain image tag: this is what a README shows. Script and pointer events are stripped, animation is not. Open interactive — the same file as a document: outline, click to fail, scenarios, views.

Checkout Data tier HTTPS charge Web Checkout API Orders DB PostgreSQL 16 Orders replica Payment provider
{
  "$schema": "https://raw.githubusercontent.com/adamgilman/Orrery/main/packages/core/schema/v1.json",
  "title": "Checkout",
  "direction": "down",
  "groups": [
    {
      "id": "data",
      "label": "Data tier"
    }
  ],
  "components": [
    {
      "id": "web",
      "label": "Web",
      "kind": "gateway"
    },
    {
      "id": "api",
      "label": "Checkout API"
    },
    {
      "id": "orders",
      "label": "Orders DB",
      "kind": "database",
      "tech": "PostgreSQL 16",
      "group": "data"
    },
    {
      "id": "replica",
      "label": "Orders replica",
      "kind": "database",
      "group": "data"
    },
    {
      "id": "payments",
      "label": "Payment provider",
      "kind": "external"
    }
  ],
  "connections": [
    {
      "from": "web",
      "to": "api",
      "load": 0.8,
      "label": "HTTPS"
    },
    {
      "from": "api",
      "to": "orders",
      "load": 0.6
    },
    {
      "from": "api",
      "to": "replica",
      "load": 0
    },
    {
      "from": "orders",
      "to": "replica",
      "kind": "replication",
      "load": 0.2
    },
    {
      "from": "api",
      "to": "payments",
      "load": 0.3,
      "label": "charge"
    }
  ],
  "scenarios": [
    {
      "id": "orders-down",
      "label": "Orders DB fails",
      "steps": [
        {
          "note": "Primary goes down",
          "set": {
            "failed": "orders"
          }
        },
        {
          "note": "Recovered",
          "restore": "orders"
        }
      ]
    }
  ]
}

connection-states 4 components · 4 connections · direction right

connection-states

Plain image tag: this is what a README shows. Script and pointer events are stripped, animation is not. Open interactive — the same file as a document: outline, click to fail, scenarios, views.

Data Web Checkout API Orders DB Cache degraded: Working with reduced redundancy or capacity
{
  "states": {
    "define": {
      "brownout": { "look": { "stroke": "#7c3aed", "dash": true, "opacity": 0.8 }, "flows": "stop", "description": "Throttled by the provider" }
    }
  },
  "groups": [
    { "id": "data", "label": "Data" }
  ],
  "components": [
    { "id": "web", "label": "Web" },
    { "id": "api", "label": "Checkout API" },
    { "id": "db", "label": "Orders DB", "kind": "database", "group": "data" },
    { "id": "cache", "label": "Cache", "kind": "cache", "group": "data" }
  ],
  "connections": [
    { "id": "web-to-api", "from": "web", "to": "api", "load": 0.8 },
    { "id": "api-to-db", "from": "api", "to": "db", "load": 0.6 },
    { "id": "api-to-cache", "from": "api", "to": "cache", "load": 0.3, "state": "degraded" },
    { "from": "db", "to": "cache", "load": 0.2 }
  ],
  "views": [
    { "id": "all" },
    { "id": "closed", "collapse": ["data"] },
    { "id": "playing", "play": { "scenario": "cert-expires" } }
  ],
  "scenarios": [
    {
      "id": "cert-expires",
      "label": "Certificate expires",
      "steps": [
        {
          "note": "The database's TLS certificate expires. Both services are up; the connection between them is refused.",
          "set": {
            "failed": { "api-to-db": "TLS certificate expired" },
            "degraded": { "api": "writes failing" }
          }
        },
        {
          "note": "The certificate is renewed.",
          "restore": ["api-to-db", "api", "api-to-cache"]
        }
      ]
    }
  ]
}

cycle 2 components · 2 connections · direction right

cycle

Plain image tag: this is what a README shows. Script and pointer events are stripped, animation is not. Open interactive — the same file as a document: outline, click to fail, scenarios, views.

a b
{
  "components": [
    {
      "id": "a"
    },
    {
      "id": "b"
    }
  ],
  "connections": [
    {
      "from": "a",
      "to": "b"
    },
    {
      "from": "b",
      "to": "a"
    }
  ]
}

Commerce platform 11 components · 11 connections · direction right

Commerce platform

Plain image tag: this is what a README shows. Script and pointer events are stripped, animation is not. Open interactive — the same file as a document: outline, click to fail, scenarios, views.

Commerce platform Storefront Payments Identity charge Web Checkout Catalog Stripe Adyen
{
  "$schema": "https://raw.githubusercontent.com/adamgilman/Orrery/main/packages/core/schema/v1.json",
  "title": "Commerce platform",
  "direction": "right",
  "groups": [
    {
      "id": "storefront",
      "label": "Storefront",
      "kind": "tier"
    },
    {
      "id": "payments",
      "label": "Payments",
      "kind": "boundary",
      "description": "PCI scope"
    },
    {
      "id": "identity",
      "label": "Identity",
      "kind": "tier"
    },
    {
      "id": "pay-core",
      "label": "Core",
      "kind": "tier",
      "parent": "payments"
    }
  ],
  "components": [
    {
      "id": "web",
      "label": "Web",
      "kind": "gateway",
      "group": "storefront"
    },
    {
      "id": "checkout",
      "label": "Checkout",
      "kind": "service",
      "group": "storefront"
    },
    {
      "id": "catalog",
      "label": "Catalog",
      "kind": "service",
      "group": "storefront"
    },
    {
      "id": "pay-api",
      "label": "Payments API",
      "kind": "service",
      "group": "pay-core"
    },
    {
      "id": "ledger",
      "label": "Ledger",
      "kind": "database",
      "group": "pay-core"
    },
    {
      "id": "ledger-replica",
      "label": "Ledger replica",
      "kind": "database",
      "group": "pay-core"
    },
    {
      "id": "tokens",
      "label": "Card vault",
      "kind": "storage",
      "group": "payments"
    },
    {
      "id": "stripe",
      "label": "Stripe",
      "kind": "external"
    },
    {
      "id": "adyen",
      "label": "Adyen",
      "kind": "external"
    },
    {
      "id": "login",
      "label": "Login",
      "kind": "service",
      "group": "identity"
    },
    {
      "id": "sessions",
      "label": "Sessions",
      "kind": "cache",
      "group": "identity"
    }
  ],
  "connections": [
    {
      "from": "web",
      "to": "checkout",
      "load": 0.8
    },
    {
      "from": "web",
      "to": "catalog",
      "load": 0.6
    },
    {
      "from": "checkout",
      "to": "pay-api",
      "load": 0.5,
      "label": "charge"
    },
    {
      "from": "checkout",
      "to": "login",
      "load": 0.4
    },
    {
      "from": "pay-api",
      "to": "ledger",
      "load": 0.5
    },
    {
      "from": "pay-api",
      "to": "ledger-replica",
      "load": 0
    },
    {
      "from": "ledger",
      "to": "ledger-replica",
      "kind": "replication",
      "load": 0.2
    },
    {
      "from": "pay-api",
      "to": "tokens",
      "load": 0.3
    },
    {
      "from": "pay-api",
      "to": "stripe",
      "load": 0.3
    },
    {
      "from": "pay-api",
      "to": "adyen",
      "load": 0
    },
    {
      "from": "login",
      "to": "sessions",
      "load": 0.4
    }
  ],
  "views": [
    {
      "id": "overview",
      "title": "Platform",
      "collapse": [
        "payments",
        "identity"
      ]
    },
    {
      "id": "payments",
      "title": "Inside Payments",
      "scope": "payments",
      "direction": "down"
    },
    {
      "id": "identity",
      "title": "Inside Identity",
      "scope": "identity",
      "direction": "down"
    }
  ],
  "scenarios": [
    {
      "id": "ledger-fails",
      "label": "Ledger fails",
      "steps": [
        {
          "note": "Primary ledger goes down",
          "set": {
            "failed": "ledger",
            "degraded": {
              "pay-api": "running on the replica",
              "payments": "reduced redundancy",
              "checkout": "payments are slower"
            }
          },
          "load": [
            {
              "from": "pay-api",
              "to": "ledger-replica",
              "load": 0.5
            }
          ]
        }
      ]
    }
  ],
  "tour": {
    "seconds": 4,
    "scenes": [
      {
        "view": "overview",
        "note": "The platform. Payments and Identity are closed."
      },
      {
        "view": "overview",
        "open": [
          "payments"
        ],
        "zoom": "payments",
        "note": "Inside Payments: the API, the ledger and its replica."
      },
      {
        "view": "overview",
        "open": [
          "payments"
        ],
        "zoom": "payments",
        "scenario": "ledger-fails",
        "step": 1,
        "note": "The ledger fails. The API runs reduced on the replica."
      },
      {
        "view": "overview",
        "scenario": "ledger-fails",
        "step": 1,
        "note": "Back out: the closed box and the checkout that needs it are amber."
      }
    ]
  }
}

Drill-down, minimal 6 components · 5 connections · direction down

Drill-down, minimal

Plain image tag: this is what a README shows. Script and pointer events are stripped, animation is not. Open interactive — the same file as a document: outline, click to fail, scenarios, views.

Drill-down, minimal Orders Shipping App Mail provider
{
  "$schema": "https://raw.githubusercontent.com/adamgilman/Orrery/main/packages/core/schema/v1.json",
  "title": "Drill-down, minimal",
  "direction": "down",
  "groups": [
    {
      "id": "orders",
      "label": "Orders",
      "kind": "tier"
    },
    {
      "id": "shipping",
      "label": "Shipping",
      "kind": "tier"
    }
  ],
  "components": [
    {
      "id": "app",
      "label": "App",
      "kind": "client"
    },
    {
      "id": "api",
      "label": "Orders API",
      "kind": "service",
      "group": "orders"
    },
    {
      "id": "db",
      "label": "Orders DB",
      "kind": "database",
      "group": "orders"
    },
    {
      "id": "ship",
      "label": "Shipping API",
      "kind": "service",
      "group": "shipping"
    },
    {
      "id": "carriers",
      "label": "Carriers",
      "kind": "external",
      "group": "shipping"
    },
    {
      "id": "mail",
      "label": "Mail provider",
      "kind": "external"
    }
  ],
  "connections": [
    {
      "from": "app",
      "to": "api",
      "load": 0.7
    },
    {
      "from": "api",
      "to": "db",
      "load": 0.5
    },
    {
      "from": "api",
      "to": "ship",
      "load": 0.3
    },
    {
      "from": "ship",
      "to": "carriers",
      "load": 0.3,
      "kind": "async"
    },
    {
      "from": "api",
      "to": "mail",
      "load": 0.2,
      "kind": "async"
    }
  ],
  "views": [
    {
      "id": "overview",
      "collapse": [
        "orders",
        "shipping"
      ]
    }
  ],
  "scenarios": [
    {
      "id": "db-fails",
      "label": "DB fails",
      "steps": [
        {
          "note": "The database goes down",
          "set": {
            "failed": {
              "db": "disk full",
              "api": "no database",
              "orders": "nothing inside works",
              "app": "cannot place orders"
            }
          }
        }
      ]
    }
  ],
  "tour": {
    "seconds": 3,
    "scenes": [
      {
        "view": "overview",
        "note": "Orders is closed."
      },
      {
        "view": "overview",
        "note": "Inside Orders.",
        "open": [
          "orders"
        ],
        "zoom": "orders"
      },
      {
        "view": "overview",
        "scenario": "db-fails",
        "step": 1,
        "note": "The database fails; the API fails with it.",
        "open": [
          "orders"
        ],
        "zoom": "orders"
      },
      {
        "view": "overview",
        "scenario": "db-fails",
        "step": 1,
        "note": "Back out: Orders and the app are down."
      }
    ]
  }
}

fan-out 5 components · 6 connections · direction down

fan-out

Plain image tag: this is what a README shows. Script and pointer events are stripped, animation is not. Open interactive — the same file as a document: outline, click to fail, scenarios, views.

Load balancer Service 1 Service 2 Service 3 Cache
{
  "direction": "down",
  "components": [
    {
      "id": "lb",
      "label": "Load balancer"
    },
    {
      "id": "s1",
      "label": "Service 1"
    },
    {
      "id": "s2",
      "label": "Service 2"
    },
    {
      "id": "s3",
      "label": "Service 3"
    },
    {
      "id": "cache",
      "label": "Cache"
    }
  ],
  "connections": [
    {
      "from": "lb",
      "to": "s1",
      "load": 0.3
    },
    {
      "from": "lb",
      "to": "s2",
      "load": 0.3
    },
    {
      "from": "lb",
      "to": "s3",
      "load": 0.3
    },
    {
      "from": "s1",
      "to": "cache",
      "load": 1
    },
    {
      "from": "s2",
      "to": "cache",
      "load": 0
    },
    {
      "from": "s3",
      "to": "cache",
      "load": 0.5
    }
  ]
}

Connections to groups 2 components · 2 connections · direction right

Connections to groups

Plain image tag: this is what a README shows. Script and pointer events are stripped, animation is not. Open interactive — the same file as a document: outline, click to fail, scenarios, views.

Connections to groups Platform Not opened yet edge svc
{
  "title": "Connections to groups",
  "groups": [
    {
      "id": "platform",
      "label": "Platform"
    },
    {
      "id": "empty",
      "label": "Not opened yet",
      "kind": "boundary"
    }
  ],
  "components": [
    {
      "id": "edge",
      "kind": "gateway"
    },
    {
      "id": "svc",
      "group": "platform"
    }
  ],
  "connections": [
    {
      "from": "edge",
      "to": "platform",
      "load": 0.6
    },
    {
      "from": "edge",
      "to": "empty",
      "load": 0.2,
      "kind": "async"
    }
  ]
}

Grouped three tier 4 components · 4 connections · direction right

Grouped three tier

Plain image tag: this is what a README shows. Script and pointer events are stripped, animation is not. Open interactive — the same file as a document: outline, click to fail, scenarios, views.

Grouped three tier us-east-1 Application Data HTTPS writes reads Web tier Checkout API Orders DB Orders DB (replica)
{
  "title": "Grouped three tier",
  "groups": [
    {
      "id": "region",
      "label": "us-east-1",
      "kind": "region"
    },
    {
      "id": "app",
      "label": "Application",
      "parent": "region"
    },
    {
      "id": "data",
      "label": "Data",
      "parent": "region"
    }
  ],
  "components": [
    {
      "id": "web",
      "label": "Web tier",
      "kind": "gateway"
    },
    {
      "id": "api",
      "label": "Checkout API",
      "group": "app"
    },
    {
      "id": "db",
      "label": "Orders DB",
      "kind": "database",
      "group": "data"
    },
    {
      "id": "replica",
      "label": "Orders DB (replica)",
      "kind": "database",
      "group": "data"
    }
  ],
  "connections": [
    {
      "from": "web",
      "to": "api",
      "load": 0.7,
      "label": "HTTPS"
    },
    {
      "from": "api",
      "to": "db",
      "load": 0.5,
      "label": "writes"
    },
    {
      "id": "api-reads",
      "from": "api",
      "to": "replica",
      "load": 0,
      "label": "reads"
    },
    {
      "from": "db",
      "to": "replica",
      "kind": "replication",
      "load": 0.2
    }
  ],
  "views": [
    {
      "id": "overview"
    },
    {
      "id": "data-tier",
      "title": "Data tier",
      "scope": "data",
      "direction": "down"
    }
  ]
}

minimal 1 components · 0 connections · direction right

minimal

Plain image tag: this is what a README shows. Script and pointer events are stripped, animation is not. Open interactive — the same file as a document: outline, click to fail, scenarios, views.

a
{
  "components": [
    {
      "id": "a"
    }
  ]
}

Nested drill-down 3 components · 2 connections · direction down

Nested drill-down

Plain image tag: this is what a README shows. Script and pointer events are stripped, animation is not. Open interactive — the same file as a document: outline, click to fail, scenarios, views.

Nested drill-down Outer App
{
  "title": "Nested drill-down",
  "direction": "down",
  "groups": [
    {
      "id": "outer",
      "label": "Outer",
      "kind": "cluster"
    },
    {
      "id": "inner",
      "label": "Inner",
      "kind": "cluster",
      "parent": "outer"
    }
  ],
  "components": [
    {
      "id": "app",
      "label": "App",
      "kind": "client"
    },
    {
      "id": "x",
      "label": "X",
      "kind": "cache",
      "group": "inner"
    },
    {
      "id": "y",
      "label": "Y",
      "kind": "storage",
      "group": "outer"
    }
  ],
  "connections": [
    {
      "from": "app",
      "to": "outer",
      "load": 0.5
    },
    {
      "from": "x",
      "to": "y",
      "kind": "dataflow",
      "load": 0.3
    }
  ],
  "views": [
    {
      "id": "overview",
      "collapse": [
        "outer",
        "inner"
      ]
    }
  ],
  "tour": {
    "seconds": 4,
    "scenes": [
      {
        "view": "overview",
        "note": "Closed."
      },
      {
        "view": "overview",
        "open": [
          "outer"
        ],
        "zoom": "outer",
        "note": "Inside Outer: Y, and Inner still closed."
      },
      {
        "view": "overview",
        "open": [
          "outer",
          "inner"
        ],
        "zoom": "inner",
        "note": "Inside Inner: X."
      },
      {
        "view": "overview",
        "note": "Back out."
      }
    ]
  },
  "exports": [
    {
      "id": "overview"
    },
    {
      "id": "inside-outer",
      "open": [
        "outer"
      ]
    },
    {
      "id": "inside-inner",
      "view": "overview",
      "open": [
        "outer",
        "inner"
      ],
      "zoom": "inner"
    },
    {
      "id": "story",
      "tour": true
    }
  ]
}

Trading platform 7 components · 9 connections · direction right

Trading platform

Plain image tag: this is what a README shows. Script and pointer events are stripped, animation is not. Open interactive — the same file as a document: outline, click to fail, scenarios, views.

Trading platform EU Cell A Cell B Sequencer quorum Settlement orders orders sequence sequence fills fills Edge gateway Matcher Matcher Sequencer 1 Sequencer 2 Sequencer 3 Ledger
{
  "$schema": "https://raw.githubusercontent.com/adamgilman/Orrery/main/packages/core/schema/v1.json",
  "title": "Trading platform",
  "direction": "right",
  "states": {
    "default": "healthy",
    "replace": true,
    "define": {
      "healthy": {
        "look": "normal",
        "description": "Within SLO"
      },
      "impaired": {
        "look": "warn",
        "description": "Serving, redundancy or latency SLO breached"
      },
      "brownout": {
        "look": {
          "stroke": "#7c3aed",
          "fill": "#f5f3ff",
          "pulse": true
        },
        "description": "Serving with non-essential features disabled"
      },
      "outage": {
        "look": "alert",
        "flows": "stop",
        "description": "Customer-visible failure"
      },
      "drained": {
        "look": "muted",
        "flows": "stop",
        "description": "Deliberately taken out of rotation"
      }
    }
  },
  "kinds": {
    "components": {
      "matcher": {
        "glyph": "M2 8h4l2-5 2 10 2-5h4",
        "description": "Order matching engine"
      },
      "mainframe": {
        "glyph": "storage",
        "box": {
          "dash": false,
          "fill": "#fefce8"
        },
        "description": "Settlement on z/OS"
      }
    },
    "groups": {
      "cell": {
        "frame": {
          "stroke": "#0891b2",
          "dash": true,
          "fill": "#ecfeff",
          "fillOpacity": 0.4
        },
        "description": "Independent deployment cell"
      }
    },
    "connections": {
      "gossip": {
        "line": {
          "dash": "2 3",
          "stroke": "#0891b2",
          "flow": "#0891b2"
        },
        "description": "Consensus gossip between sequencers"
      }
    }
  },
  "groups": [
    {
      "id": "eu",
      "label": "EU",
      "kind": "region"
    },
    {
      "id": "cell-a",
      "label": "Cell A",
      "kind": "cell",
      "parent": "eu"
    },
    {
      "id": "cell-b",
      "label": "Cell B",
      "kind": "cell",
      "parent": "eu"
    },
    {
      "id": "consensus",
      "label": "Sequencer quorum",
      "kind": "cluster",
      "parent": "eu"
    },
    {
      "id": "settlement",
      "label": "Settlement",
      "kind": "boundary",
      "description": "Not opened yet: a black box the platform needs"
    }
  ],
  "components": [
    {
      "id": "edge",
      "label": "Edge gateway",
      "kind": "gateway"
    },
    {
      "id": "match-a",
      "label": "Matcher",
      "kind": "matcher",
      "group": "cell-a"
    },
    {
      "id": "match-b",
      "label": "Matcher",
      "kind": "matcher",
      "group": "cell-b"
    },
    {
      "id": "seq-1",
      "label": "Sequencer 1",
      "group": "consensus"
    },
    {
      "id": "seq-2",
      "label": "Sequencer 2",
      "group": "consensus"
    },
    {
      "id": "seq-3",
      "label": "Sequencer 3",
      "group": "consensus"
    },
    {
      "id": "ledger",
      "label": "Ledger",
      "kind": "mainframe",
      "group": "settlement",
      "state": "healthy",
      "meta": {
        "owner": "core-banking",
        "runbook": "https://runbooks/ledger"
      }
    }
  ],
  "connections": [
    {
      "from": "edge",
      "to": "cell-a",
      "load": 0.5,
      "label": "orders"
    },
    {
      "from": "edge",
      "to": "cell-b",
      "load": 0.5,
      "label": "orders"
    },
    {
      "from": "match-a",
      "to": "consensus",
      "load": 0.7,
      "label": "sequence"
    },
    {
      "from": "match-b",
      "to": "consensus",
      "load": 0.7,
      "label": "sequence"
    },
    {
      "from": "seq-1",
      "to": "seq-2",
      "kind": "gossip",
      "bidirectional": true,
      "load": 0.3
    },
    {
      "from": "seq-2",
      "to": "seq-3",
      "kind": "gossip",
      "bidirectional": true,
      "load": 0.3
    },
    {
      "from": "seq-3",
      "to": "seq-1",
      "kind": "gossip",
      "bidirectional": true,
      "load": 0.3
    },
    {
      "from": "match-a",
      "to": "settlement",
      "kind": "async",
      "load": 0.2,
      "label": "fills"
    },
    {
      "from": "match-b",
      "to": "settlement",
      "kind": "async",
      "load": 0.2,
      "label": "fills"
    }
  ],
  "views": [
    {
      "id": "overview",
      "title": "Trading platform"
    },
    {
      "id": "eu-only",
      "title": "EU region",
      "scope": "eu"
    },
    {
      "id": "matching",
      "title": "Matching path",
      "only": [
        "edge",
        "cell-a",
        "cell-b",
        "consensus"
      ],
      "direction": "down"
    }
  ],
  "scenarios": [
    {
      "id": "cell-drain",
      "label": "Drain cell A for deploy",
      "steps": [
        {
          "note": "Cell A drained, its matcher with it; the edge runs impaired on cell B",
          "set": {
            "drained": [
              "cell-a",
              "match-a"
            ],
            "impaired": {
              "edge": "running on cell B alone"
            }
          },
          "load": [
            {
              "from": "edge",
              "to": "cell-b",
              "load": 1
            }
          ]
        },
        {
          "note": "Back in rotation",
          "restore": [
            "cell-a",
            "match-a",
            "edge"
          ],
          "load": [
            {
              "from": "edge",
              "to": "cell-b",
              "load": 0.5
            }
          ]
        }
      ]
    },
    {
      "id": "quorum",
      "label": "Sequencer quorum loss",
      "steps": [
        {
          "note": "One sequencer out: quorum holds, matchers impaired",
          "set": {
            "outage": "seq-1",
            "impaired": {
              "match-a": "two of three sequencers",
              "match-b": "two of three sequencers",
              "consensus": "one sequencer out"
            }
          }
        },
        {
          "note": "Second out: quorum lost, both matchers in outage, edge in outage",
          "set": {
            "outage": {
              "seq-2": "disk failure",
              "match-a": "quorum lost",
              "match-b": "quorum lost",
              "consensus": "quorum lost",
              "edge": "no matcher available"
            }
          }
        },
        {
          "note": "Second sequencer back; edge in brownout while it catches up",
          "restore": [
            "seq-2"
          ],
          "set": {
            "brownout": {
              "edge": "read-only while the sequencer catches up"
            },
            "impaired": {
              "match-a": "two of three sequencers",
              "match-b": "two of three sequencers",
              "consensus": "catching up"
            }
          }
        }
      ]
    },
    {
      "id": "settlement-box",
      "label": "Settlement black box fails",
      "steps": [
        {
          "note": "The whole settlement boundary is in outage; the ledger inside is untouched, matchers run impaired",
          "set": {
            "outage": "settlement",
            "impaired": {
              "match-a": "settlement unavailable",
              "match-b": "settlement unavailable"
            }
          }
        }
      ]
    }
  ]
}

parallel 2 components · 2 connections · direction right

parallel

Plain image tag: this is what a README shows. Script and pointer events are stripped, animation is not. Open interactive — the same file as a document: outline, click to fail, scenarios, views.

reads writes a b
{
  "components": [
    {
      "id": "a"
    },
    {
      "id": "b"
    }
  ],
  "connections": [
    {
      "id": "reads",
      "from": "a",
      "to": "b",
      "label": "reads",
      "load": 0.6
    },
    {
      "id": "writes",
      "from": "a",
      "to": "b",
      "label": "writes",
      "kind": "async",
      "load": 0.2
    }
  ],
  "scenarios": [
    {
      "id": "s",
      "steps": [
        {
          "load": [
            {
              "id": "writes",
              "load": 0.9
            }
          ]
        }
      ]
    }
  ]
}

Checkout 4 components · 3 connections · direction right

Checkout

Plain image tag: this is what a README shows. Script and pointer events are stripped, animation is not. Open interactive — the same file as a document: outline, click to fail, scenarios, views.

Checkout Data Session cache Storefront Checkout API Orders DB The only write
{
  "$schema": "../../packages/core/schema/v1.json",
  "title": "Checkout",
  "groups": [{ "id": "data", "label": "Data" }, { "id": "sessions", "label": "Session cache", "kind": "cluster", "parent": "data" }],
  "components": [
    { "id": "web", "label": "Storefront", "kind": "client" },
    { "id": "api", "label": "Checkout API" },
    { "id": "db", "label": "Orders DB", "kind": "database", "group": "data" },
    { "id": "redis", "label": "Redis", "kind": "cache", "group": "sessions" }
  ],
  "connections": [
    { "from": "web", "to": "api", "load": 0.8 },
    { "from": "api", "to": "db", "load": 0.6 },
    { "from": "api", "to": "sessions", "kind": "async", "load": 0.5 }
  ],
  "scenarios": [{ "id": "db-fails", "steps": [{ "note": "Orders DB goes down", "set": { "failed": "db", "degraded": { "api": "writes queue" } } }] }],
  "views": [
    { "id": "overview", "collapse": ["sessions"] },
    { "id": "checkout", "type": "sequence", "title": "A customer checks out", "description": "The happy path, then the cache is told.", "messages": [
      { "from": "web", "to": "api", "text": "POST /checkout" },
      { "from": "api", "to": "db", "text": "insert order" },
      { "from": "db", "to": "api", "text": "ok", "reply": true },
      { "from": "api", "to": "sessions", "text": "clear cart" },
      { "from": "api", "to": "api", "text": "audit" },
      { "from": "api", "to": "web", "text": "201 Created", "reply": true }
    ], "play": { "seconds": 1 } },
    { "id": "lookup", "type": "sequence", "title": "A cart lookup", "messages": [{ "from": "web", "to": "api", "text": "GET /cart" }, { "from": "api", "to": "web", "text": "200", "reply": true }] }
  ],
  "callouts": [{ "at": "db", "text": "The only write" }],
  "exports": [{ "id": "checkout", "view": "checkout" }, { "id": "checkout-failed", "view": "checkout", "scenario": "db-fails", "step": 1 }, { "id": "lookup", "view": "lookup", "heading": true }]
}

Every shape 14 components · 2 connections · direction right

Every shape

Plain image tag: this is what a README shows. Script and pointer events are stripped, animation is not. Open interactive — the same file as a document: outline, click to fail, scenarios, views.

Every shape Presets Your own Box Sharp Pill Ellipse Cylinder ×3 Hexagon Diamond Parallelogram Document Card Cloud Ingest Enrich Publish
{
  "$schema": "../../packages/core/schema/v1.json",
  "title": "Every shape",
  "direction": "right",
  "shapes": {
    "define": {
      "chevron": {
        "path": "M0 0H85L100 50 85 100H0L15 50Z",
        "pad": {
          "x": 16,
          "y": 0
        },
        "inner": [15, 0, 85, 100],
        "description": "A stage in a pipeline"
      }
    }
  },
  "kinds": {
    "components": {
      "box": {
        "shape": "box"
      },
      "sharp": {
        "shape": "sharp"
      },
      "pill": {
        "shape": "pill"
      },
      "ellipse": {
        "shape": "ellipse"
      },
      "cylinder": {
        "shape": "cylinder",
        "glyph": "database"
      },
      "hexagon": {
        "shape": "hexagon"
      },
      "diamond": {
        "shape": "diamond"
      },
      "parallelogram": {
        "shape": "parallelogram"
      },
      "document": {
        "shape": "document"
      },
      "card": {
        "shape": "card"
      },
      "cloud": {
        "shape": "cloud"
      },
      "stage": {
        "shape": "chevron"
      }
    },
    "groups": {
      "pipeline": {
        "shape": "cloud",
        "frame": {
          "stroke": "#0891b2"
        },
        "description": "A pipeline"
      },
      "tray": {
        "shape": "card"
      }
    }
  },
  "groups": [
    {
      "id": "presets",
      "label": "Presets",
      "kind": "tray"
    },
    {
      "id": "own",
      "label": "Your own",
      "kind": "pipeline"
    }
  ],
  "components": [
    {
      "id": "box",
      "label": "Box",
      "kind": "box",
      "group": "presets"
    },
    {
      "id": "sharp",
      "label": "Sharp",
      "kind": "sharp",
      "group": "presets"
    },
    {
      "id": "pill",
      "label": "Pill",
      "kind": "pill",
      "group": "presets"
    },
    {
      "id": "ellipse",
      "label": "Ellipse",
      "kind": "ellipse",
      "group": "presets"
    },
    {
      "id": "cylinder",
      "label": "Cylinder",
      "kind": "cylinder",
      "group": "presets",
      "replicas": 3
    },
    {
      "id": "hexagon",
      "label": "Hexagon",
      "kind": "hexagon",
      "group": "presets"
    },
    {
      "id": "diamond",
      "label": "Diamond",
      "kind": "diamond",
      "group": "presets"
    },
    {
      "id": "parallelogram",
      "label": "Parallelogram",
      "kind": "parallelogram",
      "group": "presets"
    },
    {
      "id": "document",
      "label": "Document",
      "kind": "document",
      "group": "presets"
    },
    {
      "id": "card",
      "label": "Card",
      "kind": "card",
      "group": "presets"
    },
    {
      "id": "cloud",
      "label": "Cloud",
      "kind": "cloud",
      "group": "presets"
    },
    {
      "id": "ingest",
      "label": "Ingest",
      "kind": "stage",
      "group": "own"
    },
    {
      "id": "enrich",
      "label": "Enrich",
      "kind": "stage",
      "group": "own"
    },
    {
      "id": "publish",
      "label": "Publish",
      "kind": "stage",
      "group": "own"
    }
  ],
  "connections": [
    {
      "from": "ingest",
      "to": "enrich"
    },
    {
      "from": "enrich",
      "to": "publish"
    }
  ],
  "views": [
    {
      "id": "overview",
      "title": "Overview"
    },
    {
      "id": "closed",
      "title": "Closed",
      "collapse": [
        "own"
      ]
    }
  ]
}

Checkout, first sketch 4 components · 0 connections · direction right

Checkout, first sketch

Plain image tag: this is what a README shows. Script and pointer events are stripped, animation is not. Open interactive — the same file as a document: outline, click to fail, scenarios, views.

Checkout, first sketch web api orders payments
{
  "$schema": "https://raw.githubusercontent.com/adamgilman/Orrery/main/packages/core/schema/v1.json",
  "title": "Checkout, first sketch",
  "components": [
    { "id": "web", "kind": "gateway" },
    { "id": "api" },
    { "id": "orders", "kind": "database" },
    { "id": "payments", "kind": "external" }
  ]
}

Three tier 3 components · 2 connections · direction right

Three tier

Plain image tag: this is what a README shows. Script and pointer events are stripped, animation is not. Open interactive — the same file as a document: outline, click to fail, scenarios, views.

Three tier HTTPS Web API DB
{
  "title": "Three tier",
  "direction": "right",
  "components": [
    {
      "id": "web",
      "label": "Web"
    },
    {
      "id": "api",
      "label": "API"
    },
    {
      "id": "db",
      "label": "DB"
    }
  ],
  "connections": [
    {
      "from": "web",
      "to": "api",
      "load": 0.8,
      "label": "HTTPS"
    },
    {
      "from": "api",
      "to": "db",
      "load": 0.4
    }
  ]
}

warning-double 2 components · 4 connections · direction right

warning-double

Plain image tag: this is what a README shows. Script and pointer events are stripped, animation is not. Open interactive — the same file as a document: outline, click to fail, scenarios, views.

g x m
{
  "groups": [
    {
      "id": "g"
    }
  ],
  "components": [
    {
      "id": "x"
    },
    {
      "id": "m",
      "group": "g"
    }
  ],
  "connections": [
    {
      "from": "x",
      "to": "g"
    },
    {
      "from": "x",
      "to": "m"
    },
    {
      "from": "m",
      "to": "x"
    },
    {
      "from": "g",
      "to": "x"
    }
  ]
}