Skip to content

Core ContainerDiagram Spec

Source: core.container-diagram.json

This schema describes the ContainerDiagram spec for the Core backend.

Properties

Properties

Field Type Description
type(required) string Type of the diagram. Must be exactly ContainerDiagram.
title string | null Optional diagram title.
elements array[Element] Top-level elements.
boundaries array[Boundary] Top-level boundaries.
relationships array[RelationshipSchema] Top-level relationships.
Examples
JSON source
{
  "type": "ContainerDiagram",
  "title": "Web App",
  "elements": [
    {
      "type": "Person",
      "alias": "user",
      "label": "User"
    }
  ],
  "boundaries": [
    {
      "type": "SystemBoundary",
      "alias": "system",
      "label": "Simple System",
      "elements": [
        {
          "type": "Container",
          "alias": "web",
          "label": "Web App",
          "technology": "React"
        },
        {
          "type": "Container",
          "alias": "api",
          "label": "API",
          "technology": "Python"
        },
        {
          "type": "ContainerDb",
          "alias": "db",
          "label": "Database",
          "technology": "PostgreSQL"
        }
      ]
    }
  ],
  "relationships": [
    {
      "type": "REL",
      "from": "user",
      "to": "web",
      "label": "Uses"
    },
    {
      "type": "REL",
      "from": "web",
      "to": "api",
      "label": "Calls"
    },
    {
      "type": "REL",
      "from": "api",
      "to": "db",
      "label": "Reads/Writes"
    }
  ]
}
JSON source
{
  "type": "ContainerDiagram",
  "title": "Online Shop - Container Diagram",
  "elements": [
    {
      "type": "Person",
      "alias": "customer",
      "label": "Customer",
      "description": "Browses products and places orders.",
      "properties": {
        "properties": [
          [
            "Channel",
            "Web / Mobile"
          ]
        ]
      }
    },
    {
      "type": "PersonExt",
      "alias": "support_agent",
      "label": "Support Agent",
      "description": "Investigates customer issues from an external support tool.",
      "properties": {
        "properties": [
          [
            "Organization",
            "Support Vendor"
          ]
        ]
      }
    },
    {
      "type": "SystemExt",
      "alias": "payment_provider",
      "label": "Payment Provider",
      "description": "Processes card payments and payment webhooks."
    },
    {
      "type": "ContainerExt",
      "alias": "recommendation_api",
      "label": "Recommendation API",
      "description": "Returns personalized product recommendations."
    },
    {
      "type": "ContainerDbExt",
      "alias": "fraud_db",
      "label": "Fraud Signals DB",
      "description": "External datastore containing fraud intelligence.",
      "technology": "Vendor DB"
    },
    {
      "type": "ContainerQueueExt",
      "alias": "shipping_events",
      "label": "Shipping Events Topic",
      "description": "External topic used by logistics partner.",
      "technology": "Kafka"
    }
  ],
  "boundaries": [
    {
      "type": "EnterpriseBoundary",
      "alias": "acme",
      "label": "Acme Corp",
      "description": "Enterprise boundary for internal platforms.",
      "properties": {
        "properties": [
          [
            "Region",
            "EU"
          ],
          [
            "Business Unit",
            "Digital Commerce"
          ]
        ]
      },
      "boundaries": [
        {
          "type": "SystemBoundary",
          "alias": "shop_boundary",
          "label": "Online Shop Platform",
          "description": "Main system boundary for the commerce platform.",
          "properties": {
            "properties": [
              [
                "Owner",
                "Commerce Team"
              ],
              [
                "Environment",
                "Production"
              ]
            ]
          },
          "elements": [
            {
              "type": "Container",
              "alias": "web_app",
              "label": "Web Application",
              "description": "Serves the storefront and checkout UI.",
              "technology": "React + Next.js",
              "properties": {
                "properties": [
                  [
                    "Runtime",
                    "Node.js"
                  ],
                  [
                    "Team",
                    "Storefront"
                  ]
                ]
              }
            },
            {
              "type": "Container",
              "alias": "backend_api",
              "label": "Backend API",
              "description": "Handles catalog, carts, checkout, and order APIs.",
              "technology": "Python / FastAPI",
              "properties": {
                "properties": [
                  [
                    "Runtime",
                    "Python 3.12"
                  ],
                  [
                    "Team",
                    "Platform"
                  ]
                ]
              }
            },
            {
              "type": "ContainerDb",
              "alias": "orders_db",
              "label": "Orders Database",
              "description": "Stores orders, payments, and status transitions.",
              "technology": "PostgreSQL",
              "properties": {
                "properties": [
                  [
                    "Engine",
                    "PostgreSQL 16"
                  ],
                  [
                    "HA",
                    "Primary / Replica"
                  ]
                ]
              }
            },
            {
              "type": "ContainerQueue",
              "alias": "order_events",
              "label": "Order Events Queue",
              "description": "Publishes asynchronous order lifecycle events.",
              "technology": "Kafka",
              "properties": {
                "properties": [
                  [
                    "Retention",
                    "7 days"
                  ],
                  [
                    "Format",
                    "JSON"
                  ]
                ]
              }
            }
          ],
          "boundaries": [
            {
              "type": "ContainerBoundary",
              "alias": "checkout_boundary",
              "label": "Checkout Subsystem",
              "description": "Groups checkout-related containers.",
              "properties": {
                "properties": [
                  [
                    "Owner",
                    "Checkout Team"
                  ],
                  [
                    "Criticality",
                    "High"
                  ]
                ]
              },
              "elements": [
                {
                  "type": "Container",
                  "alias": "checkout_api",
                  "label": "Checkout API",
                  "description": "Handles checkout and payment orchestration.",
                  "technology": "Python / FastAPI"
                },
                {
                  "type": "ContainerDb",
                  "alias": "checkout_db",
                  "label": "Checkout DB",
                  "description": "Stores checkout sessions.",
                  "technology": "PostgreSQL"
                }
              ],
              "relationships": [
                {
                  "type": "REL",
                  "from": "checkout_api",
                  "to": "checkout_db",
                  "label": "Reads and writes",
                  "technology": "SQL"
                }
              ]
            }
          ]
        }
      ]
    }
  ],
  "relationships": [
    {
      "type": "REL",
      "from": "customer",
      "to": "web_app",
      "label": "Uses",
      "technology": "HTTPS"
    },
    {
      "type": "REL",
      "from": "web_app",
      "to": "backend_api",
      "label": "Calls",
      "technology": "HTTPS/JSON"
    },
    {
      "type": "REL",
      "from": "backend_api",
      "to": "orders_db",
      "label": "Reads and writes",
      "technology": "SQL"
    },
    {
      "type": "REL",
      "from": "backend_api",
      "to": "order_events",
      "label": "Publishes order events",
      "technology": "Kafka"
    },
    {
      "type": "REL",
      "from": "backend_api",
      "to": "payment_provider",
      "label": "Creates payment intents",
      "technology": "REST API"
    },
    {
      "type": "REL",
      "from": "backend_api",
      "to": "recommendation_api",
      "label": "Fetches recommendations",
      "technology": "REST API"
    },
    {
      "type": "REL",
      "from": "backend_api",
      "to": "fraud_db",
      "label": "Checks fraud signals",
      "technology": "JDBC"
    },
    {
      "type": "REL",
      "from": "shipping_events",
      "to": "backend_api",
      "label": "Delivers shipping updates",
      "technology": "Kafka"
    },
    {
      "type": "REL",
      "from": "support_agent",
      "to": "backend_api",
      "label": "Queries order state",
      "technology": "HTTPS"
    }
  ]
}

