title: "A 卡模型运维模块 · 推荐系统架构 V0.2\n同一工程 / 双数据库 / 平台库只读 / 运维库自有" direction: LR formats: [png, svg] theme: font: "PingFang SC" title_size: 25 node_size: 11 edge_size: 9.5 splines: spline nodesep: 0.62 ranksep: 0.86 dpi: 180 pad: 0.55 size: "21,11!" clusters: - name: "入口层(现有)" style: { bg: "#F5F7FA", pen: "#AEB7C4", margin: 20 } nodes: - { id: users, label: "业务团队 / 模型团队\n管理员", icon: users } - { id: nginx, label: "Nginx Gateway\n唯一入口", icon: nginx } - { id: react, label: "React SPA\n模型平台 + 运维平台", icon: react } - name: "统一 FastAPI 工程(现有服务内新增模块)" style: { bg: "#EEF5FD", pen: "#7FA8D8", margin: 22 } nodes: - { id: model_api, label: "模型平台模块\n现有功能 + 模型源数据写入", icon: fastapi } - { id: ops_api, label: "运维模块\n查询 / 判级 / 复核 / 报告 / 流程", icon: fastapi } - name: "model_platform(现有库,不改表)" style: { bg: "#F5F6F8", pen: "#AEB7C4", dashed: true, margin: 22 } nodes: - { id: platform_db, label: "MySQL · model_platform\n用户 / 角色 / 工作空间 / 调度", icon: mysql } - { id: storage, label: "对象存储 + storage_objects\n文件本体与平台资源", icon: storage } - name: "model_operations(新建独立库)" style: { bg: "#F1F8F5", pen: "#78A88D", margin: 22 } nodes: - { id: source_tables, label: "7 张模型源表\n模型方受控直写", icon: mysql } - { id: ops_tables, label: "15 张运维业务表\n判级 / 处理 / 报告 / 流程", icon: mysql } - { id: ops_outbox, label: "ops_outbox_events\n运维库独立事件流", icon: flowdb } - name: "异步执行(现有服务扩展连接)" style: { bg: "#FAF6EE", pen: "#C6A96D", margin: 20 } nodes: - { id: scheduler, label: "Schedule Executor\n增加运维库 Outbox 轮询", icon: process } edges: - { from: users, to: nginx, label: "HTTPS", type: flow, width: 1.8 } - { from: nginx, to: react, label: "静态资源", type: flow } - { from: nginx, to: model_api, label: "模型平台 API", type: flow } - { from: nginx, to: ops_api, label: "运维 API", type: flow, width: 1.8 } - { from: model_api, to: platform_db, label: "现有平台读写", type: write } - { from: ops_api, to: platform_db, label: "指定表 / 字段只读", type: dep, width: 1.8 } - { from: ops_api, to: storage, label: "复用文件服务", type: dep } - { from: model_api, to: source_tables, label: "受控 SQL 直写\nwriting → published", type: write, width: 2.2 } - { from: ops_api, to: source_tables, label: "只读已发布修订", type: write, style: dashed } - { from: ops_api, to: ops_tables, label: "业务读写", type: write, width: 2.2 } - { from: ops_api, to: ops_outbox, label: "同事务写事件", type: async } - { from: ops_outbox, to: scheduler, label: "轮询 / 重试", type: async, width: 1.8 }