template.html 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>[PROJECT NAME] Architecture Diagram</title>
  7. <link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&display=swap" rel="stylesheet">
  8. <style>
  9. * {
  10. margin: 0;
  11. padding: 0;
  12. box-sizing: border-box;
  13. }
  14. body {
  15. font-family: 'JetBrains Mono', monospace;
  16. background: #020617;
  17. min-height: 100vh;
  18. padding: 2rem;
  19. color: white;
  20. }
  21. .container {
  22. max-width: 1200px;
  23. margin: 0 auto;
  24. }
  25. .header {
  26. margin-bottom: 2rem;
  27. }
  28. .header-row {
  29. display: flex;
  30. align-items: center;
  31. gap: 1rem;
  32. margin-bottom: 0.5rem;
  33. }
  34. .pulse-dot {
  35. width: 12px;
  36. height: 12px;
  37. background: #22d3ee;
  38. border-radius: 50%;
  39. animation: pulse 2s infinite;
  40. }
  41. @keyframes pulse {
  42. 0%, 100% { opacity: 1; }
  43. 50% { opacity: 0.5; }
  44. }
  45. h1 {
  46. font-size: 1.5rem;
  47. font-weight: 700;
  48. letter-spacing: -0.025em;
  49. }
  50. .subtitle {
  51. color: #94a3b8;
  52. font-size: 0.875rem;
  53. margin-left: 1.75rem;
  54. }
  55. .diagram-container {
  56. background: rgba(15, 23, 42, 0.5);
  57. border-radius: 1rem;
  58. border: 1px solid #1e293b;
  59. padding: 1.5rem;
  60. overflow-x: auto;
  61. }
  62. svg {
  63. width: 100%;
  64. min-width: 900px;
  65. display: block;
  66. }
  67. .cards {
  68. display: grid;
  69. grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  70. gap: 1rem;
  71. margin-top: 2rem;
  72. }
  73. .card {
  74. background: rgba(15, 23, 42, 0.5);
  75. border-radius: 0.75rem;
  76. border: 1px solid #1e293b;
  77. padding: 1.25rem;
  78. }
  79. .card-header {
  80. display: flex;
  81. align-items: center;
  82. gap: 0.5rem;
  83. margin-bottom: 0.75rem;
  84. }
  85. .card-dot {
  86. width: 8px;
  87. height: 8px;
  88. border-radius: 50%;
  89. }
  90. .card-dot.cyan { background: #22d3ee; }
  91. .card-dot.emerald { background: #34d399; }
  92. .card-dot.violet { background: #a78bfa; }
  93. .card-dot.amber { background: #fbbf24; }
  94. .card-dot.rose { background: #fb7185; }
  95. .card h3 {
  96. font-size: 0.875rem;
  97. font-weight: 600;
  98. }
  99. .card ul {
  100. list-style: none;
  101. color: #94a3b8;
  102. font-size: 0.75rem;
  103. }
  104. .card li {
  105. margin-bottom: 0.375rem;
  106. }
  107. .footer {
  108. text-align: center;
  109. margin-top: 1.5rem;
  110. color: #475569;
  111. font-size: 0.75rem;
  112. }
  113. </style>
  114. </head>
  115. <body>
  116. <div class="container">
  117. <!-- Header -->
  118. <div class="header">
  119. <div class="header-row">
  120. <div class="pulse-dot"></div>
  121. <h1>[PROJECT NAME] Architecture</h1>
  122. </div>
  123. <p class="subtitle">[Subtitle description]</p>
  124. </div>
  125. <!-- Main Diagram -->
  126. <div class="diagram-container">
  127. <svg viewBox="0 0 1000 680">
  128. <!-- Definitions -->
  129. <defs>
  130. <marker id="arrowhead" markerWidth="10" markerHeight="7" refX="9" refY="3.5" orient="auto">
  131. <polygon points="0 0, 10 3.5, 0 7" fill="#64748b" />
  132. </marker>
  133. <pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse">
  134. <path d="M 40 0 L 0 0 0 40" fill="none" stroke="#1e293b" stroke-width="0.5"/>
  135. </pattern>
  136. </defs>
  137. <!-- Background Grid -->
  138. <rect width="100%" height="100%" fill="url(#grid)" />
  139. <!-- =================================================================
  140. COMPONENT EXAMPLES - Copy and customize these patterns
  141. ================================================================= -->
  142. <!-- External/Generic Component -->
  143. <rect x="30" y="280" width="100" height="50" rx="6" fill="rgba(30, 41, 59, 0.5)" stroke="#94a3b8" stroke-width="1.5"/>
  144. <text x="80" y="300" fill="white" font-size="11" font-weight="600" text-anchor="middle">Users</text>
  145. <text x="80" y="316" fill="#94a3b8" font-size="9" text-anchor="middle">Browser/Mobile</text>
  146. <!-- Security Component -->
  147. <rect x="30" y="80" width="100" height="60" rx="6" fill="rgba(136, 19, 55, 0.4)" stroke="#fb7185" stroke-width="1.5"/>
  148. <text x="80" y="105" fill="white" font-size="11" font-weight="600" text-anchor="middle">Auth Provider</text>
  149. <text x="80" y="121" fill="#94a3b8" font-size="9" text-anchor="middle">OAuth 2.0</text>
  150. <!-- Region/Cloud Boundary -->
  151. <rect x="160" y="40" width="820" height="620" rx="12" fill="rgba(251, 191, 36, 0.05)" stroke="#fbbf24" stroke-width="1" stroke-dasharray="8,4"/>
  152. <text x="172" y="58" fill="#fbbf24" font-size="10" font-weight="600">AWS Region: us-west-2</text>
  153. <!-- AWS/Cloud Service -->
  154. <rect x="200" y="280" width="110" height="50" rx="6" fill="rgba(120, 53, 15, 0.3)" stroke="#fbbf24" stroke-width="1.5"/>
  155. <text x="255" y="300" fill="white" font-size="11" font-weight="600" text-anchor="middle">CloudFront</text>
  156. <text x="255" y="316" fill="#94a3b8" font-size="9" text-anchor="middle">CDN</text>
  157. <!-- Multi-line AWS Component (S3 Buckets example) -->
  158. <rect x="200" y="380" width="110" height="100" rx="6" fill="rgba(120, 53, 15, 0.3)" stroke="#fbbf24" stroke-width="1.5"/>
  159. <text x="255" y="400" fill="white" font-size="11" font-weight="600" text-anchor="middle">S3 Buckets</text>
  160. <text x="255" y="420" fill="#94a3b8" font-size="8" text-anchor="middle">• bucket-one</text>
  161. <text x="255" y="434" fill="#94a3b8" font-size="8" text-anchor="middle">• bucket-two</text>
  162. <text x="255" y="448" fill="#94a3b8" font-size="8" text-anchor="middle">• bucket-three</text>
  163. <text x="255" y="466" fill="#fbbf24" font-size="7" text-anchor="middle">OAI Protected</text>
  164. <!-- Security Group (dashed boundary) -->
  165. <rect x="350" y="265" width="120" height="80" rx="8" fill="transparent" stroke="#fb7185" stroke-width="1" stroke-dasharray="4,4"/>
  166. <text x="358" y="279" fill="#fb7185" font-size="8">sg-name :port</text>
  167. <!-- Component inside security group -->
  168. <rect x="360" y="280" width="100" height="50" rx="6" fill="rgba(120, 53, 15, 0.3)" stroke="#fbbf24" stroke-width="1.5"/>
  169. <text x="410" y="300" fill="white" font-size="11" font-weight="600" text-anchor="middle">Load Balancer</text>
  170. <text x="410" y="316" fill="#94a3b8" font-size="9" text-anchor="middle">HTTPS :443</text>
  171. <!-- Backend Component -->
  172. <rect x="510" y="280" width="110" height="50" rx="6" fill="rgba(6, 78, 59, 0.4)" stroke="#34d399" stroke-width="1.5"/>
  173. <text x="565" y="300" fill="white" font-size="11" font-weight="600" text-anchor="middle">API Server</text>
  174. <text x="565" y="316" fill="#94a3b8" font-size="9" text-anchor="middle">FastAPI :8000</text>
  175. <!-- Database Component -->
  176. <rect x="700" y="280" width="120" height="50" rx="6" fill="rgba(76, 29, 149, 0.4)" stroke="#a78bfa" stroke-width="1.5"/>
  177. <text x="760" y="300" fill="white" font-size="11" font-weight="600" text-anchor="middle">Database</text>
  178. <text x="760" y="316" fill="#94a3b8" font-size="9" text-anchor="middle">PostgreSQL</text>
  179. <!-- Frontend Component -->
  180. <rect x="200" y="520" width="200" height="110" rx="8" fill="rgba(8, 51, 68, 0.4)" stroke="#22d3ee" stroke-width="1.5"/>
  181. <text x="300" y="545" fill="white" font-size="12" font-weight="600" text-anchor="middle">Frontend</text>
  182. <text x="300" y="565" fill="#94a3b8" font-size="9" text-anchor="middle">React + TypeScript</text>
  183. <text x="300" y="580" fill="#94a3b8" font-size="9" text-anchor="middle">Additional detail</text>
  184. <text x="300" y="595" fill="#94a3b8" font-size="9" text-anchor="middle">More info</text>
  185. <text x="300" y="615" fill="#22d3ee" font-size="8" text-anchor="middle">domain.example.com</text>
  186. <!-- =================================================================
  187. ARROW EXAMPLES
  188. ================================================================= -->
  189. <!-- Standard arrow with label -->
  190. <line x1="130" y1="305" x2="198" y2="305" stroke="#22d3ee" stroke-width="1.5" marker-end="url(#arrowhead)"/>
  191. <text x="164" y="299" fill="#94a3b8" font-size="9" text-anchor="middle">HTTPS</text>
  192. <!-- Simple arrow (no label) -->
  193. <line x1="310" y1="305" x2="358" y2="305" stroke="#22d3ee" stroke-width="1.5" marker-end="url(#arrowhead)"/>
  194. <!-- Vertical arrow -->
  195. <line x1="255" y1="330" x2="255" y2="378" stroke="#fbbf24" stroke-width="1.5" marker-end="url(#arrowhead)"/>
  196. <text x="270" y="358" fill="#94a3b8" font-size="9">OAI</text>
  197. <!-- Dashed arrow (for auth/security flows) -->
  198. <line x1="460" y1="305" x2="508" y2="305" stroke="#34d399" stroke-width="1.5" marker-end="url(#arrowhead)"/>
  199. <line x1="620" y1="305" x2="698" y2="305" stroke="#a78bfa" stroke-width="1.5" marker-end="url(#arrowhead)"/>
  200. <text x="655" y="299" fill="#94a3b8" font-size="9">TLS</text>
  201. <!-- Curved path for auth flow -->
  202. <path d="M 80 140 L 80 200 Q 80 220 100 220 L 200 220 Q 220 220 220 240 L 220 278" fill="none" stroke="#fb7185" stroke-width="1.5" stroke-dasharray="5,5"/>
  203. <text x="150" y="210" fill="#fb7185" font-size="8">JWT + PKCE</text>
  204. <!-- =================================================================
  205. LEGEND
  206. ================================================================= -->
  207. <text x="720" y="70" fill="white" font-size="10" font-weight="600">Legend</text>
  208. <rect x="720" y="82" width="16" height="10" rx="2" fill="rgba(8, 51, 68, 0.4)" stroke="#22d3ee" stroke-width="1"/>
  209. <text x="742" y="90" fill="#94a3b8" font-size="8">Frontend</text>
  210. <rect x="720" y="98" width="16" height="10" rx="2" fill="rgba(6, 78, 59, 0.4)" stroke="#34d399" stroke-width="1"/>
  211. <text x="742" y="106" fill="#94a3b8" font-size="8">Backend</text>
  212. <rect x="720" y="114" width="16" height="10" rx="2" fill="rgba(120, 53, 15, 0.3)" stroke="#fbbf24" stroke-width="1"/>
  213. <text x="742" y="122" fill="#94a3b8" font-size="8">Cloud Service</text>
  214. <rect x="720" y="130" width="16" height="10" rx="2" fill="rgba(76, 29, 149, 0.4)" stroke="#a78bfa" stroke-width="1"/>
  215. <text x="742" y="138" fill="#94a3b8" font-size="8">Database</text>
  216. <rect x="720" y="146" width="16" height="10" rx="2" fill="rgba(136, 19, 55, 0.4)" stroke="#fb7185" stroke-width="1"/>
  217. <text x="742" y="154" fill="#94a3b8" font-size="8">Security</text>
  218. <line x1="720" y1="168" x2="736" y2="168" stroke="#fb7185" stroke-width="1" stroke-dasharray="3,3"/>
  219. <text x="742" y="171" fill="#94a3b8" font-size="8">Auth Flow</text>
  220. <rect x="720" y="178" width="16" height="10" rx="2" fill="transparent" stroke="#fb7185" stroke-width="1" stroke-dasharray="3,3"/>
  221. <text x="742" y="186" fill="#94a3b8" font-size="8">Security Group</text>
  222. </svg>
  223. </div>
  224. <!-- Info Cards -->
  225. <div class="cards">
  226. <div class="card">
  227. <div class="card-header">
  228. <div class="card-dot rose"></div>
  229. <h3>Card Title 1</h3>
  230. </div>
  231. <ul>
  232. <li>• Item one</li>
  233. <li>• Item two</li>
  234. <li>• Item three</li>
  235. <li>• Item four</li>
  236. </ul>
  237. </div>
  238. <div class="card">
  239. <div class="card-header">
  240. <div class="card-dot amber"></div>
  241. <h3>Card Title 2</h3>
  242. </div>
  243. <ul>
  244. <li>• Item one</li>
  245. <li>• Item two</li>
  246. <li>• Item three</li>
  247. <li>• Item four</li>
  248. </ul>
  249. </div>
  250. <div class="card">
  251. <div class="card-header">
  252. <div class="card-dot violet"></div>
  253. <h3>Card Title 3</h3>
  254. </div>
  255. <ul>
  256. <li>• Item one</li>
  257. <li>• Item two</li>
  258. <li>• Item three</li>
  259. <li>• Item four</li>
  260. </ul>
  261. </div>
  262. </div>
  263. <!-- Footer -->
  264. <p class="footer">
  265. [Project Name] • [Additional metadata]
  266. </p>
  267. </div>
  268. </body>
  269. </html>