Elements

Boundaries

Relationships

Definitions

About labels and aliases

label is a display name for the element.

alias is a unique identifier used for referencing elements in relationships and layouts. If omitted, it is generated automatically.

You can also use label for referencing elements in relationships and layouts, but each label must be unique within the diagram.


BoundarySchema

This schema describes the Boundary diagram component.

Properties

Field Type Description
type(required) string Discriminator identifying the element type. Must be exactly Boundary.
elements array[Element] Elements may be nested arbitrarily.
boundaries array[Boundary] Boundaries may be nested arbitrarily.
relationships array[RelationshipSchema] Relationships declared inside the boundary.
alias string | null Unique identifier for the element. If not provided, it is autogenerated from the label.
description string | null Optional description text.
label(required) string Display name for the element.
properties DiagramElementPropertiesSchema Optional property table metadata.

ContainerBoundarySchema

This schema describes the ContainerBoundary diagram component.

Properties

Field Type Description
type(required) string Discriminator identifying the element type. Must be exactly ContainerBoundary.
elements array[Element] Elements may be nested arbitrarily.
boundaries array[Boundary] Boundaries may be nested arbitrarily.
relationships array[RelationshipSchema] Relationships declared inside the boundary.
alias string | null Unique identifier for the element. If not provided, it is autogenerated from the label.
description string | null Optional description text.
label(required) string Display name for the element.
properties DiagramElementPropertiesSchema Optional property table metadata.

