技术架构图.html 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  1. <!DOCTYPE html>
  2. <html lang="zh-CN">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>技术架构图</title>
  7. <style>
  8. * { margin: 0; padding: 0; box-sizing: border-box; }
  9. body {
  10. font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  11. background: #f5f7fa;
  12. display: flex;
  13. justify-content: center;
  14. padding: 32px 16px;
  15. min-height: 100vh;
  16. }
  17. .container {
  18. max-width: 1200px;
  19. width: 100%;
  20. }
  21. h1 {
  22. font-size: 24px;
  23. font-weight: 700;
  24. color: #1a202c;
  25. margin-bottom: 6px;
  26. }
  27. .subtitle {
  28. font-size: 13px;
  29. color: #718096;
  30. margin-bottom: 24px;
  31. }
  32. svg {
  33. width: 100%;
  34. height: auto;
  35. background: #fff;
  36. border-radius: 16px;
  37. border: 1px solid #e2e8f0;
  38. }
  39. </style>
  40. </head>
  41. <body>
  42. <div class="container">
  43. <h1>技术架构图</h1>
  44. <p class="subtitle">三层架构 · 数据流 · 模块间调用关系</p>
  45. <svg viewBox="0 0 1160 940" xmlns="http://www.w3.org/2000/svg">
  46. <defs>
  47. <marker id="arr" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
  48. <path d="M0 0L10 5L0 10z" fill="#94a3b8"/>
  49. </marker>
  50. <marker id="arrB" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
  51. <path d="M0 0L10 5L0 10z" fill="#3b82f6"/>
  52. </marker>
  53. <marker id="arrO" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
  54. <path d="M0 0L10 5L0 10z" fill="#f97316"/>
  55. </marker>
  56. <filter id="shadow" x="-4%" y="-4%" width="108%" height="112%">
  57. <feDropShadow dx="0" dy="2" stdDeviation="4" flood-color="#000" flood-opacity="0.06"/>
  58. </filter>
  59. <linearGradient id="gAccess" x1="0" y1="0" x2="0" y2="1">
  60. <stop offset="0%" stop-color="#eff6ff"/>
  61. <stop offset="100%" stop-color="#dbeafe"/>
  62. </linearGradient>
  63. <linearGradient id="gInfra" x1="0" y1="0" x2="0" y2="1">
  64. <stop offset="0%" stop-color="#f5f3ff"/>
  65. <stop offset="100%" stop-color="#ede9fe"/>
  66. </linearGradient>
  67. </defs>
  68. <!-- ══════ Layer 1: 接入层 ══════ -->
  69. <rect x="20" y="16" width="1120" height="130" rx="14" fill="url(#gAccess)" stroke="#93c5fd" stroke-width="1.5"/>
  70. <text x="40" y="40" fill="#3b82f6" font-size="13" font-weight="700">接入层</text>
  71. <!-- Web/移动端 -->
  72. <rect x="80" y="58" width="210" height="48" rx="10" fill="#fff" stroke="#93c5fd" stroke-width="1.5" filter="url(#shadow)"/>
  73. <text x="185" y="86" text-anchor="middle" fill="#1e293b" font-size="14" font-weight="500">Web / 移动端前端</text>
  74. <!-- 第三方H5 -->
  75. <rect x="340" y="58" width="210" height="48" rx="10" fill="#fff" stroke="#93c5fd" stroke-width="1.5" filter="url(#shadow)"/>
  76. <text x="445" y="86" text-anchor="middle" fill="#1e293b" font-size="14" font-weight="500">第三方 H5 入口</text>
  77. <!-- API网关 -->
  78. <rect x="640" y="58" width="240" height="48" rx="10" fill="#3b82f6" stroke="#2563eb" stroke-width="2" filter="url(#shadow)"/>
  79. <text x="760" y="86" text-anchor="middle" fill="#fff" font-size="14" font-weight="600">统一 API 网关</text>
  80. <!-- Access arrows -->
  81. <line x1="290" y1="82" x2="636" y2="82" stroke="#3b82f6" stroke-width="2" marker-end="url(#arrB)"/>
  82. <line x1="550" y1="82" x2="636" y2="82" stroke="#3b82f6" stroke-width="2" marker-end="url(#arrB)"/>
  83. <!-- ══════ Layer 2: 核心业务模块 ══════ -->
  84. <rect x="20" y="170" width="1120" height="470" rx="14" fill="#fff" stroke="#e2e8f0" stroke-width="1.5"/>
  85. <text x="40" y="196" fill="#475569" font-size="13" font-weight="700">核心业务模块</text>
  86. <!-- Row 1: 3 modules -->
  87. <!-- B1: 用户账户管理 -->
  88. <rect x="56" y="216" width="330" height="110" rx="12" fill="#fff" stroke="#3b82f6" stroke-width="2" filter="url(#shadow)"/>
  89. <text x="221" y="244" text-anchor="middle" fill="#1e40af" font-size="15" font-weight="700">用户账户管理模块</text>
  90. <line x1="76" y1="258" x2="366" y2="258" stroke="#e2e8f0" stroke-width="1"/>
  91. <text x="221" y="280" text-anchor="middle" fill="#64748b" font-size="12">注册 / 登录 / 第三方授权</text>
  92. <text x="221" y="302" text-anchor="middle" fill="#64748b" font-size="12">用户信息 &amp; 角色权限</text>
  93. <!-- B2: 邀请系统 -->
  94. <rect x="415" y="216" width="330" height="110" rx="12" fill="#fff" stroke="#14b8a6" stroke-width="2" filter="url(#shadow)"/>
  95. <text x="580" y="244" text-anchor="middle" fill="#0f766e" font-size="15" font-weight="700">邀请系统模块</text>
  96. <line x1="435" y1="258" x2="725" y2="258" stroke="#e2e8f0" stroke-width="1"/>
  97. <text x="580" y="280" text-anchor="middle" fill="#64748b" font-size="12">邀请码 / 邀请链接生成</text>
  98. <text x="580" y="302" text-anchor="middle" fill="#64748b" font-size="12">邀请关系 &amp; 记录管理</text>
  99. <!-- B3: 额度&调用限制 -->
  100. <rect x="774" y="216" width="330" height="110" rx="12" fill="#fff" stroke="#22c55e" stroke-width="2" filter="url(#shadow)"/>
  101. <text x="939" y="244" text-anchor="middle" fill="#15803d" font-size="15" font-weight="700">额度 &amp; 调用限制模块</text>
  102. <line x1="794" y1="258" x2="1084" y2="258" stroke="#e2e8f0" stroke-width="1"/>
  103. <text x="939" y="280" text-anchor="middle" fill="#64748b" font-size="12">免费 / 会员额度配置</text>
  104. <text x="939" y="302" text-anchor="middle" fill="#64748b" font-size="12">调用次数限流 &amp; 扣减</text>
  105. <!-- Row 2: 3 modules -->
  106. <!-- B4: 邀请奖励 -->
  107. <rect x="56" y="370" width="330" height="110" rx="12" fill="#fff" stroke="#8b5cf6" stroke-width="2" filter="url(#shadow)"/>
  108. <text x="221" y="398" text-anchor="middle" fill="#6d28d9" font-size="15" font-weight="700">邀请奖励模块</text>
  109. <line x1="76" y1="412" x2="366" y2="412" stroke="#e2e8f0" stroke-width="1"/>
  110. <text x="221" y="434" text-anchor="middle" fill="#64748b" font-size="12">爬取次数奖励发放</text>
  111. <text x="221" y="456" text-anchor="middle" fill="#64748b" font-size="12">奖励记录统计</text>
  112. <!-- B5: 支付&会员 -->
  113. <rect x="415" y="370" width="330" height="130" rx="12" fill="#fff" stroke="#eab308" stroke-width="2" filter="url(#shadow)"/>
  114. <text x="580" y="398" text-anchor="middle" fill="#a16207" font-size="15" font-weight="700">支付 &amp; 会员模块</text>
  115. <line x1="435" y1="412" x2="725" y2="412" stroke="#e2e8f0" stroke-width="1"/>
  116. <text x="580" y="434" text-anchor="middle" fill="#64748b" font-size="12">多渠道支付</text>
  117. <text x="580" y="456" text-anchor="middle" fill="#64748b" font-size="12">会员套餐 &amp; 权限开通</text>
  118. <text x="580" y="478" text-anchor="middle" fill="#64748b" font-size="12">订单 &amp; 退款管理</text>
  119. <!-- B6: 商品爬取服务 (核心) -->
  120. <rect x="774" y="370" width="330" height="110" rx="12" fill="#fff7ed" stroke="#f97316" stroke-width="2.5" filter="url(#shadow)"/>
  121. <rect x="1032" y="376" width="52" height="22" rx="11" fill="#f97316"/>
  122. <text x="1058" y="391" text-anchor="middle" fill="#fff" font-size="10" font-weight="700">核心</text>
  123. <text x="939" y="404" text-anchor="middle" fill="#c2410c" font-size="15" font-weight="700">商品爬取服务</text>
  124. <line x1="794" y1="418" x2="1084" y2="418" stroke="#fed7aa" stroke-width="1"/>
  125. <text x="939" y="444" text-anchor="middle" fill="#9a3412" font-size="12">核心爬取引擎</text>
  126. <text x="939" y="464" text-anchor="middle" fill="#9a3412" font-size="12">数据采集 &amp; 解析</text>
  127. <!-- API Gateway → B1 & B3 -->
  128. <path d="M760,106 L760,160 Q760,170 750,170 L221,170 Q211,170 211,180 L211,212" fill="none" stroke="#3b82f6" stroke-width="2" marker-end="url(#arrB)"/>
  129. <path d="M760,106 L760,160 Q760,170 770,170 L939,170 Q949,170 949,180 L949,212" fill="none" stroke="#3b82f6" stroke-width="2" marker-end="url(#arrB)"/>
  130. <!-- Inter-module: B1→B2 dashed -->
  131. <line x1="386" y1="271" x2="411" y2="271" stroke="#8b5cf6" stroke-width="1.5" stroke-dasharray="6,4" marker-end="url(#arr)"/>
  132. <!-- B1→B5 dashed curve -->
  133. <path d="M221,326 Q221,350 400,350 Q580,350 580,366" fill="none" stroke="#eab308" stroke-width="1.5" stroke-dasharray="6,4" marker-end="url(#arr)"/>
  134. <!-- B2→B4 dashed curve -->
  135. <path d="M500,326 Q500,350 350,350 Q221,350 221,366" fill="none" stroke="#8b5cf6" stroke-width="1.5" stroke-dasharray="6,4" marker-end="url(#arr)"/>
  136. <!-- B4→B3 dashed curve -->
  137. <path d="M386,425 Q580,425 580,380 Q580,340 770,271" fill="none" stroke="#22c55e" stroke-width="1.5" stroke-dasharray="6,4" marker-end="url(#arr)"/>
  138. <!-- B5→B3 dashed -->
  139. <line x1="745" y1="430" x2="770" y2="290" stroke="#22c55e" stroke-width="1.5" stroke-dasharray="6,4" marker-end="url(#arr)"/>
  140. <!-- B3→B6 solid -->
  141. <line x1="939" y1="326" x2="939" y2="366" stroke="#f97316" stroke-width="2" marker-end="url(#arrO)"/>
  142. <!-- ══════ Layer 3: 基础中间件 ══════ -->
  143. <rect x="20" y="664" width="1120" height="140" rx="14" fill="url(#gInfra)" stroke="#c4b5fd" stroke-width="1.5"/>
  144. <text x="40" y="690" fill="#7c3aed" font-size="13" font-weight="700">基础中间件 &amp; 存储</text>
  145. <!-- C1: 数据库 -->
  146. <rect x="52" y="706" width="190" height="60" rx="10" fill="#fff" stroke="#8b5cf6" stroke-width="1.5" filter="url(#shadow)"/>
  147. <text x="147" y="728" text-anchor="middle" fill="#1e293b" font-size="13" font-weight="600">数据库</text>
  148. <text x="147" y="748" text-anchor="middle" fill="#94a3b8" font-size="10">用户 / 邀请 / 订单 / 日志</text>
  149. <!-- C2: Redis -->
  150. <rect x="262" y="706" width="190" height="60" rx="10" fill="#fff" stroke="#8b5cf6" stroke-width="1.5" filter="url(#shadow)"/>
  151. <text x="357" y="728" text-anchor="middle" fill="#1e293b" font-size="13" font-weight="600">Redis 缓存</text>
  152. <text x="357" y="748" text-anchor="middle" fill="#94a3b8" font-size="10">Token / 额度 / 邀请码</text>
  153. <!-- C3: 消息队列 -->
  154. <rect x="472" y="706" width="190" height="60" rx="10" fill="#fff" stroke="#8b5cf6" stroke-width="1.5" filter="url(#shadow)"/>
  155. <text x="567" y="728" text-anchor="middle" fill="#1e293b" font-size="13" font-weight="600">消息队列</text>
  156. <text x="567" y="748" text-anchor="middle" fill="#94a3b8" font-size="10">异步奖励 / 支付回调 / 爬取</text>
  157. <!-- C4: 日志监控 -->
  158. <rect x="682" y="706" width="190" height="60" rx="10" fill="#fff" stroke="#8b5cf6" stroke-width="1.5" filter="url(#shadow)"/>
  159. <text x="777" y="728" text-anchor="middle" fill="#1e293b" font-size="13" font-weight="600">日志 &amp; 监控 &amp; 告警</text>
  160. <text x="777" y="748" text-anchor="middle" fill="#94a3b8" font-size="10">全链路可观测</text>
  161. <!-- C5: 安全组件 -->
  162. <rect x="892" y="706" width="190" height="60" rx="10" fill="#fff" stroke="#8b5cf6" stroke-width="1.5" filter="url(#shadow)"/>
  163. <text x="987" y="728" text-anchor="middle" fill="#1e293b" font-size="13" font-weight="600">安全组件</text>
  164. <text x="987" y="748" text-anchor="middle" fill="#94a3b8" font-size="10">加密 / 鉴权 / 防攻击</text>
  165. <!-- Business → Infra arrows -->
  166. <!-- B1→C1,C4,C5 -->
  167. <line x1="150" y1="326" x2="147" y2="702" stroke="#cbd5e1" stroke-width="1" opacity="0.5"/>
  168. <line x1="200" y1="326" x2="777" y2="702" stroke="#cbd5e1" stroke-width="1" opacity="0.4"/>
  169. <line x1="250" y1="326" x2="987" y2="702" stroke="#cbd5e1" stroke-width="1" opacity="0.4"/>
  170. <!-- B2→C1,C2,C4 -->
  171. <line x1="520" y1="326" x2="147" y2="702" stroke="#cbd5e1" stroke-width="1" opacity="0.4"/>
  172. <line x1="560" y1="326" x2="357" y2="702" stroke="#cbd5e1" stroke-width="1" opacity="0.5"/>
  173. <line x1="600" y1="326" x2="777" y2="702" stroke="#cbd5e1" stroke-width="1" opacity="0.4"/>
  174. <!-- B3→C2,C4 -->
  175. <line x1="900" y1="326" x2="357" y2="702" stroke="#cbd5e1" stroke-width="1" opacity="0.5"/>
  176. <line x1="940" y1="326" x2="777" y2="702" stroke="#cbd5e1" stroke-width="1" opacity="0.5"/>
  177. <!-- B4→C3,C4 -->
  178. <line x1="200" y1="480" x2="567" y2="702" stroke="#cbd5e1" stroke-width="1" opacity="0.5"/>
  179. <line x1="240" y1="480" x2="777" y2="702" stroke="#cbd5e1" stroke-width="1" opacity="0.4"/>
  180. <!-- B5→C3,C4,C5 -->
  181. <line x1="560" y1="500" x2="567" y2="702" stroke="#cbd5e1" stroke-width="1" opacity="0.5"/>
  182. <line x1="590" y1="500" x2="777" y2="702" stroke="#cbd5e1" stroke-width="1" opacity="0.4"/>
  183. <line x1="620" y1="500" x2="987" y2="702" stroke="#cbd5e1" stroke-width="1" opacity="0.4"/>
  184. <!-- B6→C3,C4 -->
  185. <line x1="920" y1="480" x2="567" y2="702" stroke="#cbd5e1" stroke-width="1" opacity="0.5"/>
  186. <line x1="950" y1="480" x2="777" y2="702" stroke="#cbd5e1" stroke-width="1" opacity="0.5"/>
  187. <!-- ══════ Legend ══════ -->
  188. <rect x="20" y="840" width="1120" height="60" rx="12" fill="#f8fafc" stroke="#e2e8f0" stroke-width="1"/>
  189. <text x="60" y="876" fill="#64748b" font-size="12" font-weight="600">图例:</text>
  190. <line x1="120" y1="870" x2="160" y2="870" stroke="#94a3b8" stroke-width="2" marker-end="url(#arr)"/>
  191. <text x="170" y="875" fill="#64748b" font-size="12">数据流</text>
  192. <line x1="240" y1="870" x2="280" y2="870" stroke="#94a3b8" stroke-width="2" stroke-dasharray="6,4" marker-end="url(#arr)"/>
  193. <text x="290" y="875" fill="#64748b" font-size="12">模块间调用</text>
  194. <rect x="400" y="860" width="20" height="20" rx="6" fill="#fff7ed" stroke="#f97316" stroke-width="2"/>
  195. <text x="428" y="875" fill="#64748b" font-size="12">核心服务</text>
  196. <rect x="520" y="860" width="20" height="20" rx="6" fill="#eff6ff" stroke="#3b82f6" stroke-width="1.5"/>
  197. <text x="548" y="875" fill="#64748b" font-size="12">接入层</text>
  198. <rect x="620" y="860" width="20" height="20" rx="6" fill="#f5f3ff" stroke="#8b5cf6" stroke-width="1.5"/>
  199. <text x="648" y="875" fill="#64748b" font-size="12">中间件</text>
  200. </svg>
  201. </div>
  202. </body>
  203. </html>