From 74c2ce8ae47a0bdc435f983fdd914d169838d56b Mon Sep 17 00:00:00 2001 From: xiaocheny214 <187097481+xiaocheny214@users.noreply.github.com> Date: Sat, 29 Aug 2026 10:10:06 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E8=A1=A5=E5=85=85=E6=95=B4=E4=BD=93?= =?UTF-8?q?=E6=9E=B6=E6=9E=84=E4=B8=8E=E5=86=85=E9=83=A8=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/architecture/README.md | 11 + .../windup-internals.architecture.json | 236 + docs/architecture/windup-internals.html | 14930 ++++++++++++++++ .../windup-system.architecture.json | 204 + docs/architecture/windup-system.html | 14899 +++++++++++++++ 5 files changed, 30280 insertions(+) create mode 100644 docs/architecture/README.md create mode 100644 docs/architecture/windup-internals.architecture.json create mode 100644 docs/architecture/windup-internals.html create mode 100644 docs/architecture/windup-system.architecture.json create mode 100644 docs/architecture/windup-system.html diff --git a/docs/architecture/README.md b/docs/architecture/README.md new file mode 100644 index 00000000..1c2ad16e --- /dev/null +++ b/docs/architecture/README.md @@ -0,0 +1,11 @@ +# Windup 架构图 + +浏览器直接打开 HTML(自带暗/亮色与导出)。JSON 是图的源文件。 + +| 图 | 打开 | 源 | +|---|---|---| +| 整体架构(外部调用) | [windup-system.html](./windup-system.html) | [windup-system.architecture.json](./windup-system.architecture.json) | +| 内部服务 | [windup-internals.html](./windup-internals.html) | [windup-internals.architecture.json](./windup-internals.architecture.json) | + +- **整体架构**:浏览器 → Nginx → FastAPI;生成与邮件经 Redis Stream 交给独立 Worker,再经 AI Gateway 调上游。 +- **内部服务**:项目/鉴权/积分、前端节点编排与 Agent、任务调度、资产后处理,以及浏览器 WebGL 三渲二出帧。 diff --git a/docs/architecture/windup-internals.architecture.json b/docs/architecture/windup-internals.architecture.json new file mode 100644 index 00000000..cc4197ad --- /dev/null +++ b/docs/architecture/windup-internals.architecture.json @@ -0,0 +1,236 @@ +{ + "schema_version": 1, + "diagram_type": "architecture", + "meta": { + "title": "Windup 内部服务", + "locale": "zh-CN", + "quality_profile": "showcase", + "repository": { + "url": "https://github.com/xiaocheny214/DireSoul.git", + "revision": "ed500be30482ef8316f6f655bf0f06d19f1cce63" + }, + "views": [ + { + "id": "project-assets", + "label": "项目是容器", + "focus": ["workbench", "project", "workflow", "character"], + "note": "工作台打开的是项目;项目拥有 workflow_run 和角色,并保存朝向/尺寸等生成约束。" + }, + { + "id": "account", + "label": "鉴权与积分", + "focus": ["workbench", "auth", "quota", "generation", "filter"], + "note": "JWT 认出用户;敏感词先于建任务和冻积分;积分按用户账户扣。" + }, + { + "id": "dual-pipeline", + "label": "双出帧路径", + "focus": ["workflow", "generation", "bake", "aigw", "postprocess"], + "note": "编排只调任务调度。调度走 i2v;三渲二出帧指向 Gateway 做图生 3D,再下发浏览器出帧。" + } + ] + }, + "components": [ + { + "id": "auth", + "type": "security", + "label": "鉴权", + "sublabel": "JWT Bearer", + "tag": "JWT", + "pos": [40, 128], + "size": [124, 62], + "sources": [ + { "path": "backend/packages/app/src/windup_app/web/middleware/auth.py", "line": 1, "label": "中间件" }, + { "path": "backend/packages/app/src/windup_app/web/api/auth.py", "line": 29, "label": "/auth" }, + { "path": "frontend/src/features/auth-guard/index.tsx", "line": 10, "label": "受保护路由" } + ] + }, + { + "id": "agent", + "type": "frontend", + "label": "Quick Start Agent", + "sublabel": "浏览器沙箱", + "pos": [456, 128], + "size": [148, 62], + "sources": [ + { "path": "frontend/src/features/quick-start-agent/production.ts", "line": 14, "label": "装配 Controller" }, + { "path": "backend/packages/app/src/windup_app/web/api/agent.py", "line": 107, "label": "/ai 对话" } + ] + }, + { + "id": "quota", + "type": "backend", + "label": "积分", + "sublabel": "按用户账户", + "pos": [860, 128], + "size": [132, 62], + "sources": [ + { "path": "backend/packages/app/src/windup_app/server/quota/model.py", "line": 10, "label": "一人一行" }, + { "path": "backend/packages/app/src/windup_app/server/orchestrator/billing.py", "line": 1, "label": "提交冻结" }, + { "path": "backend/packages/app/src/windup_app/web/api/quota.py", "line": 1, "label": "/quota" } + ] + }, + { + "id": "workbench", + "type": "frontend", + "label": "工作台", + "sublabel": "首页 / 试玩 / 导出", + "brand": "react", + "pos": [40, 300], + "size": [124, 62], + "sources": [ + { "path": "frontend/src/app/app.tsx", "line": 35, "label": "路由表" } + ] + }, + { + "id": "project", + "type": "database", + "label": "项目", + "sublabel": "工作区 · 生成约束", + "pos": [248, 300], + "size": [132, 62], + "sources": [ + { "path": "backend/packages/app/src/windup_app/server/project/model.py", "line": 11, "label": "全局约束" }, + { "path": "backend/packages/app/src/windup_app/web/api/project.py", "line": 33, "label": "/projects" } + ] + }, + { + "id": "workflow", + "type": "frontend", + "label": "节点编排", + "sublabel": "前端感知 · 后端只存", + "pos": [456, 300], + "size": [148, 62], + "sources": [ + { "path": "frontend/src/features/workflow-controller/controller.ts", "line": 157, "label": "Controller" }, + { "path": "backend/packages/app/src/windup_app/web/api/workflow_run.py", "line": 11, "label": "只做存储" }, + { "path": "backend/packages/app/src/windup_app/server/workflow_run/model.py", "line": 46, "label": "project_id" } + ] + }, + { + "id": "filter", + "type": "security", + "label": "敏感词", + "sublabel": "提交前拦截", + "pos": [680, 300], + "size": [124, 62], + "sources": [ + { "path": "backend/packages/app/src/windup_app/server/sensitive_word/service.py", "line": 58, "label": "assert_clean" }, + { "path": "backend/packages/app/src/windup_app/server/orchestrator/service.py", "line": 63, "label": "先于建任务" }, + { "path": "backend/packages/app/src/windup_app/web/api/agent.py", "line": 396, "label": "/ai 先拦" } + ] + }, + { + "id": "generation", + "type": "backend", + "label": "任务调度", + "sublabel": "出图 / i2v / 出帧", + "pos": [860, 300], + "size": [132, 62], + "sources": [ + { "path": "backend/packages/app/src/windup_app/web/api/generation.py", "line": 290, "label": "project_id" } + ] + }, + { + "id": "aigw", + "type": "backend", + "label": "AI Gateway", + "sublabel": "Chat · 图 · 视频 · 3D", + "pos": [1160, 300], + "size": [132, 62], + "sources": [ + { "path": "backend/packages/framework/src/windup_framework/gateway/__init__.py", "line": 1, "label": "Gateway" }, + { "path": "backend/packages/app/src/windup_app/server/orchestrator/executor.py", "line": 988, "label": "Image/Video" }, + { "path": "backend/packages/app/src/windup_app/server/orchestrator/render3d_service.py", "line": 392, "label": "图生 3D" } + ] + }, + { + "id": "character", + "type": "database", + "label": "角色", + "sublabel": "项目下的产物", + "pos": [1160, 488], + "size": [132, 62], + "sources": [ + { "path": "backend/packages/app/src/windup_app/server/character/model.py", "line": 1, "label": "隶属项目" }, + { "path": "backend/packages/app/src/windup_app/server/character/model.py", "line": 80, "label": "project_id" } + ] + }, + { + "id": "bake", + "type": "frontend", + "label": "三渲二出帧", + "sublabel": "浏览器 WebGL", + "pos": [456, 488], + "size": [148, 62], + "sources": [ + { "path": "frontend/src/features/client-bake/index.ts", "line": 44, "label": "runClientBake" }, + { "path": "frontend/src/features/client-bake/attach.ts", "line": 4, "label": "挂在生成任务上" }, + { "path": "backend/packages/app/src/windup_app/server/orchestrator/executor.py", "line": 563, "label": "下发出帧" } + ] + }, + { + "id": "postprocess", + "type": "backend", + "label": "资产后处理", + "sublabel": "抽帧 · 抠图 · 对齐", + "pos": [860, 488], + "size": [132, 62], + "sources": [ + { "path": "backend/packages/ai_engine/src/windup_ai_engine/slicing/extract.py", "line": 35, "label": "抽帧" }, + { "path": "backend/packages/ai_engine/src/windup_ai_engine/postprocess/__init__.py", "line": 1, "label": "像素化 / 对齐" }, + { "path": "backend/packages/framework/src/windup_framework/providers/matte.py", "line": 1, "label": "抠图" } + ] + } + ], + "boundaries": [ + { "kind": "region", "label": "浏览器", "wraps": ["agent", "workflow", "bake"] }, + { "kind": "region", "label": "应用机", "wraps": ["quota", "filter", "generation", "aigw", "postprocess"] } + ], + "connections": [ + { "id": "open-project", "from": "workbench", "to": "project", "label": "打开项目", "variant": "emphasis" }, + { "id": "login", "from": "workbench", "to": "auth", "label": "登录 JWT", "fromSide": "top", "toSide": "bottom" }, + { "id": "project-flow", "from": "project", "to": "workflow", "label": "挂流程", "variant": "emphasis" }, + { "id": "agent-flow", "from": "agent", "to": "workflow", "label": "代跑节点", "fromSide": "bottom", "toSide": "top", "labelDy": 24 }, + { "id": "flow-filter", "from": "workflow", "to": "filter", "label": "先拦", "variant": "emphasis" }, + { "id": "filter-gen", "from": "filter", "to": "generation", "label": "通过", "variant": "emphasis" }, + { "id": "gen-gw", "from": "generation", "to": "aigw", "label": "出图 / i2v", "variant": "emphasis" }, + { "id": "gen-quota", "from": "generation", "to": "quota", "label": "冻结积分", "fromSide": "top", "toSide": "bottom" }, + { "id": "gen-post", "from": "generation", "to": "postprocess", "label": "视频后处理", "fromSide": "bottom", "toSide": "top", "labelDy": 24 }, + { "id": "gen-bake", "from": "generation", "to": "bake", "label": "下发出帧", "fromSide": "left", "toSide": "top" }, + { "id": "bake-gw", "from": "bake", "to": "aigw", "label": "图生 3D", "fromSide": "bottom", "toSide": "right" }, + { "id": "bake-post", "from": "bake", "to": "postprocess", "label": "交帧" }, + { "id": "post-char", "from": "postprocess", "to": "character", "label": "写入角色" }, + { "id": "agent-filter", "from": "agent", "to": "filter", "label": "对话 /ai", "variant": "dashed", "fromSide": "top", "toSide": "top" }, + { "id": "filter-chat", "from": "filter", "to": "aigw", "label": "过了才调", "variant": "dashed", "fromSide": "top", "toSide": "top", "via": [[742, 80], [1226, 80]] } + ], + "cards": [ + { + "dot": "cyan", + "title": "项目 · 鉴权 · 积分", + "items": [ + "项目是用户名下的工作区:拥有 workflow_run 和角色,并保存朝向/尺寸等生成约束", + "JWT 认出用户;敏感词在建任务和冻积分之前拦 prompt,/ai 对话进 Gateway 前同样拦", + "积分账户一人一行,提交出图/i2v 时冻结;不按项目扣,Agent 对话也不走这本账" + ] + }, + { + "dot": "emerald", + "title": "为什么 Agent 在前端", + "items": [ + "节点编排由前端感知:Controller 跑图,/workflow-runs 只全量存 nodes,后端不执行", + "Agent 代跑的是同一套前端节点,必须和编排状态在同一个浏览器里", + "浏览器沙箱隔离工具与对话循环;对话仍经 /ai 进 Gateway,密钥不进前端" + ] + }, + { + "dot": "amber", + "title": "双出帧路径", + "items": [ + "视频:i2v 经 Gateway 拿回后,抽帧、抠图、像素化、脚线对齐都在应用机 Worker 上做", + "编排只调任务调度,不直连出帧。i2v 经 Gateway 后资产后处理;三渲二出帧指向 Gateway 做图生 3D / 绑骨,调度再下发浏览器出帧", + "出帧只做 WebGL。两条线都写入角色,成色闸仍在资产后处理" + ] + } + ] +} diff --git a/docs/architecture/windup-internals.html b/docs/architecture/windup-internals.html new file mode 100644 index 00000000..a8524b49 --- /dev/null +++ b/docs/architecture/windup-internals.html @@ -0,0 +1,14930 @@ + + + + + + + Windup 内部服务 + + + + + + + + + + + +
+ +
+
+
+