ContainerDbExtSchema

This schema describes the ContainerDbExt diagram component.

Properties

Field Type Description
type(required) string Discriminator identifying the element type. Must be exactly ContainerDbExt.
alias string | null Unique identifier for the element. If not provided, it is autogenerated from the label.
description string | null Optional description text.
label(required) string Display name for the element.
properties DiagramElementPropertiesSchema Optional property table metadata.
technology string | null Optional technology.

ContainerDbSchema

This schema describes the ContainerDb diagram component.

Properties

Field Type Description
type(required) string Discriminator identifying the element type. Must be exactly ContainerDb.
alias string | null Unique identifier for the element. If not provided, it is autogenerated from the label.
description string | null Optional description text.
label(required) string Display name for the element.
properties DiagramElementPropertiesSchema Optional property table metadata.
technology string | null Optional technology.

ContainerExtSchema

This schema describes the ContainerExt diagram component.

Properties

Field Type Description
type(required) string Discriminator identifying the element type. Must be exactly ContainerExt.
alias string | null Unique identifier for the element. If not provided, it is autogenerated from the label.
description string | null Optional description text.
label(required) string Display name for the element.
properties DiagramElementPropertiesSchema Optional property table metadata.
technology string | null Optional technology.

ContainerQueueExtSchema

This schema describes the ContainerQueueExt diagram component.

Properties

Field Type Description
type(required) string Discriminator identifying the element type. Must be exactly ContainerQueueExt.
alias string | null Unique identifier for the element. If not provided, it is autogenerated from the label.
description string | null Optional description text.
label(required) string Display name for the element.
properties DiagramElementPropertiesSchema Optional property table metadata.
technology string | null Optional technology.

ContainerQueueSchema

This schema describes the ContainerQueue diagram component.

Properties

Field Type Description
type(required) string Discriminator identifying the element type. Must be exactly ContainerQueue.
alias string | null Unique identifier for the element. If not provided, it is autogenerated from the label.
description string | null Optional description text.
label(required) string Display name for the element.
properties DiagramElementPropertiesSchema Optional property table metadata.
technology string | null Optional technology.

ContainerSchema

This schema describes the Container diagram component.

Properties

Field Type Description
type(required) string Discriminator identifying the element type. Must be exactly Container.
alias string | null Unique identifier for the element. If not provided, it is autogenerated from the label.
description string | null Optional description text.
label(required) string Display name for the element.
properties DiagramElementPropertiesSchema Optional property table metadata.
technology string | null Optional technology.

DiagramElementPropertiesSchema

JSON schema for tabular diagram element properties.

Properties

Field Type Description
header array[string] Header columns. Default: ["Property", "Value"].
properties(required) array[array[string]] List of rows (each row is a list of string values).
show_header boolean Whether to display the header row. Default: true.

EnterpriseBoundarySchema

This schema describes the EnterpriseBoundary diagram component.

Properties

Field Type Description
type(required) string Discriminator identifying the element type. Must be exactly EnterpriseBoundary.
elements array[Element] Elements may be nested arbitrarily.
boundaries array[Boundary] Boundaries may be nested arbitrarily.
relationships array[RelationshipSchema] Relationships declared inside the boundary.
alias string | null Unique identifier for the element. If not provided, it is autogenerated from the label.
description string | null Optional description text.
label(required) string Display name for the element.
properties DiagramElementPropertiesSchema Optional property table metadata.

