{
  "schema_version": 1,
  "diagram_type": "architecture",
  "meta": {
    "title": "平台依赖：进程内组件与共享基础设施",
    "locale": "zh-CN",
    "quality_profile": "showcase",
    "viewBox": [
      1380,
      610
    ]
  },
  "components": [
    {
      "id": "business-processes",
      "type": "backend",
      "label": "业务服务进程",
      "sublabel": "7 个独立 Spring Boot 应用",
      "pos": [
        45,
        260
      ],
      "size": [
        230,
        80
      ]
    },
    {
      "id": "message-selection",
      "type": "backend",
      "label": "服务消息配置",
      "sublabel": "device / insight 显式装配",
      "pos": [
        395,
        260
      ],
      "size": [
        225,
        80
      ]
    },
    {
      "id": "redis-library",
      "type": "messagebus",
      "label": "messaging-redis",
      "sublabel": "普通 JAR · 当前唯一适配器",
      "pos": [
        740,
        260
      ],
      "size": [
        235,
        80
      ]
    },
    {
      "id": "shared-redis",
      "type": "database",
      "label": "共享 Redis",
      "sublabel": "KV / Streams / PubSub",
      "pos": [
        1130,
        260
      ],
      "size": [
        205,
        80
      ]
    },
    {
      "id": "common-library",
      "type": "backend",
      "label": "hbada-common",
      "sublabel": "普通 JAR · 技术公共能力",
      "pos": [
        45,
        50
      ],
      "size": [
        230,
        80
      ]
    },
    {
      "id": "contracts-library",
      "type": "backend",
      "label": "hbada-contracts",
      "sublabel": "普通 JAR · Feign / DTO",
      "pos": [
        395,
        50
      ],
      "size": [
        225,
        80
      ]
    },
    {
      "id": "message-api",
      "type": "messagebus",
      "label": "messaging-api",
      "sublabel": "普通 JAR · 纯 Java 消息端口",
      "pos": [
        740,
        50
      ],
      "size": [
        235,
        80
      ]
    },
    {
      "id": "discovery",
      "type": "cloud",
      "label": "Nacos",
      "sublabel": "仅服务注册与发现",
      "pos": [
        45,
        470
      ],
      "size": [
        230,
        80
      ]
    },
    {
      "id": "shared-mysql",
      "type": "database",
      "label": "共享 MySQL",
      "sublabel": "六服务持有各自表 · realtime 无库",
      "pos": [
        490,
        470
      ],
      "size": [
        300,
        80
      ]
    }
  ],
  "connections": [
    {
      "id": "process-common",
      "from": "business-processes",
      "to": "common-library",
      "label": "进程内依赖",
      "labelAt": [
        107,
        195
      ]
    },
    {
      "id": "process-contracts",
      "from": "business-processes",
      "to": "contracts-library",
      "label": "RPC 契约",
      "fromSide": "top",
      "toSide": "bottom"
    },
    {
      "id": "contracts-common",
      "from": "contracts-library",
      "to": "common-library",
      "label": "基础模型"
    },
    {
      "id": "process-config",
      "from": "business-processes",
      "to": "message-selection",
      "label": "消息用例",
      "variant": "emphasis"
    },
    {
      "id": "select-redis",
      "from": "message-selection",
      "to": "redis-library",
      "label": "选择实现",
      "variant": "emphasis"
    },
    {
      "id": "adapter-ports",
      "from": "redis-library",
      "to": "message-api",
      "label": "实现端口"
    },
    {
      "id": "adapter-storage",
      "from": "redis-library",
      "to": "shared-redis",
      "label": "消息传输",
      "variant": "emphasis"
    },
    {
      "id": "process-discovery",
      "from": "business-processes",
      "to": "discovery",
      "label": "服务名解析",
      "variant": "dashed",
      "labelAt": [
        107,
        410
      ]
    },
    {
      "id": "process-mysql",
      "from": "business-processes",
      "to": "shared-mysql",
      "label": "所属表读写",
      "fromSide": "bottom",
      "toSide": "left"
    }
  ],
  "cards": [
    {
      "dot": "cyan",
      "title": "组件不部署",
      "items": [
        "四个普通 JAR 随服务装配，消息消费者生命周期归业务服务。"
      ]
    },
    {
      "dot": "emerald",
      "title": "存储仍共享",
      "items": [
        "除消息端口外，服务按职责直连 Redis；物理实例以部署环境为准。"
      ]
    },
    {
      "dot": "violet",
      "title": "发现不是消息总线",
      "items": [
        "Gateway 与服务均使用 Nacos 发现；当前未实现 RocketMQ。"
      ]
    }
  ]
}