Windup 内部服务

+
+
+ + + + + + + +
+ + Windup 内部服务 + 由 Archify 生成的架构图。 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 鉴权 · JWT Bearer · 架构组件 · JWT + + + + 鉴权 + JWT Bearer + JWT + + + + Quick Start Agent · 浏览器沙箱 · 浏览器 + + + + Quick Start Agent + 浏览器沙箱 + + + + 积分 · 按用户账户 · 应用机 + + + + 积分 + 按用户账户 + + + + 工作台 · 首页 / 试玩 / 导出 · 架构组件 · React + + + + + 工作台 + 首页 / 试玩 / 导出 + + + + 项目 · 工作区 · 生成约束 · 架构组件 + + + + 项目 + 工作区 · 生成约束 + + + + 节点编排 · 前端感知 · 后端只存 · 浏览器 + + + + 节点编排 + 前端感知 · 后端只存 + + + + 敏感词 · 提交前拦截 · 应用机 + + + + 敏感词 + 提交前拦截 + + + + 任务调度 · 出图 / i2v / 出帧 · 应用机 + + + + 任务调度 + 出图 / i2v / 出帧 + + + + AI Gateway · Chat · 图 · 视频 · 3D · 应用机 + + + + AI Gateway + Chat · 图 · 视频 · 3D + + + + 角色 · 项目下的产物 · 架构组件 + + + + 角色 + 项目下的产物 + + + + 三渲二出帧 · 浏览器 WebGL · 浏览器 + + + + 三渲二出帧 + 浏览器 WebGL + + + + 资产后处理 · 抽帧 · 抠图 · 对齐 · 应用机 + + + + 资产后处理 + 抽帧 · 抠图 · 对齐 + + + + + + 打开项目 + + + + 登录 JWT + + + + 挂流程 + + + + 代跑节点 + + + + 先拦 + + + + 通过 + + + + 出图 / i2v + + + + 冻结积分 + + + + 视频后处理 + + + + 下发出帧 + + + + 图生 3D + + + + 交帧 + + + + 写入角色 + + + + 对话 /ai + + + + 过了才调 + + + + + + 浏览器 + + + + + 应用机 + + + + + 图例 + + + 前端 + + + + 后端 + + + + 数据库 + + + + 安全 + + + +

