docs: 重排架构图并调整域名方案

This commit is contained in:
dongjf 2026-11-24 20:04:06 +08:00
parent b2ffa79d0c
commit 0d1c8ba1c6
8 changed files with 304 additions and 61 deletions

View File

@ -2,7 +2,7 @@
![Item Atlas 系统架构](diagrams/system.png) ![Item Atlas 系统架构](diagrams/system.png)
[原图](diagrams/system.png) · [Mermaid 源文件](diagrams/system.mmd) [原图](diagrams/system.png) · [draw.io 源文件](diagrams/system.drawio)
前面是 Nginx 和 API 网关,后面只拆两个业务服务。找物和物品管理是一条稳定路径,批量录入会访问模型,耗时、重试和资源需求有差异。这两个部分各自运行和发布,客户端统一走 API。 前面是 Nginx 和 API 网关,后面只拆两个业务服务。找物和物品管理是一条稳定路径,批量录入会访问模型,耗时、重试和资源需求有差异。这两个部分各自运行和发布,客户端统一走 API。

View File

@ -2,7 +2,7 @@
![Item Atlas 部署图](diagrams/deployment.png) ![Item Atlas 部署图](diagrams/deployment.png)
[原图](diagrams/deployment.png) · [Mermaid 源文件](diagrams/deployment.mmd) [原图](diagrams/deployment.png) · [draw.io 源文件](diagrams/deployment.drawio)
## 设备和网络 ## 设备和网络
@ -19,14 +19,14 @@ Kubernetes 的控制面和应用在同一虚拟机内。Helm 管理应用和可
公网 Nginx 负责证书和 HTTPS,保留 Host 和转发协议,走回环地址的 frp visitor。工作 Mac 的虚拟机用 STCP 接入现有 frps。集群入口 Nginx 依据 Host 转发到对应 Web Service,`/api` 统一转给 Spring Cloud Gateway。公网访问以 HTTPS 入口为边界,数据库、模型、监控和 Kubernetes 管理端口留在内网。家用 Mac 的模型请求只走家庭私网。 [frp STCP](https://gofrp.org/en/docs/examples/stcp/) 公网 Nginx 负责证书和 HTTPS,保留 Host 和转发协议,走回环地址的 frp visitor。工作 Mac 的虚拟机用 STCP 接入现有 frps。集群入口 Nginx 依据 Host 转发到对应 Web Service,`/api` 统一转给 Spring Cloud Gateway。公网访问以 HTTPS 入口为边界,数据库、模型、监控和 Kubernetes 管理端口留在内网。家用 Mac 的模型请求只走家庭私网。 [frp STCP](https://gofrp.org/en/docs/examples/stcp/)
下面是待确认的域名方案。DNS、证书与入口规则在确认后配置。 子域名统一采用 `用途-产品名`。移动网页用 `m`,PC 网页用 `pc`。DNS、证书与入口规则在域名确认后配置。
| 候选域名 | 指向 | | 候选域名 | 指向 |
| --- | --- | | --- | --- |
| `atlas.tutudog.com` | PC 网页 | | `pc-atlas.tutudog.com` | PC 网页 |
| `atlas-h5.tutudog.com` | H5 | | `m-atlas.tutudog.com` | 移动网页(H5) |
| `atlas-admin.tutudog.com` | 管理后台,使用管理员身份和访问限制 | | `admin-atlas.tutudog.com` | 管理后台,使用管理员身份和访问限制 |
| `atlas-api.tutudog.com` | 项目专用 API,iOS 和 Android 直接访问 | | `api-atlas.tutudog.com` | 项目专用 API,iOS 和 Android 直接访问 |
已有 frp 足够用于首版演示。5 Mbps 约为每秒 0.625 MB 的理论上限。前端资源压缩和缓存,照片以缩略图为先,上传按大小和并发限制。 已有 frp 足够用于首版演示。5 Mbps 约为每秒 0.625 MB 的理论上限。前端资源压缩和缓存,照片以缩略图为先,上传按大小和并发限制。

View File

@ -0,0 +1,148 @@
<?xml version="1.0" encoding="UTF-8"?>
<mxfile host="app.diagrams.net" type="device">
<diagram id="deployment" name="deployment">
<mxGraphModel grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1264" pageHeight="753" background="#FFFFFF" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="canvas" value="" style="shape=rectangle;fillColor=#FFFFFF;strokeColor=none;locked=1;" vertex="1" parent="1">
<mxGeometry x="0" y="0" width="1264" height="753" as="geometry" />
</mxCell>
<mxCell id="v3" value="Item Atlas · 部署架构" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;fontFamily=PingFang SC;fontSize=30;fontColor=#18283A;fontStyle=1;spacingLeft=0;spacing=0;overflow=visible;" vertex="1" parent="1">
<mxGeometry x="48" y="28" width="800" height="42" as="geometry" />
</mxCell>
<mxCell id="public" value="&lt;div style=&quot;font-weight:700;font-size:16px;line-height:1.28&quot;&gt;公网访问&lt;/div&gt;&lt;div style=&quot;margin-top:5px;font-size:13px;color:#4D6278;line-height:1.35&quot;&gt;H5 · PC 网页 · 管理后台 · iOS · Android&lt;/div&gt;" style="rounded=1;arcSize=11;whiteSpace=wrap;html=1;fillColor=#EAF3FF;strokeColor=#99B6D8;strokeWidth=1.2;fontFamily=PingFang SC;fontColor=#18283A;verticalAlign=middle;align=left;spacingLeft=15;" vertex="1" parent="1">
<mxGeometry x="425" y="86" width="392" height="61" as="geometry" />
</mxCell>
<mxCell id="v5" value="" style="rounded=1;absoluteArcSize=1;arcSize=24;whiteSpace=wrap;html=1;fillColor=#F7F9FC;strokeColor=#D9E3ED;strokeWidth=1;container=0;" vertex="1" parent="1">
<mxGeometry x="48" y="177" width="1168" height="160" as="geometry" />
</mxCell>
<mxCell id="v6" value="云端入口与交付" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;fontFamily=PingFang SC;fontSize=15;fontColor=#18283A;fontStyle=1;spacingLeft=0;spacing=0;overflow=visible;" vertex="1" parent="1">
<mxGeometry x="70" y="188" width="340" height="23" as="geometry" />
</mxCell>
<mxCell id="edge" value="&lt;div style=&quot;font-weight:700;font-size:16px;line-height:1.28&quot;&gt;公网入口云机&lt;/div&gt;&lt;div style=&quot;margin-top:5px;font-size:13px;color:#4D6278;line-height:1.35&quot;&gt;Nginx :443 / TLS · frps 与回环 visitor&lt;/div&gt;" style="rounded=1;arcSize=11;whiteSpace=wrap;html=1;fillColor=#EAF3FF;strokeColor=#99B6D8;strokeWidth=1.2;fontFamily=PingFang SC;fontColor=#18283A;verticalAlign=middle;align=left;spacingLeft=15;" vertex="1" parent="1">
<mxGeometry x="275" y="224" width="397" height="74" as="geometry" />
</mxCell>
<mxCell id="ci" value="&lt;div style=&quot;font-weight:700;font-size:16px;line-height:1.28&quot;&gt;CI 云机&lt;/div&gt;&lt;div style=&quot;margin-top:5px;font-size:13px;color:#4D6278;line-height:1.35&quot;&gt;Gitea · Drone · 镜像仓库&lt;/div&gt;" style="rounded=1;arcSize=11;whiteSpace=wrap;html=1;fillColor=#EAF3FF;strokeColor=#99B6D8;strokeWidth=1.2;fontFamily=PingFang SC;fontColor=#18283A;verticalAlign=middle;align=left;spacingLeft=15;" vertex="1" parent="1">
<mxGeometry x="826" y="224" width="361" height="74" as="geometry" />
</mxCell>
<mxCell id="v9" value="" style="rounded=1;absoluteArcSize=1;arcSize=24;whiteSpace=wrap;html=1;fillColor=#F7FAF9;strokeColor=#CADDD6;strokeWidth=1;container=0;" vertex="1" parent="1">
<mxGeometry x="48" y="380" width="1168" height="309" as="geometry" />
</mxCell>
<mxCell id="v10" value="家庭局域网" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;fontFamily=PingFang SC;fontSize=15;fontColor=#18283A;fontStyle=1;spacingLeft=0;spacing=0;overflow=visible;" vertex="1" parent="1">
<mxGeometry x="70" y="390" width="280" height="22" as="geometry" />
</mxCell>
<mxCell id="v11" value="" style="rounded=1;absoluteArcSize=1;arcSize=24;whiteSpace=wrap;html=1;fillColor=#FFFFFF;strokeColor=#CDDCE5;strokeWidth=1;container=0;" vertex="1" parent="1">
<mxGeometry x="72" y="423" width="852" height="245" as="geometry" />
</mxCell>
<mxCell id="v12" value="工作 Mac" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;fontFamily=PingFang SC;fontSize=17;fontColor=#18283A;fontStyle=1;spacingLeft=0;spacing=0;overflow=visible;" vertex="1" parent="1">
<mxGeometry x="94" y="434" width="120" height="24" as="geometry" />
</mxCell>
<mxCell id="v13" value="ARM64 Linux 虚拟机 · 单节点 Kubernetes" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;fontFamily=PingFang SC;fontSize=14;fontColor=#4D6278;fontStyle=0;spacingLeft=0;spacing=0;overflow=visible;" vertex="1" parent="1">
<mxGeometry x="327" y="435" width="528" height="23" as="geometry" />
</mxCell>
<mxCell id="v14" value="" style="rounded=1;absoluteArcSize=1;arcSize=24;whiteSpace=wrap;html=1;fillColor=#F3F8FC;strokeColor=#C6D8E8;strokeWidth=1;container=0;" vertex="1" parent="1">
<mxGeometry x="580" y="470" width="319" height="143" as="geometry" />
</mxCell>
<mxCell id="v15" value="Kubernetes 工作负载" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;fontFamily=PingFang SC;fontSize=13;fontColor=#18283A;fontStyle=1;spacingLeft=0;spacing=0;overflow=visible;" vertex="1" parent="1">
<mxGeometry x="598" y="475" width="274" height="20" as="geometry" />
</mxCell>
<mxCell id="frpc" value="&lt;div style=&quot;font-weight:700;font-size:16px;line-height:1.28&quot;&gt;frpc&lt;/div&gt;&lt;div style=&quot;margin-top:5px;font-size:13px;color:#4D6278;line-height:1.35&quot;&gt;STCP 接入&lt;/div&gt;" style="rounded=1;arcSize=11;whiteSpace=wrap;html=1;fillColor=#EAF3FF;strokeColor=#99B6D8;strokeWidth=1.2;fontFamily=PingFang SC;fontColor=#18283A;verticalAlign=middle;align=left;spacingLeft=15;" vertex="1" parent="1">
<mxGeometry x="100" y="500" width="190" height="61" as="geometry" />
</mxCell>
<mxCell id="proxy" value="&lt;div style=&quot;font-weight:700;font-size:16px;line-height:1.28&quot;&gt;集群入口 Nginx&lt;/div&gt;&lt;div style=&quot;margin-top:5px;font-size:13px;color:#4D6278;line-height:1.35&quot;&gt;按 Host 和 API 路径分流&lt;/div&gt;" style="rounded=1;arcSize=11;whiteSpace=wrap;html=1;fillColor=#EAF3FF;strokeColor=#99B6D8;strokeWidth=1.2;fontFamily=PingFang SC;fontColor=#18283A;verticalAlign=middle;align=left;spacingLeft=15;" vertex="1" parent="1">
<mxGeometry x="343" y="500" width="191" height="61" as="geometry" />
</mxCell>
<mxCell id="web" value="&lt;div style=&quot;font-weight:700;font-size:14px;line-height:1.28&quot;&gt;Web 镜像 · H5 / PC / 后台&lt;/div&gt;" style="rounded=1;arcSize=11;whiteSpace=wrap;html=1;fillColor=#EAF5F1;strokeColor=#8BB8AA;strokeWidth=1.2;fontFamily=PingFang SC;fontColor=#18283A;verticalAlign=middle;align=left;spacingLeft=15;" vertex="1" parent="1">
<mxGeometry x="599" y="502" width="280" height="38" as="geometry" />
</mxCell>
<mxCell id="app" value="&lt;div style=&quot;font-weight:700;font-size:14px;line-height:1.28&quot;&gt;网关 · 物品服务 / 录入服务&lt;/div&gt;" style="rounded=1;arcSize=11;whiteSpace=wrap;html=1;fillColor=#EAF5F1;strokeColor=#8BB8AA;strokeWidth=1.2;fontFamily=PingFang SC;fontColor=#18283A;verticalAlign=middle;align=left;spacingLeft=15;" vertex="1" parent="1">
<mxGeometry x="599" y="557" width="280" height="38" as="geometry" />
</mxCell>
<mxCell id="ssd" value="&lt;div style=&quot;font-weight:700;font-size:14px;line-height:1.28&quot;&gt;外置 SSD&lt;/div&gt;&lt;div style=&quot;margin-top:5px;font-size:13px;color:#4D6278;line-height:1.35&quot;&gt;虚拟机与应用持久数据&lt;/div&gt;" style="rounded=1;arcSize=11;whiteSpace=wrap;html=1;fillColor=#FBF8EF;strokeColor=#CEC098;strokeWidth=1.2;fontFamily=PingFang SC;fontColor=#18283A;verticalAlign=middle;align=left;spacingLeft=15;" vertex="1" parent="1">
<mxGeometry x="343" y="606" width="191" height="46" as="geometry" />
</mxCell>
<mxCell id="home" value="&lt;div style=&quot;font-weight:700;font-size:16px;line-height:1.28&quot;&gt;家用 Mac&lt;/div&gt;&lt;div style=&quot;margin-top:5px;font-size:13px;color:#4D6278;line-height:1.35&quot;&gt;Ollama 推理&lt;/div&gt;" style="rounded=1;arcSize=11;whiteSpace=wrap;html=1;fillColor=#EAF5F1;strokeColor=#8BB8AA;strokeWidth=1.2;fontFamily=PingFang SC;fontColor=#18283A;verticalAlign=middle;align=left;spacingLeft=15;" vertex="1" parent="1">
<mxGeometry x="958" y="506" width="225" height="69" as="geometry" />
</mxCell>
<mxCell id="public-edge" style="noEdgeStyle=1;rounded=0;html=1;endArrow=block;endFill=1;endSize=7;strokeWidth=1.8;strokeColor=#3265A1;dashed=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="1" edge="1" source="public" target="edge">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="621" y="215" />
<mxPoint x="473.5" y="215" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="edge-frpc" style="noEdgeStyle=1;rounded=0;html=1;endArrow=block;endFill=1;endSize=7;strokeWidth=1.8;strokeColor=#3265A1;dashed=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="1" edge="1" source="edge" target="frpc">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="473.5" y="351" />
<mxPoint x="195" y="351" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="frpc-proxy" style="noEdgeStyle=1;rounded=0;html=1;endArrow=block;endFill=1;endSize=7;strokeWidth=1.8;strokeColor=#3265A1;dashed=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" parent="1" edge="1" source="frpc" target="proxy">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="proxy-web" style="noEdgeStyle=1;rounded=0;html=1;endArrow=block;endFill=1;endSize=7;strokeWidth=1.8;strokeColor=#526C85;dashed=0;exitX=1;exitY=0.32;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" parent="1" edge="1" source="proxy" target="web">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="563" y="519.5" />
<mxPoint x="563" y="521" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="proxy-app" style="noEdgeStyle=1;rounded=0;html=1;endArrow=block;endFill=1;endSize=7;strokeWidth=1.8;strokeColor=#526C85;dashed=0;exitX=1;exitY=0.7;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" parent="1" edge="1" source="proxy" target="app">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="549" y="542.7" />
<mxPoint x="549" y="576" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="registry-pull" style="noEdgeStyle=1;rounded=0;html=1;endArrow=block;endFill=1;endSize=7;strokeWidth=1.8;strokeColor=#526C85;dashed=1;exitX=1;exitY=0.55;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" parent="1" edge="1" source="v14" target="ci">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="912" y="548.65" />
<mxPoint x="912" y="353" />
<mxPoint x="1006.5" y="353" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="app-disk" style="noEdgeStyle=1;rounded=0;html=1;endArrow=block;endFill=1;endSize=7;strokeWidth=1.8;strokeColor=#526C85;dashed=0;exitX=0;exitY=1;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" parent="1" edge="1" source="app" target="ssd">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="599" y="629" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="app-home" style="noEdgeStyle=1;rounded=0;html=1;endArrow=block;endFill=1;endSize=7;strokeWidth=1.8;strokeColor=#277260;dashed=0;exitX=1;exitY=0.6;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" parent="1" edge="1" source="app" target="home">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="936" y="579.8" />
<mxPoint x="936" y="540.5" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="v22" value="HTTPS" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;fontFamily=PingFang SC;fontSize=12;fontColor=#3265A1;fontStyle=1;spacingLeft=0;spacing=0;overflow=visible;" vertex="1" parent="1">
<mxGeometry x="631" y="153" width="88" height="22" as="geometry" />
</mxCell>
<mxCell id="v23" value="STCP 隧道" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;fontFamily=PingFang SC;fontSize=12;fontColor=#3265A1;fontStyle=1;spacingLeft=0;spacing=0;overflow=visible;" vertex="1" parent="1">
<mxGeometry x="293" y="326" width="133" height="23" as="geometry" />
</mxCell>
<mxCell id="v24" value="HTTPS 拉取镜像" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;fontFamily=PingFang SC;fontSize=12;fontColor=#4D6278;fontStyle=0;spacingLeft=0;spacing=0;overflow=visible;" vertex="1" parent="1">
<mxGeometry x="1019" y="327" width="164" height="23" as="geometry" />
</mxCell>
<mxCell id="v25" value="私网推理" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;fontFamily=PingFang SC;fontSize=12;fontColor=#277260;fontStyle=1;spacingLeft=0;spacing=0;overflow=visible;" vertex="1" parent="1">
<mxGeometry x="960" y="584" width="190" height="22" as="geometry" />
</mxCell>
<mxCell id="v26" value="" style="shape=rectangle;fillColor=#D9E3ED;strokeColor=none;" vertex="1" parent="1">
<mxGeometry x="48" y="711" width="1168" height="1" as="geometry" />
</mxCell>
<mxCell id="v27" value="公网 HTTPS 终止在入口云机。模型请求在两台 Mac 之间走家庭私网。" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;fontFamily=PingFang SC;fontSize=13;fontColor=#4D6278;fontStyle=0;spacingLeft=0;spacing=0;overflow=visible;" vertex="1" parent="1">
<mxGeometry x="48" y="720" width="1168" height="22" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>

View File

@ -1,24 +0,0 @@
flowchart TB
Public["公网访问<br/>H5 · PC · 后台 · iOS · Android"]
Edge["公网入口云机 · 80 GiB 盘<br/>Nginx :443 · TLS<br/>frp visitor 回环监听 · frps"]
In["工作 Mac · ARM64 Linux VM<br/>frpc · Kubernetes 入口 Nginx"]
Web["Web 镜像<br/>H5 · PC · 后台"]
Apps["Kubernetes 服务<br/>网关 · 物品服务 · 录入服务"]
Home["家用 Mac · Ollama"]
SSD[("工作 Mac 外置 SSD<br/>虚拟机磁盘 · PostgreSQL<br/>附件和监控数据")]
CI["CI 云机 · 独立网络<br/>Gitea · Drone · 镜像仓库"]
Public -->|HTTPS| Edge
Edge ==>|STCP 隧道| In
In --> Web
In --> Apps
Apps -->|家庭局域网 · 推理| Home
Apps -->|持久卷| SSD
Apps -.->|HTTPS · 拉取镜像| CI
classDef app fill:#e4f3ef,stroke:#28745f,color:#0c3329
classDef net fill:#eef4ff,stroke:#5273a8,color:#172940
classDef data fill:#f7f3e8,stroke:#8d7138,color:#402f15
class Public,Edge,CI,In net
class Web,Apps,Home app
class SSD data

Binary file not shown.

Before

Width:  |  Height:  |  Size: 165 KiB

After

Width:  |  Height:  |  Size: 185 KiB

149
docs/diagrams/system.drawio Normal file
View File

@ -0,0 +1,149 @@
<?xml version="1.0" encoding="UTF-8"?>
<mxfile host="app.diagrams.net" type="device">
<diagram id="system" name="system">
<mxGraphModel grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1264" pageHeight="685" background="#FFFFFF" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="canvas" value="" style="shape=rectangle;fillColor=#FFFFFF;strokeColor=none;locked=1;" vertex="1" parent="1">
<mxGeometry x="0" y="0" width="1264" height="685" as="geometry" />
</mxCell>
<mxCell id="v3" value="Item Atlas · 系统架构" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;fontFamily=PingFang SC;fontSize=30;fontColor=#18283A;fontStyle=1;spacingLeft=0;spacing=0;overflow=visible;" vertex="1" parent="1">
<mxGeometry x="48" y="30" width="790" height="41" as="geometry" />
</mxCell>
<mxCell id="v4" value="客户端统一访问 API,物品管理和模型录入分别运行。" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;fontFamily=PingFang SC;fontSize=15;fontColor=#4D6278;fontStyle=0;spacingLeft=0;spacing=0;overflow=visible;" vertex="1" parent="1">
<mxGeometry x="48" y="77" width="900" height="23" as="geometry" />
</mxCell>
<mxCell id="v5" value="" style="shape=rectangle;fillColor=#D9E3ED;strokeColor=none;" vertex="1" parent="1">
<mxGeometry x="48" y="111" width="1168" height="1" as="geometry" />
</mxCell>
<mxCell id="v6" value="" style="rounded=1;absoluteArcSize=1;arcSize=24;whiteSpace=wrap;html=1;fillColor=#F7F9FC;strokeColor=#D9E3ED;strokeWidth=1;container=0;" vertex="1" parent="1">
<mxGeometry x="48" y="136" width="205" height="470" as="geometry" />
</mxCell>
<mxCell id="v7" value="访问端" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;fontFamily=PingFang SC;fontSize=15;fontColor=#18283A;fontStyle=1;spacingLeft=0;spacing=0;overflow=visible;" vertex="1" parent="1">
<mxGeometry x="65" y="151" width="171" height="22" as="geometry" />
</mxCell>
<mxCell id="v8" value="" style="rounded=1;absoluteArcSize=1;arcSize=24;whiteSpace=wrap;html=1;fillColor=#F7F9FC;strokeColor=#D9E3ED;strokeWidth=1;container=0;" vertex="1" parent="1">
<mxGeometry x="269" y="136" width="226" height="470" as="geometry" />
</mxCell>
<mxCell id="v9" value="入口" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;fontFamily=PingFang SC;fontSize=15;fontColor=#18283A;fontStyle=1;spacingLeft=0;spacing=0;overflow=visible;" vertex="1" parent="1">
<mxGeometry x="286" y="151" width="192" height="22" as="geometry" />
</mxCell>
<mxCell id="v10" value="" style="rounded=1;absoluteArcSize=1;arcSize=24;whiteSpace=wrap;html=1;fillColor=#F7F9FC;strokeColor=#D9E3ED;strokeWidth=1;container=0;" vertex="1" parent="1">
<mxGeometry x="511" y="136" width="282" height="470" as="geometry" />
</mxCell>
<mxCell id="v11" value="业务服务" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;fontFamily=PingFang SC;fontSize=15;fontColor=#18283A;fontStyle=1;spacingLeft=0;spacing=0;overflow=visible;" vertex="1" parent="1">
<mxGeometry x="528" y="151" width="248" height="22" as="geometry" />
</mxCell>
<mxCell id="v12" value="" style="rounded=1;absoluteArcSize=1;arcSize=24;whiteSpace=wrap;html=1;fillColor=#F7F9FC;strokeColor=#D9E3ED;strokeWidth=1;container=0;" vertex="1" parent="1">
<mxGeometry x="809" y="136" width="407" height="470" as="geometry" />
</mxCell>
<mxCell id="v13" value="数据与模型" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;fontFamily=PingFang SC;fontSize=15;fontColor=#18283A;fontStyle=1;spacingLeft=0;spacing=0;overflow=visible;" vertex="1" parent="1">
<mxGeometry x="826" y="151" width="373" height="22" as="geometry" />
</mxCell>
<mxCell id="web" value="&lt;div style=&quot;font-weight:700;font-size:16px;line-height:1.28&quot;&gt;Web 客户端&lt;/div&gt;&lt;div style=&quot;margin-top:5px;font-size:13px;color:#4D6278;line-height:1.35&quot;&gt;H5 · PC · 管理后台&lt;/div&gt;" style="rounded=1;arcSize=11;whiteSpace=wrap;html=1;fillColor=#EAF3FF;strokeColor=#99B6D8;strokeWidth=1.2;fontFamily=PingFang SC;fontColor=#18283A;verticalAlign=middle;align=left;spacingLeft=15;" vertex="1" parent="1">
<mxGeometry x="67" y="228" width="165" height="72" as="geometry" />
</mxCell>
<mxCell id="mobile" value="&lt;div style=&quot;font-weight:700;font-size:16px;line-height:1.28&quot;&gt;原生客户端&lt;/div&gt;&lt;div style=&quot;margin-top:5px;font-size:13px;color:#4D6278;line-height:1.35&quot;&gt;iOS · Android&lt;/div&gt;" style="rounded=1;arcSize=11;whiteSpace=wrap;html=1;fillColor=#EAF3FF;strokeColor=#99B6D8;strokeWidth=1.2;fontFamily=PingFang SC;fontColor=#18283A;verticalAlign=middle;align=left;spacingLeft=15;" vertex="1" parent="1">
<mxGeometry x="67" y="374" width="165" height="66" as="geometry" />
</mxCell>
<mxCell id="nginx" value="&lt;div style=&quot;font-weight:700;font-size:16px;line-height:1.28&quot;&gt;Nginx&lt;/div&gt;&lt;div style=&quot;margin-top:5px;font-size:13px;color:#4D6278;line-height:1.35&quot;&gt;TLS 与站点入口&lt;/div&gt;" style="rounded=1;arcSize=11;whiteSpace=wrap;html=1;fillColor=#EAF3FF;strokeColor=#99B6D8;strokeWidth=1.2;fontFamily=PingFang SC;fontColor=#18283A;verticalAlign=middle;align=left;spacingLeft=15;" vertex="1" parent="1">
<mxGeometry x="289" y="261" width="186" height="70" as="geometry" />
</mxCell>
<mxCell id="gateway" value="&lt;div style=&quot;font-weight:700;font-size:16px;line-height:1.28&quot;&gt;Spring Cloud Gateway&lt;/div&gt;&lt;div style=&quot;margin-top:5px;font-size:13px;color:#4D6278;line-height:1.35&quot;&gt;认证 · 路由 · 限流 · 灰度&lt;/div&gt;" style="rounded=1;arcSize=11;whiteSpace=wrap;html=1;fillColor=#EAF3FF;strokeColor=#99B6D8;strokeWidth=1.2;fontFamily=PingFang SC;fontColor=#18283A;verticalAlign=middle;align=left;spacingLeft=15;" vertex="1" parent="1">
<mxGeometry x="289" y="409" width="186" height="88" as="geometry" />
</mxCell>
<mxCell id="inventory" value="&lt;div style=&quot;font-weight:700;font-size:16px;line-height:1.28&quot;&gt;物品服务&lt;/div&gt;&lt;div style=&quot;margin-top:5px;font-size:13px;color:#4D6278;line-height:1.35&quot;&gt;物品、位置、检索、关联&lt;br/&gt;家庭权限与个人评分&lt;/div&gt;" style="rounded=1;arcSize=11;whiteSpace=wrap;html=1;fillColor=#EAF5F1;strokeColor=#8BB8AA;strokeWidth=1.2;fontFamily=PingFang SC;fontColor=#18283A;verticalAlign=middle;align=left;spacingLeft=15;" vertex="1" parent="1">
<mxGeometry x="534" y="228" width="238" height="82" as="geometry" />
</mxCell>
<mxCell id="intake" value="&lt;div style=&quot;font-weight:700;font-size:16px;line-height:1.28&quot;&gt;录入服务&lt;/div&gt;&lt;div style=&quot;margin-top:5px;font-size:13px;color:#4D6278;line-height:1.35&quot;&gt;批量草稿、模型适配&lt;br/&gt;用量、额度与异步确认&lt;/div&gt;" style="rounded=1;arcSize=11;whiteSpace=wrap;html=1;fillColor=#EAF5F1;strokeColor=#8BB8AA;strokeWidth=1.2;fontFamily=PingFang SC;fontColor=#18283A;verticalAlign=middle;align=left;spacingLeft=15;" vertex="1" parent="1">
<mxGeometry x="534" y="409" width="238" height="88" as="geometry" />
</mxCell>
<mxCell id="inv-db" value="&lt;div style=&quot;font-weight:700;font-size:16px;line-height:1.28&quot;&gt;PostgreSQL · 物品库&lt;/div&gt;&lt;div style=&quot;margin-top:5px;font-size:13px;color:#4D6278;line-height:1.35&quot;&gt;物品、位置、家庭权限及移位记录&lt;/div&gt;" style="rounded=1;arcSize=11;whiteSpace=wrap;html=1;fillColor=#FBF8EF;strokeColor=#CEC098;strokeWidth=1.2;fontFamily=PingFang SC;fontColor=#18283A;verticalAlign=middle;align=left;spacingLeft=15;" vertex="1" parent="1">
<mxGeometry x="858" y="191" width="334" height="65" as="geometry" />
</mxCell>
<mxCell id="attachments" value="&lt;div style=&quot;font-weight:700;font-size:16px;line-height:1.28&quot;&gt;附件存储&lt;/div&gt;&lt;div style=&quot;margin-top:5px;font-size:13px;color:#4D6278;line-height:1.35&quot;&gt;工作 Mac 外置 SSD&lt;/div&gt;" style="rounded=1;arcSize=11;whiteSpace=wrap;html=1;fillColor=#FBF8EF;strokeColor=#CEC098;strokeWidth=1.2;fontFamily=PingFang SC;fontColor=#18283A;verticalAlign=middle;align=left;spacingLeft=15;" vertex="1" parent="1">
<mxGeometry x="858" y="286" width="334" height="65" as="geometry" />
</mxCell>
<mxCell id="draft-db" value="&lt;div style=&quot;font-weight:700;font-size:16px;line-height:1.28&quot;&gt;PostgreSQL · 录入库&lt;/div&gt;&lt;div style=&quot;margin-top:5px;font-size:13px;color:#4D6278;line-height:1.35&quot;&gt;草稿、Outbox 与额度&lt;/div&gt;" style="rounded=1;arcSize=11;whiteSpace=wrap;html=1;fillColor=#FBF8EF;strokeColor=#CEC098;strokeWidth=1.2;fontFamily=PingFang SC;fontColor=#18283A;verticalAlign=middle;align=left;spacingLeft=15;" vertex="1" parent="1">
<mxGeometry x="858" y="400" width="334" height="65" as="geometry" />
</mxCell>
<mxCell id="model" value="&lt;div style=&quot;font-weight:700;font-size:16px;line-height:1.28&quot;&gt;模型提供方&lt;/div&gt;&lt;div style=&quot;margin-top:5px;font-size:13px;color:#4D6278;line-height:1.35&quot;&gt;家庭私网 Ollama · 用户选择的云模型&lt;/div&gt;" style="rounded=1;arcSize=11;whiteSpace=wrap;html=1;fillColor=#FBF8EF;strokeColor=#CEC098;strokeWidth=1.2;fontFamily=PingFang SC;fontColor=#18283A;verticalAlign=middle;align=left;spacingLeft=15;" vertex="1" parent="1">
<mxGeometry x="858" y="505" width="334" height="65" as="geometry" />
</mxCell>
<mxCell id="web-entry" style="noEdgeStyle=1;rounded=0;html=1;endArrow=block;endFill=1;endSize=7;strokeWidth=1.8;strokeColor=#3265A1;dashed=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.35;entryDx=0;entryDy=0;" parent="1" edge="1" source="web" target="nginx">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="252" y="264" />
<mxPoint x="252" y="285.5" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="mobile-entry" style="noEdgeStyle=1;rounded=0;html=1;endArrow=block;endFill=1;endSize=7;strokeWidth=1.8;strokeColor=#3265A1;dashed=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.72;entryDx=0;entryDy=0;" parent="1" edge="1" source="mobile" target="nginx">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="261" y="407" />
<mxPoint x="261" y="311.4" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="entry-gateway" style="noEdgeStyle=1;rounded=0;html=1;endArrow=block;endFill=1;endSize=7;strokeWidth=1.8;strokeColor=#3265A1;dashed=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="1" edge="1" source="nginx" target="gateway">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="gateway-inventory" style="noEdgeStyle=1;rounded=0;html=1;endArrow=block;endFill=1;endSize=7;strokeWidth=1.8;strokeColor=#526C85;dashed=0;exitX=1;exitY=0.32;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" parent="1" edge="1" source="gateway" target="inventory">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="505" y="437.2" />
<mxPoint x="505" y="269" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="gateway-intake" style="noEdgeStyle=1;rounded=0;html=1;endArrow=block;endFill=1;endSize=7;strokeWidth=1.8;strokeColor=#526C85;dashed=0;exitX=1;exitY=0.72;exitDx=0;exitDy=0;entryX=0;entryY=0.72;entryDx=0;entryDy=0;" parent="1" edge="1" source="gateway" target="intake">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="intake-inventory" style="noEdgeStyle=1;rounded=0;html=1;endArrow=block;endFill=1;endSize=7;strokeWidth=1.8;strokeColor=#277260;dashed=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" parent="1" edge="1" source="intake" target="inventory">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="inventory-database" style="noEdgeStyle=1;rounded=0;html=1;endArrow=block;endFill=1;endSize=7;strokeWidth=1.8;strokeColor=#526C85;dashed=0;exitX=1;exitY=0.3;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" parent="1" edge="1" source="inventory" target="inv-db">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="817" y="252.6" />
<mxPoint x="817" y="223.5" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="inventory-attachments" style="noEdgeStyle=1;rounded=0;html=1;endArrow=block;endFill=1;endSize=7;strokeWidth=1.8;strokeColor=#526C85;dashed=0;exitX=1;exitY=0.7;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" parent="1" edge="1" source="inventory" target="attachments">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="830" y="285.4" />
<mxPoint x="830" y="318.5" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="intake-database" style="noEdgeStyle=1;rounded=0;html=1;endArrow=block;endFill=1;endSize=7;strokeWidth=1.8;strokeColor=#526C85;dashed=0;exitX=1;exitY=0.27;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" parent="1" edge="1" source="intake" target="draft-db">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="intake-model" style="noEdgeStyle=1;rounded=0;html=1;endArrow=block;endFill=1;endSize=7;strokeWidth=1.8;strokeColor=#277260;dashed=0;exitX=1;exitY=0.7;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" parent="1" edge="1" source="intake" target="model">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="826" y="470.6" />
<mxPoint x="826" y="537.5" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="v24" value="API 请求" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;fontFamily=PingFang SC;fontSize=12;fontColor=#4D6278;fontStyle=0;spacingLeft=0;spacing=0;overflow=visible;" vertex="1" parent="1">
<mxGeometry x="395" y="357" width="78" height="24" as="geometry" />
</mxCell>
<mxCell id="v25" value="草稿确认" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;fontFamily=PingFang SC;fontSize=12;fontColor=#277260;fontStyle=1;spacingLeft=0;spacing=0;overflow=visible;" vertex="1" parent="1">
<mxGeometry x="664" y="344" width="82" height="24" as="geometry" />
</mxCell>
<mxCell id="v26" value="" style="shape=rectangle;fillColor=#D9E3ED;strokeColor=none;" vertex="1" parent="1">
<mxGeometry x="48" y="630" width="1168" height="1" as="geometry" />
</mxCell>
<mxCell id="v27" value="物品与录入各自管理数据。草稿写入由物品服务完成。" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;fontFamily=PingFang SC;fontSize=13;fontColor=#4D6278;fontStyle=0;spacingLeft=0;spacing=0;overflow=visible;" vertex="1" parent="1">
<mxGeometry x="48" y="643" width="1150" height="22" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>

View File

@ -1,30 +0,0 @@
flowchart TB
Web["H5 · PC 网页<br/>管理后台"]
Mobile["iOS / Android"]
Entry["Nginx<br/>HTTPS · 站点入口"]
Gateway["Spring Cloud Gateway<br/>API 路由 · 鉴权入口 · 灰度"]
Inventory["物品服务<br/>物品 · 位置 · 检索<br/>关联 · 家庭权限"]
Intake["录入服务<br/>批量草稿 · 模型适配<br/>用量"]
InventoryDB[("PostgreSQL<br/>物品数据")]
IntakeDB[("PostgreSQL<br/>草稿 · Outbox · 配额")]
Models["Ollama · 家庭局域网<br/>云模型 · 主动选择"]
Objects[("附件 · 本地 SSD")]
Web --> Entry
Mobile -->|HTTPS API| Entry
Entry -->|API| Gateway
Gateway -->|物品与位置| Inventory
Gateway -->|草稿与模型| Intake
Intake -->|确认任务 · 幂等请求| Inventory
Inventory --> InventoryDB
Intake --> IntakeDB
Intake --> Models
Inventory --> Objects
classDef client fill:#eef4ff,stroke:#5273a8,color:#172940
classDef app fill:#e4f3ef,stroke:#28745f,color:#0c3329
classDef data fill:#f7f3e8,stroke:#8d7138,color:#402f15
class Web,Mobile client
class Entry,Gateway,Inventory,Intake app
class InventoryDB,IntakeDB,Objects,Models data

Binary file not shown.

Before

Width:  |  Height:  |  Size: 170 KiB

After

Width:  |  Height:  |  Size: 212 KiB