{
  "title": "Simple Service",
  "description": "Models a simple API service that handles HTTP requests and publishes events",
  "type": "service",
  "data": {
    "nodes": [
      {
        "id": "service-orders",
        "type": "service",
        "position": {
          "x": 400,
          "y": 200
        },
        "data": {
          "mode": "full",
          "service": {
            "id": "orders-service",
            "name": "Orders Service",
            "owners": [
              "orders-team"
            ],
            "sends": [
              "OrderCreated",
              "OrderUpdated",
              "OrderCancelled"
            ],
            "receives": [
              "CreateOrder",
              "UpdateOrder",
              "CancelOrder"
            ],
            "version": "1.0.0",
            "summary": "REST API service that manages customer orders and publishes order events"
          },
          "editor": {
            "title": "Service",
            "subtitle": "Edit the details of the service",
            "schema": {
              "type": "object",
              "required": [
                "service",
                "mode"
              ],
              "properties": {
                "service": {
                  "type": "object",
                  "required": [
                    "name",
                    "version"
                  ],
                  "properties": {
                    "name": {
                      "type": "string",
                      "title": "Name",
                      "default": "Random value",
                      "description": "The name of the service"
                    },
                    "version": {
                      "type": "string",
                      "title": "Version",
                      "default": "1.0.0",
                      "description": "The version number (e.g., 1.0.0)",
                      "pattern": "^\\d+\\.\\d+\\.\\d+(?:-[\\w.-]+)?(?:\\+[\\w.-]+)?$"
                    },
                    "summary": {
                      "type": "string",
                      "title": "Summary",
                      "default": "",
                      "description": "A brief summary of the service"
                    }
                  }
                }
              }
            }
          }
        },
        "measured": {
          "width": 262,
          "height": 113
        },
        "selected": false,
        "dragging": false
      },
      {
        "id": "event-order-created",
        "type": "event",
        "position": {
          "x": 800,
          "y": 50
        },
        "data": {
          "mode": "full",
          "message": {
            "id": "order-created",
            "name": "OrderCreated",
            "version": "1.0.0",
            "summary": "Event published when a new order is successfully created"
          },
          "editor": {
            "title": "Event",
            "subtitle": "Edit the details of the event",
            "schema": {
              "type": "object",
              "required": [
                "message",
                "mode"
              ],
              "properties": {
                "message": {
                  "type": "object",
                  "required": [
                    "name",
                    "version"
                  ],
                  "properties": {
                    "name": {
                      "type": "string",
                      "title": "Name",
                      "default": "Random value",
                      "description": "The name of the event"
                    },
                    "version": {
                      "type": "string",
                      "title": "Version",
                      "default": "1.0.0",
                      "description": "The version number (e.g., 1.0.0)",
                      "pattern": "^\\d+\\.\\d+\\.\\d+(?:-[\\w.-]+)?(?:\\+[\\w.-]+)?$"
                    },
                    "summary": {
                      "type": "string",
                      "title": "Summary",
                      "default": "",
                      "description": "A brief summary of the event"
                    }
                  }
                }
              }
            }
          }
        },
        "measured": {
          "width": 262,
          "height": 98
        },
        "selected": false,
        "dragging": false
      },
      {
        "id": "service-inventory",
        "type": "service",
        "position": {
          "x": 1200,
          "y": 300
        },
        "data": {
          "mode": "full",
          "service": {
            "id": "inventory-service",
            "name": "Inventory Service",
            "owners": [
              "inventory-team"
            ],
            "sends": [
              "StockUpdated",
              "LowStockAlert"
            ],
            "receives": [
              "OrderCreated"
            ],
            "version": "1.2.0",
            "summary": "Service that manages product inventory and stock levels"
          },
          "editor": {
            "title": "Service",
            "subtitle": "Edit the details of the service",
            "schema": {
              "type": "object",
              "required": [
                "service",
                "mode"
              ],
              "properties": {
                "service": {
                  "type": "object",
                  "required": [
                    "name",
                    "version"
                  ],
                  "properties": {
                    "name": {
                      "type": "string",
                      "title": "Name",
                      "default": "Random value",
                      "description": "The name of the service"
                    },
                    "version": {
                      "type": "string",
                      "title": "Version",
                      "default": "1.0.0",
                      "description": "The version number (e.g., 1.0.0)",
                      "pattern": "^\\d+\\.\\d+\\.\\d+(?:-[\\w.-]+)?(?:\\+[\\w.-]+)?$"
                    },
                    "summary": {
                      "type": "string",
                      "title": "Summary",
                      "default": "",
                      "description": "A brief summary of the service"
                    }
                  }
                }
              }
            }
          }
        },
        "measured": {
          "width": 262,
          "height": 98
        },
        "selected": false,
        "dragging": false
      },
      {
        "id": "channel-kafka",
        "type": "channel",
        "position": {
          "x": 800,
          "y": 200
        },
        "data": {
          "mode": "full",
          "channel": {
            "id": "order-events-topic",
            "name": "order-events",
            "version": "1.0.0",
            "summary": "Kafka topic for order-related events"
          },
          "editor": {
            "title": "Channel",
            "subtitle": "Edit the details of the channel",
            "schema": {
              "type": "object",
              "required": [
                "channel",
                "mode"
              ],
              "properties": {
                "channel": {
                  "type": "object",
                  "required": [
                    "name",
                    "version"
                  ],
                  "properties": {
                    "name": {
                      "type": "string",
                      "title": "Name",
                      "default": "Random value",
                      "description": "The name of the channel"
                    },
                    "version": {
                      "type": "string",
                      "title": "Version",
                      "default": "1.0.0",
                      "description": "The version number (e.g., 1.0.0)",
                      "pattern": "^\\d+\\.\\d+\\.\\d+(?:-[\\w.-]+)?(?:\\+[\\w.-]+)?$"
                    },
                    "summary": {
                      "type": "string",
                      "title": "Summary",
                      "default": "",
                      "description": "A brief summary of the channel"
                    }
                  }
                }
              }
            }
          }
        },
        "measured": {
          "width": 262,
          "height": 100
        },
        "selected": false,
        "dragging": false
      },
      {
        "id": "query-create-order",
        "type": "query",
        "position": {
          "x": 50,
          "y": 101
        },
        "data": {
          "mode": "full",
          "message": {
            "id": "create-order-api",
            "name": "POST /orders",
            "version": "1.0.0",
            "summary": "HTTP API endpoint to create a new customer order"
          },
          "editor": {
            "title": "Query",
            "subtitle": "Edit the details of the query",
            "schema": {
              "type": "object",
              "required": [
                "message",
                "mode"
              ],
              "properties": {
                "message": {
                  "type": "object",
                  "required": [
                    "name",
                    "version"
                  ],
                  "properties": {
                    "name": {
                      "type": "string",
                      "title": "Name",
                      "default": "Random value",
                      "description": "The name of the service"
                    },
                    "version": {
                      "type": "string",
                      "title": "Version",
                      "default": "1.0.0",
                      "description": "The version number (e.g., 1.0.0)",
                      "pattern": "^\\d+\\.\\d+\\.\\d+(?:-[\\w.-]+)?(?:\\+[\\w.-]+)?$"
                    },
                    "summary": {
                      "type": "string",
                      "title": "Summary",
                      "default": "",
                      "description": "A brief summary of the service"
                    }
                  }
                }
              }
            }
          }
        },
        "measured": {
          "width": 262,
          "height": 98
        },
        "selected": false,
        "dragging": false
      },
      {
        "id": "query-get-orders",
        "type": "query",
        "position": {
          "x": 50,
          "y": 250
        },
        "data": {
          "mode": "full",
          "message": {
            "id": "get-orders-api",
            "name": "GET /orders",
            "version": "1.0.0",
            "summary": "HTTP API endpoint to retrieve customer orders"
          },
          "editor": {
            "title": "Query",
            "subtitle": "Edit the details of the query",
            "schema": {
              "type": "object",
              "required": [
                "message",
                "mode"
              ],
              "properties": {
                "message": {
                  "type": "object",
                  "required": [
                    "name",
                    "version"
                  ],
                  "properties": {
                    "name": {
                      "type": "string",
                      "title": "Name",
                      "default": "Random value",
                      "description": "The name of the service"
                    },
                    "version": {
                      "type": "string",
                      "title": "Version",
                      "default": "1.0.0",
                      "description": "The version number (e.g., 1.0.0)",
                      "pattern": "^\\d+\\.\\d+\\.\\d+(?:-[\\w.-]+)?(?:\\+[\\w.-]+)?$"
                    },
                    "summary": {
                      "type": "string",
                      "title": "Summary",
                      "default": "",
                      "description": "A brief summary of the service"
                    }
                  }
                }
              }
            }
          }
        },
        "measured": {
          "width": 262,
          "height": 98
        },
        "selected": false,
        "dragging": false
      },
      {
        "id": "event-order-updated",
        "type": "event",
        "position": {
          "x": 800,
          "y": 350
        },
        "data": {
          "mode": "full",
          "message": {
            "id": "order-updated",
            "name": "OrderUpdated",
            "version": "1.0.0",
            "summary": "Event published when an order status is updated"
          },
          "editor": {
            "title": "Event",
            "subtitle": "Edit the details of the event",
            "schema": {
              "type": "object",
              "required": [
                "message",
                "mode"
              ],
              "properties": {
                "message": {
                  "type": "object",
                  "required": [
                    "name",
                    "version"
                  ],
                  "properties": {
                    "name": {
                      "type": "string",
                      "title": "Name",
                      "default": "Random value",
                      "description": "The name of the event"
                    },
                    "version": {
                      "type": "string",
                      "title": "Version",
                      "default": "1.0.0",
                      "description": "The version number (e.g., 1.0.0)",
                      "pattern": "^\\d+\\.\\d+\\.\\d+(?:-[\\w.-]+)?(?:\\+[\\w.-]+)?$"
                    },
                    "summary": {
                      "type": "string",
                      "title": "Summary",
                      "default": "",
                      "description": "A brief summary of the event"
                    }
                  }
                }
              }
            }
          }
        },
        "measured": {
          "width": 262,
          "height": 98
        },
        "selected": false,
        "dragging": false
      },
      {
        "id": "data-orders-db",
        "type": "data",
        "position": {
          "x": 400,
          "y": 350
        },
        "data": {
          "mode": "full",
          "data": {
            "id": "orders-database",
            "name": "Orders Database",
            "owners": ["orders-team"],
            "schemas": [],
            "version": "1.0.0",
            "summary": "PostgreSQL database storing order data, customer information, and transaction history",
            "type": "Database"
          },
          "editor": {
            "title": "Data Store",
            "subtitle": "Edit the details of the data store",
            "schema": {
              "type": "object",
              "required": [
                "data",
                "mode"
              ],
              "properties": {
                "data": {
                  "type": "object",
                  "required": [
                    "name",
                    "version"
                  ],
                  "properties": {
                    "name": {
                      "type": "string",
                      "title": "Name",
                      "default": "UserDatabase",
                      "description": "The name of the data store"
                    },
                    "version": {
                      "type": "string",
                      "title": "Version",
                      "default": "1.0.0",
                      "description": "The version number (e.g., 1.0.0)",
                      "pattern": "^\\\\d+\\\\.\\\\d+\\\\.\\\\d+(?:-[\\\\w.-]+)?(?:\\\\+[\\\\w.-]+)?$"
                    },
                    "summary": {
                      "type": "string",
                      "title": "Summary",
                      "default": "",
                      "description": "A brief summary of the data store"
                    },
                    "type": {
                      "type": "string",
                      "title": "Type",
                      "default": "Database",
                      "description": "The type of data store (Database, Cache, Queue, etc.)",
                      "enum": [
                        "Database",
                        "Cache",
                        "Queue",
                        "File System",
                        "Data Lake",
                        "Data Warehouse"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "measured": {
          "width": 262,
          "height": 98
        },
        "selected": false,
        "dragging": false
      },
      {
        "id": "note-instructions",
        "type": "note",
        "position": {
          "x": 50,
          "y": 380
        },
        "data": {
          "text": "🚀 **Welcome to EventCatalog Studio!**\n\nThis template shows a typical microservice architecture:\n\n**📡 HTTP APIs** (left) → **⚙️ Orders Service** ↔ **🗄️ Orders Database**\n**⚙️ Orders Service** → **📢 Events** → **🚀 Kafka Topic** → **📦 Inventory Service**\n\n**How to use:**\n• **Double-click** any component to edit details\n• **Click & drag** to move components around\n• **Right-click** for context menu options\n• **Add new components** from the left sidebar\n• **Connect components** by dragging from edge handles\n\n**💡 Pro tip:** Click on any component and use the **Edit** button to customize names, versions, and descriptions!\n\nDelete this note when you're ready to start designing your own architecture.",
          "color": "blue"
        },
        "measured": {
          "width": 280,
          "height": 320
        },
        "selected": false,
        "dragging": false,
        "width": 280,
        "height": 320,
        "resizing": false
      }
    ],
    "edges": [
      {
        "source": "query-create-order",
        "target": "service-orders",
        "label": "HTTP Request",
        "markerEnd": {
          "type": "arrowclosed",
          "color": "#000000"
        },
        "animated": false,
        "type": "default",
        "data": {
          "source": "query",
          "target": "service",
          "message": {
            "collection": "queries",
            "opacity": 1
          }
        },
        "id": "xy-edge__query-create-order-service-orders"
      },
      {
        "source": "query-get-orders",
        "target": "service-orders",
        "label": "HTTP Request",
        "markerEnd": {
          "type": "arrowclosed",
          "color": "#000000"
        },
        "animated": false,
        "type": "default",
        "data": {
          "source": "query",
          "target": "service",
          "message": {
            "collection": "queries",
            "opacity": 1
          }
        },
        "id": "xy-edge__query-get-orders-service-orders"
      },
      {
        "source": "service-orders",
        "target": "event-order-created",
        "label": "Publishes",
        "markerEnd": {
          "type": "arrowclosed",
          "color": "#000000"
        },
        "animated": true,
        "type": "animatedMessage",
        "data": {
          "source": "service",
          "target": "event",
          "message": {
            "collection": "events",
            "opacity": 1
          }
        },
        "id": "xy-edge__service-orders-event-order-created"
      },
      {
        "source": "service-orders",
        "target": "event-order-updated",
        "label": "Publishes",
        "markerEnd": {
          "type": "arrowclosed",
          "color": "#000000"
        },
        "animated": true,
        "type": "animatedMessage",
        "data": {
          "source": "service",
          "target": "event",
          "message": {
            "collection": "events",
            "opacity": 1
          }
        },
        "id": "xy-edge__service-orders-event-order-updated"
      },
      {
        "source": "event-order-created",
        "target": "channel-kafka",
        "label": "Published to",
        "markerEnd": {
          "type": "arrowclosed",
          "color": "#000000"
        },
        "animated": true,
        "type": "animatedMessage",
        "data": {
          "source": "event",
          "target": "channel",
          "message": {
            "collection": "events",
            "opacity": 1
          }
        },
        "id": "xy-edge__event-order-created-channel-kafka"
      },
      {
        "source": "event-order-updated",
        "target": "channel-kafka",
        "label": "Published to",
        "markerEnd": {
          "type": "arrowclosed",
          "color": "#000000"
        },
        "animated": true,
        "type": "animatedMessage",
        "data": {
          "source": "event",
          "target": "channel",
          "message": {
            "collection": "events",
            "opacity": 1
          }
        },
        "id": "xy-edge__event-order-updated-channel-kafka"
      },
      {
        "source": "channel-kafka",
        "target": "service-inventory",
        "label": "Consumes",
        "markerEnd": {
          "type": "arrowclosed",
          "color": "#000000"
        },
        "animated": true,
        "type": "animatedMessage",
        "data": {
          "source": "channel",
          "target": "service",
          "message": {
            "collection": "events",
            "opacity": 1
          }
        },
        "id": "xy-edge__channel-kafka-service-inventory"
      },
      {
        "source": "service-orders",
        "target": "data-orders-db",
        "label": "Reads/Writes",
        "markerEnd": {
          "type": "arrowclosed",
          "color": "#000000"
        },
        "animated": false,
        "type": "default",
        "data": {
          "source": "service",
          "target": "data",
          "message": {
            "collection": "data",
            "opacity": 1
          }
        },
        "id": "xy-edge__service-orders-data-orders-db"
      }
    ],
    "viewport": {
      "x": 100,
      "y": 50,
      "zoom": 0.8
    },
    "creationDate": "2025-01-01T00:00:00.000Z",
    "name": "Simple Service Example",
    "version": "1.0.0",
    "source": "https://eventcatalog.dev",
    "appState": {},
    "id": "simple-service-example"
  },
  "usecase": "Design a Service",
  "mermaid": "flowchart LR\n    A[API] --> B[Service]\n    B --> C[Database]\n    B --> D[Events]",
  "tags": ["Microservices"]
}