+ + + + + + + + + +
+ + +
+
+
+
+

项目 · 鉴权 · 积分

+
+
    +
  • • 项目是用户名下的工作区:拥有 workflow_run 和角色,并保存朝向/尺寸等生成约束
  • +
  • • JWT 认出用户;敏感词在建任务和冻积分之前拦 prompt,/ai 对话进 Gateway 前同样拦
  • +
  • • 积分账户一人一行,提交出图/i2v 时冻结;不按项目扣,Agent 对话也不走这本账
  • +
+
+ +
+
+
+

为什么 Agent 在前端

+
+
    +
  • • 节点编排由前端感知:Controller 跑图,/workflow-runs 只全量存 nodes,后端不执行
  • +
  • • Agent 代跑的是同一套前端节点,必须和编排状态在同一个浏览器里
  • +
  • • 浏览器沙箱隔离工具与对话循环;对话仍经 /ai 进 Gateway,密钥不进前端
  • +
+
+ +
+
+
+

双出帧路径

+
+
    +
  • • 视频:i2v 经 Gateway 拿回后,抽帧、抠图、像素化、脚线对齐都在应用机 Worker 上做
  • +
  • • 编排只调任务调度,不直连出帧。i2v 经 Gateway 后资产后处理;三渲二出帧指向 Gateway 做图生 3D / 绑骨,调度再下发浏览器出帧
  • +
  • • 出帧只做 WebGL。两条线都写入角色,成色闸仍在资产后处理
  • +
