From 895bcacdae4b4e2ccc08dbd1cac4681e52696b58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Tue, 7 Apr 2026 09:08:11 +0000 Subject: [PATCH] fix: architecture diagram unreadable in dark mode (#3752) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary - The inline HTML/CSS flow diagram in `docs/concepts/architecture` was broken — marked's smartypants text transforms corrupted the ` - -
-
Browser Request
-
-
↓
- -
-
Static Files
-
Serve file directly if path matches a static asset
-
-
no match
-
↓
- -
-
Global Middlewareruns in registration order
-
Can modify request/response, set state, or short‑circuit with a Response
-
-
↓
- -
-
Router
-
Match URL pattern + HTTP method. Static routes checked first, then dynamic.
-
-
↓
- -
-
Scoped Middleware
-
Middleware that only runs for matching path prefixes (e.g. /admin/*). Used for auth, logging, or other route‑specific logic.
-
-
↓
- -
-
Handler
-
API route? Return Response directly (JSON, redirect, etc.)
-
-
has component
-
↓
- -
Rendering
- -
-
App Wrapper
-
Outer <html>/<head>/<body> structure
-
-
↓
- -
-
Layouts
-
Nested layout components (inherited from parent directories)
-
-
↓
- -
-
Page Component
-
Route component receives props.data from handler
-
-
↓
- -
-
HTML + JS Responsesent to browser
-
Server‑rendered HTML with island props serialized inline
-
- -
Client (Browser)
-
↓
- -
-
Island Hydrationonly islands receive JS
-
Rest of the page stays static HTML. No JavaScript for non‑island components.
-
- +![Request lifecycle flow diagram](/docs/architecture-flow-v2.svg) ## Key concepts diff --git a/www/static/docs/architecture-flow-v2.svg b/www/static/docs/architecture-flow-v2.svg new file mode 100644 index 00000000..ffae1a88 --- /dev/null +++ b/www/static/docs/architecture-flow-v2.svg @@ -0,0 +1,108 @@ + + + + + + Browser Request + + ↓ + + + + Static Files + Serve file directly if path matches a static asset + + no match + ↓ + + + + Global Middleware + runs in registration order + Can modify request/response, set state, + or short-circuit with a Response + + ↓ + + + + Router + Match URL pattern + HTTP method. + Static routes checked first, then dynamic. + + ↓ + + + + Scoped Middleware + Middleware that only runs for matching path + prefixes (e.g. /admin/*). Used for auth, logging, + or other route-specific logic. + + ↓ + + + + Handler + API route? Return Response directly (JSON, redirect, etc.) + + has component + ↓ + + + + RENDERING + + + + App Wrapper + <html>/<head>/<body> structure + + ↓ + + + + Layouts + Nested layout components (inherited from parent directories) + + ↓ + + + + Page Component + Route component receives props.data from handler + + ↓ + + + + HTML + JS Response + sent to browser + Server-rendered HTML with island props + serialized inline + + + + CLIENT (BROWSER) + + ↓ + + + + Island Hydration + only islands receive JS + Rest of the page stays static HTML. + No JavaScript for non-island components. +