Skip to content

Commit 86a6371

Browse files
bartlomiejuclaude
andcommitted
fix: replace architecture diagram HTML with SVG for dark mode support
The inline HTML/CSS diagram in docs/concepts/architecture was unreadable in dark mode because marked's smartypants corrupted the <style> block. Replace with a standalone SVG that uses theme-neutral colors, readable on both light and dark backgrounds. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent d6b0a16 commit 86a6371

2 files changed

Lines changed: 109 additions & 85 deletions

File tree

docs/latest/concepts/architecture.md

Lines changed: 1 addition & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -9,91 +9,7 @@ browser. This page explains how a request flows through the framework.
99

1010
## Request lifecycle
1111

12-
<div style="max-width:620px;font-family:system-ui,-apple-system,sans-serif;font-size:14px;color:#1a1a1a;">
13-
<style>
14-
.flow-step{display:flex;align-items:flex-start;gap:16px}
15-
.flow-box{flex-shrink:0;width:200px;padding:10px 14px;border:1.5px solid #333;border-radius:6px;background:#f8f9fa;text-align:center}
16-
.flow-box strong{display:block;font-size:14px}
17-
.flow-box small{font-size:11px;color:#777}
18-
.flow-box.accent{background:#eef6ff}
19-
.flow-box.green{background:#f0faf0}
20-
.flow-desc{padding-top:10px;font-size:12.5px;color:#555;line-height:1.5}
21-
.flow-arrow{text-align:center;width:200px;color:#666;font-size:18px;line-height:1;padding:4px 0}
22-
.flow-arrow-label{text-align:center;width:200px;padding:2px 0}
23-
.flow-arrow-label em{font-size:11px;color:#777}
24-
.flow-divider{margin:12px 0 8px;padding-top:8px;border-top:1px dashed #e0e0e0;font-size:11px;color:#999;font-weight:600;letter-spacing:0.5px;text-transform:uppercase}
25-
</style>
26-
<!-- Browser Request -->
27-
<div class="flow-step">
28-
<div class="flow-box accent"><strong>Browser Request</strong></div>
29-
</div>
30-
<div class="flow-arrow">&#x2193;</div>
31-
<!-- Static Files -->
32-
<div class="flow-step">
33-
<div class="flow-box"><strong>Static Files</strong></div>
34-
<div class="flow-desc">Serve file directly if path matches a static asset</div>
35-
</div>
36-
<div class="flow-arrow-label"><em>no match</em></div>
37-
<div class="flow-arrow">&#x2193;</div>
38-
<!-- Global Middleware -->
39-
<div class="flow-step">
40-
<div class="flow-box"><strong>Global Middleware</strong><small>runs in registration order</small></div>
41-
<div class="flow-desc">Can modify request/response, set state, or short&#8209;circuit with a Response</div>
42-
</div>
43-
<div class="flow-arrow">&#x2193;</div>
44-
<!-- Router -->
45-
<div class="flow-step">
46-
<div class="flow-box"><strong>Router</strong></div>
47-
<div class="flow-desc">Match URL pattern + HTTP method. Static routes checked first, then dynamic.</div>
48-
</div>
49-
<div class="flow-arrow">&#x2193;</div>
50-
<!-- Scoped Middleware -->
51-
<div class="flow-step">
52-
<div class="flow-box"><strong>Scoped Middleware</strong></div>
53-
<div class="flow-desc">Middleware that only runs for matching path prefixes (e.g. /admin/*). Used for auth, logging, or other route&#8209;specific logic.</div>
54-
</div>
55-
<div class="flow-arrow">&#x2193;</div>
56-
<!-- Handler -->
57-
<div class="flow-step">
58-
<div class="flow-box"><strong>Handler</strong></div>
59-
<div class="flow-desc">API route? Return Response directly (JSON, redirect, etc.)</div>
60-
</div>
61-
<div class="flow-arrow-label"><em>has component</em></div>
62-
<div class="flow-arrow">&#x2193;</div>
63-
<!-- Rendering section -->
64-
<div class="flow-divider">Rendering</div>
65-
<!-- App Wrapper -->
66-
<div class="flow-step">
67-
<div class="flow-box"><strong>App Wrapper</strong></div>
68-
<div class="flow-desc">Outer &lt;html&gt;/&lt;head&gt;/&lt;body&gt; structure</div>
69-
</div>
70-
<div class="flow-arrow">&#x2193;</div>
71-
<!-- Layouts -->
72-
<div class="flow-step">
73-
<div class="flow-box"><strong>Layouts</strong></div>
74-
<div class="flow-desc">Nested layout components (inherited from parent directories)</div>
75-
</div>
76-
<div class="flow-arrow">&#x2193;</div>
77-
<!-- Page Component -->
78-
<div class="flow-step">
79-
<div class="flow-box"><strong>Page Component</strong></div>
80-
<div class="flow-desc">Route component receives props.data from handler</div>
81-
</div>
82-
<div class="flow-arrow">&#x2193;</div>
83-
<!-- HTML Response -->
84-
<div class="flow-step">
85-
<div class="flow-box accent"><strong>HTML + JS Response</strong><small>sent to browser</small></div>
86-
<div class="flow-desc">Server&#8209;rendered HTML with island props <a href="/docs/advanced/serialization">serialized</a> inline</div>
87-
</div>
88-
<!-- Client section -->
89-
<div class="flow-divider">Client (Browser)</div>
90-
<div class="flow-arrow">&#x2193;</div>
91-
<!-- Hydration -->
92-
<div class="flow-step">
93-
<div class="flow-box green"><strong>Island Hydration</strong><small>only islands receive JS</small></div>
94-
<div class="flow-desc">Rest of the page stays static HTML. No JavaScript for non&#8209;island components.</div>
95-
</div>
96-
</div>
12+
![Request lifecycle flow diagram](/docs/architecture-flow-v2.svg)
9713

9814
## Key concepts
9915

Lines changed: 108 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)