+
+
+ +
+ + + + diff --git a/docs/architecture/windup-system.architecture.json b/docs/architecture/windup-system.architecture.json new file mode 100644 index 00000000..703af5b9 --- /dev/null +++ b/docs/architecture/windup-system.architecture.json @@ -0,0 +1,204 @@ +{ + "schema_version": 1, + "diagram_type": "architecture", + "meta": { + "title": "Windup 整体架构", + "locale": "zh-CN", + "quality_profile": "showcase", + "repository": { + "url": "https://github.com/xiaocheny214/DireSoul.git", + "revision": "ed500be30482ef8316f6f655bf0f06d19f1cce63" + }, + "views": [ + { + "id": "product-request", + "label": "同步产品路径", + "focus": ["workbench", "edge", "webapi", "pg"], + "note": "浏览器经 Nginx 进入 FastAPI,JWT 鉴权后读写项目、角色、流程与积分。" + }, + { + "id": "async-work", + "label": "异步执行", + "focus": ["mq", "worker", "aigw", "models"], + "note": "Worker 消费邮件与生成 Stream,生成路径经进程内 AI Gateway 调用上游。" + }, + { + "id": "identity-media", + "label": "登录与媒资", + "focus": ["webapi", "mq", "worker", "mail", "kodo"], + "note": "验证码经 Resend 发出;参考图与生成产物落到七牛 Kodo。" + } + ] + }, + "components": [ + { + "id": "workbench", + "type": "frontend", + "label": "React 工作台", + "sublabel": "项目 / 流程 / 试玩", + "brand": "react", + "pos": [40, 300], + "size": [124, 62], + "sources": [ + { "path": "frontend/src/app/app.tsx", "line": 35, "label": "路由表" }, + { "path": "frontend/src/main.tsx", "line": 10, "label": "React 入口" } + ] + }, + { + "id": "edge", + "type": "cloud", + "label": "Nginx", + "sublabel": "静态 + /api", + "pos": [224, 300], + "size": [124, 62], + "sources": [ + { "path": "frontend/README.md", "line": 26, "label": "宿主机 Nginx" }, + { "path": "docker-compose.yml", "line": 61, "label": "站点目录" } + ] + }, + { + "id": "webapi", + "type": "backend", + "label": "FastAPI", + "sublabel": "鉴权 · 资产 · 生成", + "tag": "JWT", + "brand": "fastapi", + "pos": [408, 300], + "size": [124, 62], + "sources": [ + { "path": "backend/packages/app/src/windup_app/bootstrap/app.py", "line": 138, "label": "create_app" }, + { "path": "backend/packages/app/src/windup_app/web/api/auth.py", "line": 29, "label": "/auth" }, + { "path": "backend/packages/app/src/windup_app/web/api/generation.py", "line": 63, "label": "/generation" } + ] + }, + { + "id": "pg", + "type": "database", + "label": "PostgreSQL", + "sublabel": "用户 / 资产 / 任务", + "brand": "postgresql", + "pos": [600, 128], + "size": [132, 62], + "sources": [ + { "path": "docker-compose.db.yml", "line": 56, "label": "windup-postgres" }, + { "path": "backend/packages/framework/src/windup_framework/db/__init__.py", "line": 4, "label": "SessionLocal" } + ] + }, + { + "id": "mail", + "type": "external", + "label": "Resend", + "sublabel": "验证码邮件", + "pos": [792, 128], + "size": [124, 62], + "sources": [ + { "path": "backend/packages/framework/src/windup_framework/providers/email.py", "line": 24, "label": "ResendEmailProvider" } + ] + }, + { + "id": "kodo", + "type": "cloud", + "label": "七牛 Kodo", + "sublabel": "对象存储", + "pos": [40, 488], + "size": [124, 62], + "sources": [ + { "path": "backend/packages/app/src/windup_app/server/media/service.py", "line": 17, "label": "ObjectStorageMediaService" } + ] + }, + { + "id": "mq", + "type": "messagebus", + "label": "Redis Stream", + "sublabel": "邮件 / 生成 / SSE", + "brand": "redis", + "pos": [600, 488], + "size": [132, 62], + "sources": [ + { "path": "backend/packages/app/src/windup_app/server/mq/catalog.py", "line": 33, "label": "EMAIL_STREAM" }, + { "path": "backend/packages/framework/src/windup_framework/sse/bridge.py", "line": 15, "label": "SSE channel" } + ] + }, + { + "id": "worker", + "type": "backend", + "label": "Worker", + "sublabel": "邮件 · 生成", + "pos": [792, 488], + "size": [124, 62], + "sources": [ + { "path": "docker-compose.yml", "line": 26, "label": "worker 服务" }, + { "path": "backend/packages/app/src/windup_app/bootstrap/worker.py", "line": 55, "label": "main" }, + { "path": "backend/packages/app/src/windup_app/worker/handlers.py", "line": 52, "label": "验证码 handler" } + ] + }, + { + "id": "aigw", + "type": "backend", + "label": "AI Gateway", + "sublabel": "Chat · Image · Video", + "pos": [976, 488], + "size": [132, 62], + "sources": [ + { "path": "backend/packages/framework/src/windup_framework/gateway/__init__.py", "line": 1, "label": "Gateway 导出" }, + { "path": "backend/packages/app/src/windup_app/server/orchestrator/executor.py", "line": 988, "label": "懒装配 Gateway" } + ] + }, + { + "id": "models", + "type": "external", + "label": "上游模型", + "sublabel": "OpenAI 兼容", + "pos": [1168, 488], + "size": [132, 62], + "sources": [ + { "path": "backend/packages/framework/src/windup_framework/gateway/routes.py", "line": 65, "label": "routes_from_settings" } + ] + } + ], + "boundaries": [ + { "kind": "region", "label": "应用机", "wraps": ["edge", "webapi", "worker", "aigw"] }, + { "kind": "region", "label": "数据层", "wraps": ["pg", "mq"] } + ], + "connections": [ + { "id": "https-in", "from": "workbench", "to": "edge", "label": "HTTPS", "variant": "emphasis" }, + { "id": "api-proxy", "from": "edge", "to": "webapi", "label": "/api" }, + { "id": "sql-write", "from": "webapi", "to": "pg", "label": "SQL", "fromSide": "top", "toSide": "left" }, + { "id": "media-put", "from": "webapi", "to": "kodo", "label": "put_data", "variant": "dashed", "fromSide": "bottom", "toSide": "top" }, + { "id": "stream-add", "from": "webapi", "to": "mq", "label": "XADD 入队", "variant": "dashed", "fromSide": "bottom", "toSide": "left" }, + { "id": "stream-read", "from": "mq", "to": "worker", "label": "出队", "variant": "emphasis" }, + { "id": "in-process", "from": "worker", "to": "aigw", "label": "进程内" }, + { "id": "model-https", "from": "aigw", "to": "models", "label": "HTTPS", "variant": "emphasis" }, + { "id": "status-back", "from": "worker", "to": "pg", "label": "状态回写", "fromSide": "top", "toSide": "bottom" }, + { "id": "send-code", "from": "worker", "to": "mail", "label": "验证码", "variant": "dashed", "fromSide": "top", "toSide": "bottom", "labelAt": [880, 310] } + ], + "cards": [ + { + "dot": "cyan", + "title": "产品面", + "items": [ + "React 工作台覆盖落地页、项目、Quick Start、Workflow Editor、Playtest 与导出", + "宿主机 Nginx 提供 SPA 并反代 /api", + "FastAPI 挂载鉴权、项目、角色、流程、生成、媒资、积分与 /ai" + ] + }, + { + "dot": "emerald", + "title": "执行面", + "items": [ + "Worker 同时消费邮件 Stream 与图片/动作生成 Stream", + "生成经进程内 ImageGateway / VideoGateway 调上游", + "进度经 Redis Pub/Sub 推 SSE 回浏览器" + ] + }, + { + "dot": "amber", + "title": "登录与媒资", + "items": [ + "注册/登录验证码经 Resend 发出,验证码本身存在 Redis", + "参考图与生成产物 put_data 到七牛 Kodo", + "用户、资产、任务与积分账本落在 PostgreSQL" + ] + } + ] +} diff --git a/docs/architecture/windup-system.html b/docs/architecture/windup-system.html new file mode 100644 index 00000000..5bdce86c --- /dev/null +++ b/docs/architecture/windup-system.html @@ -0,0 +1,14899 @@ + + + + + + + Windup 整体架构 + + + + + + + + + + + +
+ +
+
+
+

