Skip to content

Commit 070fbd0

Browse files
committed
ssg initial flow documentation
1 parent 9f2cb7a commit 070fbd0

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

docs/ssg-initial-flow.mermaid

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
sequenceDiagram
2+
autonumber
3+
actor U as User
4+
participant B as Browser
5+
participant CDN as CDN/Edge Cache
6+
participant Next as Next.js Build (CI)
7+
participant I18N as next-intl (generateStaticParams)
8+
participant RC as Firebase Remote Config (build-time)
9+
participant JS as Client JS (Header component)
10+
11+
rect rgb(235, 245, 255)
12+
note over Next,RC: BUILD TIME (SSG)
13+
Next->>I18N: generateStaticParams() → all locales
14+
I18N-->>Next: locale list
15+
Next->>I18N: Build locale message bundles (baked)
16+
Next->>RC: Fetch Remote Config snapshot (baked)
17+
RC-->>Next: Remote Config values
18+
Next->>Next: Render pages to static HTML
19+
Next->>Next: Extract critical MUI styles (Emotion)
20+
note over Next: <style data-emotion="mui-*"> inlined in HTML
21+
Next->>Next: Emit JS/CSS assets (Header client bundle)
22+
Next->>CDN: Deploy static HTML + assets
23+
end
24+
25+
rect rgb(245, 245, 245)
26+
note over U,CDN: RUNTIME (User request)
27+
U->>B: Navigate to /{locale}/page
28+
B->>CDN: GET /{locale}/page
29+
CDN-->>B: 200 Static HTML (SSG + inline MUI styles)
30+
31+
note over B: ✅ Styled content is painted\n(LCP occurs here)
32+
33+
B->>CDN: GET external CSS (non-critical)
34+
CDN-->>B: CSS files
35+
B->>CDN: GET JS bundle(s)
36+
CDN-->>B: JS
37+
38+
note over B: React hydration begins
39+
B->>JS: Hydrate client components
40+
note over JS: ✅ Header hydration completes\n(interactivity enabled)
41+
end

0 commit comments

Comments
 (0)