PersonExtSchema

This schema describes the PersonExt diagram component.

Properties

Field Type Description
type(required) string Discriminator identifying the element type. Must be exactly PersonExt.
alias string | null Unique identifier for the element. If not provided, it is autogenerated from the label.
description string | null Optional description text.
label(required) string Display name for the element.
properties DiagramElementPropertiesSchema Optional property table metadata.

PersonSchema

This schema describes the Person diagram component.

Properties

Field Type Description
type(required) string Discriminator identifying the element type. Must be exactly Person.
alias string | null Unique identifier for the element. If not provided, it is autogenerated from the label.
description string | null Optional description text.
label(required) string Display name for the element.
properties DiagramElementPropertiesSchema Optional property table metadata.

RelationshipSchema

This schema describes the Relationship diagram component.

Properties

Field Type Description
type(required) string Type of the relationship. Must be exactly REL.
description string | null Additional details about the relationship.
from(required) string The source element alias (or unique label).
label(required) string The label shown on the relationship edge.
properties DiagramElementPropertiesSchema Optional property table metadata.
technology string | null The technology used in the communication.
to(required) string The destination element alias (or unique label).

SystemBoundarySchema

This schema describes the SystemBoundary diagram component.

Properties

Field Type Description
type(required) string Discriminator identifying the element type. Must be exactly SystemBoundary.
elements array[Element] Elements may be nested arbitrarily.
boundaries array[Boundary] Boundaries may be nested arbitrarily.
relationships array[RelationshipSchema] Relationships declared inside the boundary.
alias string | null Unique identifier for the element. If not provided, it is autogenerated from the label.
description string | null Optional description text.
label(required) string Display name for the element.
properties DiagramElementPropertiesSchema Optional property table metadata.

SystemDbExtSchema

This schema describes the SystemDbExt diagram component.

Properties

Field Type Description
type(required) string Discriminator identifying the element type. Must be exactly SystemDbExt.
alias string | null Unique identifier for the element. If not provided, it is autogenerated from the label.
description string | null Optional description text.
label(required) string Display name for the element.
properties DiagramElementPropertiesSchema Optional property table metadata.

SystemDbSchema

This schema describes the SystemDb diagram component.

Properties

Field Type Description
type(required) string Discriminator identifying the element type. Must be exactly SystemDb.
alias string | null Unique identifier for the element. If not provided, it is autogenerated from the label.
description string | null Optional description text.
label(required) string Display name for the element.
properties DiagramElementPropertiesSchema Optional property table metadata.

SystemExtSchema

This schema describes the SystemExt diagram component.

Properties

Field Type Description
type(required) string Discriminator identifying the element type. Must be exactly SystemExt.
alias string | null Unique identifier for the element. If not provided, it is autogenerated from the label.
description string | null Optional description text.
label(required) string Display name for the element.
properties DiagramElementPropertiesSchema Optional property table metadata.

SystemQueueExtSchema

This schema describes the SystemQueueExt diagram component.

Properties

Field Type Description
type(required) string Discriminator identifying the element type. Must be exactly SystemQueueExt.
alias string | null Unique identifier for the element. If not provided, it is autogenerated from the label.
description string | null Optional description text.
label(required) string Display name for the element.
properties DiagramElementPropertiesSchema Optional property table metadata.

SystemQueueSchema

This schema describes the SystemQueue diagram component.

Properties

Field Type Description
type(required) string Discriminator identifying the element type. Must be exactly SystemQueue.
alias string | null Unique identifier for the element. If not provided, it is autogenerated from the label.
description string | null Optional description text.
label(required) string Display name for the element.
properties DiagramElementPropertiesSchema Optional property table metadata.

SystemSchema

This schema describes the System diagram component.

Properties

Field Type Description
type(required) string Discriminator identifying the element type. Must be exactly System.
alias string | null Unique identifier for the element. If not provided, it is autogenerated from the label.
description string | null Optional description text.
label(required) string Display name for the element.
properties DiagramElementPropertiesSchema Optional property table metadata.