Windup 整体架构

+
+
+ + + + + + + +
+ + Windup 整体架构 + 由 Archify 生成的架构图。 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + React 工作台 · 项目 / 流程 / 试玩 · 架构组件 · React + + + + + React 工作台 + 项目 / 流程 / 试玩 + + + + Nginx · 静态 + /api · 应用机 + + + + Nginx + 静态 + /api + + + + FastAPI · 鉴权 · 资产 · 生成 · 应用机 · JWT · FastAPI + + + + + FastAPI + 鉴权 · 资产 · 生成 + JWT + + + + PostgreSQL · 用户 / 资产 / 任务 · 数据层 · PostgreSQL + + + + + PostgreSQL + 用户 / 资产 / 任务 + + + + Resend · 验证码邮件 · 架构组件 + + + + Resend + 验证码邮件 + + + + 七牛 Kodo · 对象存储 · 架构组件 + + + + 七牛 Kodo + 对象存储 + + + + Redis Stream · 邮件 / 生成 / SSE · 数据层 · Redis + + + + + Redis Stream + 邮件 / 生成 / SSE + + + + Worker · 邮件 · 生成 · 应用机 + + + + Worker + 邮件 · 生成 + + + + AI Gateway · Chat · Image · Video · 应用机 + + + + AI Gateway + Chat · Image · Video + + + + 上游模型 · OpenAI 兼容 · 架构组件 + + + + 上游模型 + OpenAI 兼容 + + + + + + HTTPS + + + + /api + + + + SQL + + + + put_data + + + + XADD 入队 + + + + 出队 + + + + 进程内 + + + + HTTPS + + + + 状态回写 + + + + 验证码 + + + + + + 应用机 + + + + + 数据层 + + + + + 图例 + + + 前端 + + + + 后端 + + + + 数据库 + + + + 云服务 + + + + 消息总线 + + + + 外部系统 + + + +

+ + + + + + + + + +
+ + +
+
+
+
+

产品面

+
+
    +
  • • React 工作台覆盖落地页、项目、Quick Start、Workflow Editor、Playtest 与导出
  • +
  • • 宿主机 Nginx 提供 SPA 并反代 /api
  • +
  • • FastAPI 挂载鉴权、项目、角色、流程、生成、媒资、积分与 /ai
  • +
+
+ +
+
+
+

执行面

+
+
    +
  • • Worker 同时消费邮件 Stream 与图片/动作生成 Stream
  • +
  • • 生成经进程内 ImageGateway / VideoGateway 调上游
  • +
  • • 进度经 Redis Pub/Sub 推 SSE 回浏览器
  • +
+
+ +
+
+
+

登录与媒资

+
+
    +
  • • 注册/登录验证码经 Resend 发出,验证码本身存在 Redis
  • +
  • • 参考图与生成产物 put_data 到七牛 Kodo
  • +
  • • 用户、资产、任务与积分账本落在 PostgreSQL
  • +
+
+
+ +
+ + + +