forge-architecture.svg 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 960 840">
  2. <defs>
  3. <marker id="arrow" markerWidth="10" markerHeight="7" refX="9" refY="3.5" orient="auto">
  4. <polygon points="0 0, 10 3.5, 0 7" fill="#2563eb"/>
  5. </marker>
  6. <marker id="arrow-orange" markerWidth="10" markerHeight="7" refX="9" refY="3.5" orient="auto">
  7. <polygon points="0 0, 10 3.5, 0 7" fill="#ea580c"/>
  8. </marker>
  9. </defs>
  10. <!-- Title -->
  11. <text x="480" y="35" text-anchor="middle" font-family="system-ui, sans-serif" font-size="18" font-weight="600" fill="#1e293b">Forge Admin 系统架构</text>
  12. <!-- Layer 1: Client -->
  13. <rect x="380" y="60" width="200" height="60" rx="8" fill="#f1f5f9" stroke="#cbd5e1" stroke-width="2"/>
  14. <text x="480" y="95" text-anchor="middle" font-family="system-ui, sans-serif" font-size="13" fill="#334155">浏览器客户端</text>
  15. <!-- Layer 2: Frontend -->
  16. <rect x="60" y="180" width="840" height="80" rx="4" fill="none" stroke="#94a3b8" stroke-width="1.5" stroke-dasharray="6,3"/>
  17. <text x="75" y="200" font-family="system-ui, sans-serif" font-size="12" fill="#64748b">前端层</text>
  18. <rect x="380" y="195" width="200" height="55" rx="6" fill="#dbeafe" stroke="#3b82f6" stroke-width="2"/>
  19. <text x="480" y="215" text-anchor="middle" font-family="system-ui, sans-serif" font-size="13" font-weight="500" fill="#1e40af">forge-admin-ui</text>
  20. <text x="480" y="235" text-anchor="middle" font-family="system-ui, sans-serif" font-size="11" fill="#3b82f6">Vue 3 + Naive UI + Vite</text>
  21. <!-- Layer 3: Application Services -->
  22. <rect x="60" y="310" width="840" height="100" rx="4" fill="none" stroke="#94a3b8" stroke-width="1.5" stroke-dasharray="6,3"/>
  23. <text x="75" y="330" font-family="system-ui, sans-serif" font-size="12" fill="#64748b">应用服务层</text>
  24. <!-- Admin Server (Main) -->
  25. <rect x="80" y="345" width="180" height="60" rx="6" fill="#fef3c7" stroke="#f59e0b" stroke-width="2"/>
  26. <text x="170" y="365" text-anchor="middle" font-family="system-ui, sans-serif" font-size="12" font-weight="500" fill="#92400e">forge-admin-server</text>
  27. <text x="170" y="385" text-anchor="middle" font-family="system-ui, sans-serif" font-size="10" fill="#f59e0b">主应用入口 :8580</text>
  28. <!-- Flow Service -->
  29. <rect x="280" y="345" width="140" height="60" rx="6" fill="#f0fdf4" stroke="#22c55e" stroke-width="2"/>
  30. <text x="350" y="365" text-anchor="middle" font-family="system-ui, sans-serif" font-size="12" font-weight="500" fill="#166534">forge-flow</text>
  31. <text x="350" y="385" text-anchor="middle" font-family="system-ui, sans-serif" font-size="10" fill="#22c55e">流程引擎 :8581</text>
  32. <!-- Report Server -->
  33. <rect x="440" y="345" width="160" height="60" rx="6" fill="#fae8ff" stroke="#a855f7" stroke-width="2"/>
  34. <text x="520" y="365" text-anchor="middle" font-family="system-ui, sans-serif" font-size="12" font-weight="500" fill="#7e22ce">forge-report-server</text>
  35. <text x="520" y="385" text-anchor="middle" font-family="system-ui, sans-serif" font-size="10" fill="#a855f7">大屏报表</text>
  36. <!-- App Server -->
  37. <rect x="620" y="345" width="140" height="60" rx="6" fill="#eff6ff" stroke="#3b82f6" stroke-width="2"/>
  38. <text x="690" y="365" text-anchor="middle" font-family="system-ui, sans-serif" font-size="12" font-weight="500" fill="#1e40af">forge-app-server</text>
  39. <text x="690" y="385" text-anchor="middle" font-family="system-ui, sans-serif" font-size="10" fill="#3b82f6">App API</text>
  40. <!-- Business Module -->
  41. <rect x="780" y="345" width="100" height="60" rx="6" fill="#f9fafb" stroke="#94a3b8" stroke-width="1.5"/>
  42. <text x="830" y="365" text-anchor="middle" font-family="system-ui, sans-serif" font-size="12" fill="#475569">forge-business</text>
  43. <text x="830" y="385" text-anchor="middle" font-family="system-ui, sans-serif" font-size="10" fill="#64748b">业务模块</text>
  44. <!-- Layer 4: Business Plugins -->
  45. <rect x="60" y="450" width="840" height="100" rx="4" fill="none" stroke="#94a3b8" stroke-width="1.5" stroke-dasharray="6,3"/>
  46. <text x="75" y="470" font-family="system-ui, sans-serif" font-size="12" fill="#64748b">业务插件层 (forge-plugin-parent)</text>
  47. <!-- Plugin boxes in grid layout -->
  48. <rect x="80" y="485" width="130" height="50" rx="5" fill="#fef3c7" stroke="#f59e0b" stroke-width="1.5"/>
  49. <text x="145" y="507" text-anchor="middle" font-family="system-ui, sans-serif" font-size="11" fill="#92400e">plugin-system</text>
  50. <text x="145" y="522" text-anchor="middle" font-family="system-ui, sans-serif" font-size="9" fill="#f59e0b">用户/角色/菜单</text>
  51. <rect x="220" y="485" width="130" height="50" rx="5" fill="#dbeafe" stroke="#3b82f6" stroke-width="1.5"/>
  52. <text x="285" y="507" text-anchor="middle" font-family="system-ui, sans-serif" font-size="11" fill="#1e40af">plugin-generator</text>
  53. <text x="285" y="522" text-anchor="middle" font-family="system-ui, sans-serif" font-size="9" fill="#3b82f6">AI 代码生成</text>
  54. <rect x="360" y="485" width="130" height="50" rx="5" fill="#fef3c7" stroke="#f59e0b" stroke-width="1.5"/>
  55. <text x="425" y="507" text-anchor="middle" font-family="system-ui, sans-serif" font-size="11" fill="#92400e">plugin-job</text>
  56. <text x="425" y="522" text-anchor="middle" font-family="system-ui, sans-serif" font-size="9" fill="#f59e0b">定时任务</text>
  57. <rect x="500" y="485" width="130" height="50" rx="5" fill="#f0fdf4" stroke="#22c55e" stroke-width="1.5"/>
  58. <text x="565" y="507" text-anchor="middle" font-family="system-ui, sans-serif" font-size="11" fill="#166534">plugin-message</text>
  59. <text x="565" y="522" text-anchor="middle" font-family="system-ui, sans-serif" font-size="9" fill="#22c55e">消息中心</text>
  60. <rect x="640" y="485" width="130" height="50" rx="5" fill="#fae8ff" stroke="#a855f7" stroke-width="1.5"/>
  61. <text x="705" y="507" text-anchor="middle" font-family="system-ui, sans-serif" font-size="11" fill="#7e22ce">plugin-flow</text>
  62. <text x="705" y="522" text-anchor="middle" font-family="system-ui, sans-serif" font-size="9" fill="#a855f7">流程引擎</text>
  63. <rect x="780" y="485" width="100" height="50" rx="5" fill="#eff6ff" stroke="#3b82f6" stroke-width="1.5"/>
  64. <text x="830" y="507" text-anchor="middle" font-family="system-ui, sans-serif" font-size="11" fill="#1e40af">plugin-ai</text>
  65. <text x="830" y="522" text-anchor="middle" font-family="system-ui, sans-serif" font-size="9" fill="#3b82f6">AI 供应商</text>
  66. <!-- Layer 5: Technical Starters -->
  67. <rect x="60" y="590" width="840" height="110" rx="4" fill="none" stroke="#94a3b8" stroke-width="1.5" stroke-dasharray="6,3"/>
  68. <text x="75" y="610" font-family="system-ui, sans-serif" font-size="12" fill="#64748b">技术框架层 (forge-starter-parent - 20+ 启动器)</text>
  69. <!-- Starter boxes in 2 rows grid layout -->
  70. <rect x="80" y="625" width="95" height="35" rx="4" fill="#f1f5f9" stroke="#94a3b8"/>
  71. <text x="127" y="647" text-anchor="middle" font-family="system-ui, sans-serif" font-size="10" fill="#475569">starter-auth</text>
  72. <rect x="185" y="625" width="95" height="35" rx="4" fill="#f1f5f9" stroke="#94a3b8"/>
  73. <text x="232" y="647" text-anchor="middle" font-family="system-ui, sans-serif" font-size="10" fill="#475569">starter-cache</text>
  74. <rect x="290" y="625" width="95" height="35" rx="4" fill="#f1f5f9" stroke="#94a3b8"/>
  75. <text x="337" y="647" text-anchor="middle" font-family="system-ui, sans-serif" font-size="10" fill="#475569">starter-orm</text>
  76. <rect x="395" y="625" width="95" height="35" rx="4" fill="#f1f5f9" stroke="#94a3b8"/>
  77. <text x="442" y="647" text-anchor="middle" font-family="system-ui, sans-serif" font-size="10" fill="#475569">starter-web</text>
  78. <rect x="500" y="625" width="95" height="35" rx="4" fill="#f1f5f9" stroke="#94a3b8"/>
  79. <text x="547" y="647" text-anchor="middle" font-family="system-ui, sans-serif" font-size="10" fill="#475569">starter-tenant</text>
  80. <rect x="605" y="625" width="95" height="35" rx="4" fill="#f1f5f9" stroke="#94a3b8"/>
  81. <text x="652" y="647" text-anchor="middle" font-family="system-ui, sans-serif" font-size="10" fill="#475569">starter-datascope</text>
  82. <rect x="710" y="625" width="95" height="35" rx="4" fill="#f1f5f9" stroke="#94a3b8"/>
  83. <text x="757" y="647" text-anchor="middle" font-family="system-ui, sans-serif" font-size="10" fill="#475569">starter-crypto</text>
  84. <rect x="815" y="625" width="70" height="35" rx="4" fill="#f1f5f9" stroke="#94a3b8"/>
  85. <text x="850" y="647" text-anchor="middle" font-family="system-ui, sans-serif" font-size="9" fill="#475569">...</text>
  86. <!-- Row 2 of starters -->
  87. <rect x="80" y="670" width="95" height="35" rx="4" fill="#f1f5f9" stroke="#94a3b8"/>
  88. <text x="127" y="692" text-anchor="middle" font-family="system-ui, sans-serif" font-size="10" fill="#475569">starter-excel</text>
  89. <rect x="185" y="670" width="95" height="35" rx="4" fill="#f1f5f9" stroke="#94a3b8"/>
  90. <text x="232" y="692" text-anchor="middle" font-family="system-ui, sans-serif" font-size="10" fill="#475569">starter-file</text>
  91. <rect x="290" y="670" width="95" height="35" rx="4" fill="#f1f5f9" stroke="#94a3b8"/>
  92. <text x="337" y="692" text-anchor="middle" font-family="system-ui, sans-serif" font-size="10" fill="#475569">starter-log</text>
  93. <rect x="395" y="670" width="95" height="35" rx="4" fill="#f1f5f9" stroke="#94a3b8"/>
  94. <text x="442" y="692" text-anchor="middle" font-family="system-ui, sans-serif" font-size="10" fill="#475569">starter-id</text>
  95. <rect x="500" y="670" width="95" height="35" rx="4" fill="#f1f5f9" stroke="#94a3b8"/>
  96. <text x="547" y="692" text-anchor="middle" font-family="system-ui, sans-serif" font-size="10" fill="#475569">starter-idempotent</text>
  97. <rect x="605" y="670" width="95" height="35" rx="4" fill="#f1f5f9" stroke="#94a3b8"/>
  98. <text x="652" y="692" text-anchor="middle" font-family="system-ui, sans-serif" font-size="10" fill="#475569">starter-job</text>
  99. <rect x="710" y="670" width="95" height="35" rx="4" fill="#f1f5f9" stroke="#94a3b8"/>
  100. <text x="757" y="692" text-anchor="middle" font-family="system-ui, sans-serif" font-size="10" fill="#475569">starter-websocket</text>
  101. <!-- Layer 6: Data Storage -->
  102. <rect x="60" y="730" width="840" height="90" rx="4" fill="none" stroke="#94a3b8" stroke-width="1.5" stroke-dasharray="6,3"/>
  103. <text x="75" y="750" font-family="system-ui, sans-serif" font-size="12" fill="#64748b">数据存储层</text>
  104. <!-- MySQL (Cylinder shape) -->
  105. <rect x="280" y="765" width="140" height="50" rx="5" fill="#fef3c7" stroke="#f59e0b" stroke-width="2"/>
  106. <text x="350" y="795" text-anchor="middle" font-family="system-ui, sans-serif" font-size="13" font-weight="500" fill="#92400e">MySQL 8.0+</text>
  107. <!-- Redis (Cylinder shape) -->
  108. <rect x="540" y="765" width="140" height="50" rx="5" fill="#eff6ff" stroke="#3b82f6" stroke-width="2"/>
  109. <text x="610" y="795" text-anchor="middle" font-family="system-ui, sans-serif" font-size="13" font-weight="500" fill="#1e40af">Redis 6.0+</text>
  110. <!-- Arrows - Layer connections -->
  111. <!-- Client to Frontend -->
  112. <line x1="480" y1="120" x2="480" y2="195" stroke="#2563eb" stroke-width="2" marker-end="url(#arrow)"/>
  113. <rect x="455" y="145" width="50" height="18" rx="3" fill="#ffffff" opacity="0.95"/>
  114. <text x="480" y="157" text-anchor="middle" font-family="system-ui, sans-serif" font-size="10" fill="#2563eb">HTTP</text>
  115. <!-- Frontend to Admin Server (primary) -->
  116. <line x1="480" y1="250" x2="170" y2="345" stroke="#2563eb" stroke-width="2" marker-end="url(#arrow)"/>
  117. <rect x="295" y="280" width="70" height="18" rx="3" fill="#ffffff" opacity="0.95"/>
  118. <text x="330" y="292" text-anchor="middle" font-family="system-ui, sans-serif" font-size="10" fill="#2563eb">REST API</text>
  119. <!-- Frontend to other services (lighter arrows) -->
  120. <line x1="480" y1="250" x2="350" y2="345" stroke="#2563eb" stroke-width="1.5" opacity="0.5" marker-end="url(#arrow)"/>
  121. <line x1="480" y1="250" x2="520" y2="345" stroke="#2563eb" stroke-width="1.5" opacity="0.5" marker-end="url(#arrow)"/>
  122. <line x1="480" y1="250" x2="690" y2="345" stroke="#2563eb" stroke-width="1.5" opacity="0.5" marker-end="url(#arrow)"/>
  123. <!-- Admin Server to Plugins (control flow) -->
  124. <line x1="170" y1="405" x2="145" y2="485" stroke="#ea580c" stroke-width="1.5" marker-end="url(#arrow-orange)"/>
  125. <line x1="170" y1="405" x2="285" y2="485" stroke="#ea580c" stroke-width="1.5" marker-end="url(#arrow-orange)"/>
  126. <line x1="170" y1="405" x2="425" y2="485" stroke="#ea580c" stroke-width="1.5" marker-end="url(#arrow-orange)"/>
  127. <line x1="170" y1="405" x2="565" y2="485" stroke="#ea580c" stroke-width="1.5" marker-end="url(#arrow-orange)"/>
  128. <line x1="170" y1="405" x2="705" y2="485" stroke="#ea580c" stroke-width="1.5" marker-end="url(#arrow-orange)"/>
  129. <line x1="170" y1="405" x2="830" y2="485" stroke="#ea580c" stroke-width="1.5" marker-end="url(#arrow-orange)"/>
  130. <!-- Plugins to Starters (downward) -->
  131. <line x1="480" y1="550" x2="480" y2="625" stroke="#6b7280" stroke-width="1.5" stroke-dasharray="4,2" marker-end="url(#arrow)"/>
  132. <!-- Starters to Data (primary) -->
  133. <line x1="350" y1="700" x2="350" y2="765" stroke="#2563eb" stroke-width="2" marker-end="url(#arrow)"/>
  134. <line x1="610" y1="700" x2="610" y2="765" stroke="#2563eb" stroke-width="2" marker-end="url(#arrow)"/>
  135. <!-- Legend -->
  136. <rect x="740" y="45" width="180" height="85" rx="5" fill="#f9fafb" stroke="#e2e8f0"/>
  137. <text x="750" y="65" font-family="system-ui, sans-serif" font-size="11" font-weight="500" fill="#334155">图例</text>
  138. <line x1="750" y1="80" x2="780" y2="80" stroke="#2563eb" stroke-width="2"/>
  139. <text x="790" y="84" font-family="system-ui, sans-serif" font-size="10" fill="#475569">主要数据流</text>
  140. <line x1="750" y1="95" x2="780" y2="95" stroke="#ea580c" stroke-width="1.5"/>
  141. <text x="790" y="99" font-family="system-ui, sans-serif" font-size="10" fill="#475569">控制/依赖</text>
  142. <line x1="750" y1="110" x2="780" y2="110" stroke="#6b7280" stroke-width="1.5" stroke-dasharray="4,2"/>
  143. <text x="790" y="114" font-family="system-ui, sans-serif" font-size="10" fill="#475569">框架支撑</text>
  144. </svg>