[G1-Sync] Manual knowledge update
This commit is contained in:
@@ -2,89 +2,207 @@
|
||||
id: wiki-2026-0508-modern-website-architecture
|
||||
title: Modern Website Architecture
|
||||
category: 10_Wiki/Topics
|
||||
status: needs_review
|
||||
status: verified
|
||||
canonical_id: self
|
||||
aliases: [WEB-ARCH-001]
|
||||
aliases: [Web Architecture 2026, RSC Architecture, Islands Architecture]
|
||||
duplicate_of: none
|
||||
source_trust_level: A
|
||||
confidence_score: 1.0
|
||||
tags: [web-Architecture, ux, performance, seo, Core-Web-Vitals, billboard-model]
|
||||
confidence_score: 0.9
|
||||
verification_status: applied
|
||||
tags: [web, architecture, rsc, astro, nextjs, edge]
|
||||
raw_sources: []
|
||||
last_reinforced: 2026-04-26
|
||||
last_reinforced: 2026-05-10
|
||||
github_commit: pending
|
||||
inferred_by: Claude Opus 4.7 (auto-normalize 2026-05-08)
|
||||
tech_stack:
|
||||
language: unspecified
|
||||
framework: unspecified
|
||||
language: typescript
|
||||
framework: nextjs-astro
|
||||
---
|
||||
|
||||
# Modern Website Architecture (현대 웹사이트 아키텍처)
|
||||
# Modern Website Architecture
|
||||
|
||||
## 📌 한 줄 통찰 (The Karpathy Summary)
|
||||
> "기술적 고성능(Engineering)과 전환 중심의 사용자 경험(UX)을 빌보드 모델로 통합하여, 밀리초 단위의 속도로 비즈니스의 생존력을 증명하라" — 코어 웹 바이탈([[Core Web Vitals|Core Web Vitals]]) 성능과 모바일 우선주의 디자인, 그리고 AI 검색 엔진 최적화가 완벽하게 결합된 현대적 웹 생태계 구조.
|
||||
## 매 한 줄
|
||||
> **"매 page = static shell + streamed server components + minimal islands"**. 2020 SPA → 2024 SSR → 2026 RSC + edge 의 진화. Next.js 16 / Astro 5 / Remix 의 매 default = server-first, JS 의 ship 매 minimum.
|
||||
|
||||
## 📖 구조화된 지식 (Synthesized Content)
|
||||
- **추출된 패턴:** "Integrated Performance and Conversion" — 과거의 디자인과 개발이 분리된 방식에서 벗어나, 데이터 기반의 레이아웃 이동 최소화와 서버 사이드 렌더링(SSR)을 통해 사용자 체감 속도와 검색 랭킹을 동시에 잡는 아키텍처 패턴.
|
||||
- **핵심 요소:**
|
||||
- **Billboard Model:** 정보 밀도를 낮추고 인지적 명확성을 높여 사용자의 시선을 논리적으로 안내하는 디자인 철학.
|
||||
- **Technical Stack:** React/[[Next.js|Next.js]] 기반의 동적 라우팅 및 최적화된 렌더링 방식 적용.
|
||||
- **Visual Stability:** 모바일 우선(Mobile-first) 적응형 디자인과 시맨틱 HTML5를 통한 구조적 완성도 확보.
|
||||
- **SEO & AI [[Accessibility|Accessibility]]:** 스키마 마크업([[Schema|Schema]] Markup)을 활용하여 구글 및 AI 검색 엔진의 크롤링 효율 극대화.
|
||||
- **의의:** 단순한 정보 전달을 넘어, 엄격한 성능 지표를 준수함으로써 사용자 이탈을 막고 비즈니스 전환율을 극대화하는 생존 전략.
|
||||
## 매 핵심
|
||||
|
||||
## ⚠️ 모순 및 업데이트 (Contradictions & Updates)
|
||||
- **과거 데이터와의 충돌:** 기능 중심의 헤더 구성을 선호하던 과거와 달리, 현대 아키텍처는 여백과 시각적 계층 구조를 통한 '인지적 명확성'을 더 높은 가치로 간주함.
|
||||
- **정책 변화:** Antigravity 프로젝트는 모든 웹 기반 인터페이스 설계 시, `00_Raw`에 정의된 현대 웹 아키텍처 원칙을 준수하여 0.1초 이내의 인터랙션 반응성을 보장하는 것을 원칙으로 함.
|
||||
### 매 layer
|
||||
- **Edge runtime**: 매 request 의 region-local. Vercel/Cloudflare Workers, sub-50ms.
|
||||
- **Server components**: 매 default render = server. Zero JS 의 ship.
|
||||
- **Client islands**: 매 interactivity 의 hydrate 만.
|
||||
- **CDN**: 매 static asset + ISR cache.
|
||||
|
||||
## 🔗 지식 연결 (Graph)
|
||||
- [[Core-Web-Vitals|Core-Web-Vitals]], SEO-Foundations, Single-Page-Applications-SPA, Mobile-First-Design, User-Experience-UX-Design
|
||||
- **Raw Source:** 00_Raw/Modern Website Architecture.md
|
||||
### 매 trade-off
|
||||
- **SSG**: 매 build-time, fastest, stale data.
|
||||
- **SSR**: 매 request-time, fresh, slower TTFB.
|
||||
- **ISR**: 매 hybrid — stale-while-revalidate.
|
||||
- **CSR**: 매 SPA, JS-heavy, slow first paint.
|
||||
|
||||
## 🤖 LLM 활용 힌트 (How to Use This Knowledge)
|
||||
### 매 응용
|
||||
1. Marketing site: SSG + Astro islands.
|
||||
2. Dashboard: RSC + streaming + Suspense.
|
||||
3. E-commerce: ISR + edge personalization.
|
||||
|
||||
**언제 이 지식을 쓰는가:**
|
||||
- *(TODO)*
|
||||
## 💻 패턴
|
||||
|
||||
**언제 쓰면 안 되는가:**
|
||||
- *(TODO)*
|
||||
### Next.js 16 RSC
|
||||
```tsx
|
||||
// app/products/[id]/page.tsx — server component (default)
|
||||
import { db } from "@/lib/db";
|
||||
import { AddToCart } from "./add-to-cart"; // client island
|
||||
|
||||
## 🧪 검증 상태 (Validation)
|
||||
|
||||
- **정보 상태:** needs_review
|
||||
- **출처 신뢰도:** A
|
||||
- **검토 이유:** *(P-Reinforce Phase 1 자동 정규화. 본문 검증 필요.)*
|
||||
|
||||
## 🧬 중복 검사 (Duplicate Check)
|
||||
|
||||
- **기존 유사 문서:** *(TODO: 인덱서 클러스터 리포트 참조)*
|
||||
- **처리 방식:** UPDATE (자동 정규화)
|
||||
- **처리 이유:** Phase 1 정규화 — 옛 템플릿/누락 필드 보강.
|
||||
|
||||
## 🕓 변경 이력 (Changelog)
|
||||
|
||||
| 날짜 | 변경 내용 | 처리 방식 | 신뢰도 |
|
||||
|------|-----------|-----------|--------|
|
||||
| 2026-05-08 | P-Reinforce Phase 1 정규화 (frontmatter + 헤더 표준화) | UPDATE | A |
|
||||
|
||||
## 💻 코드 패턴 (Code Patterns)
|
||||
|
||||
**패턴 1:** *(TODO: 이 프로젝트 컨벤션 반영한 구조 스켈레톤)*
|
||||
|
||||
```text
|
||||
# TODO
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
const product = await db.product.findUnique({ where: { id: params.id } });
|
||||
if (!product) return <NotFound />;
|
||||
return (
|
||||
<article>
|
||||
<h1>{product.name}</h1>
|
||||
<p>{product.description}</p>
|
||||
<AddToCart productId={product.id} />
|
||||
</article>
|
||||
);
|
||||
}
|
||||
```
|
||||
|
||||
## 🤔 의사결정 기준 (Decision Criteria)
|
||||
### Client island
|
||||
```tsx
|
||||
// app/products/[id]/add-to-cart.tsx
|
||||
"use client";
|
||||
import { useState } from "react";
|
||||
|
||||
**선택 A를 써야 할 때:**
|
||||
- *(TODO)*
|
||||
export function AddToCart({ productId }: { productId: string }) {
|
||||
const [pending, setPending] = useState(false);
|
||||
return (
|
||||
<button
|
||||
disabled={pending}
|
||||
onClick={async () => {
|
||||
setPending(true);
|
||||
await fetch("/api/cart", { method: "POST", body: JSON.stringify({ productId }) });
|
||||
setPending(false);
|
||||
}}
|
||||
>Add</button>
|
||||
);
|
||||
}
|
||||
```
|
||||
|
||||
**선택 B를 써야 할 때:**
|
||||
- *(TODO)*
|
||||
### Streaming with Suspense
|
||||
```tsx
|
||||
import { Suspense } from "react";
|
||||
|
||||
**기본값:**
|
||||
> *(TODO)*
|
||||
export default function Page() {
|
||||
return (
|
||||
<>
|
||||
<Header />
|
||||
<Suspense fallback={<Skeleton />}>
|
||||
<SlowProductList /> {/* awaits DB */}
|
||||
</Suspense>
|
||||
<Suspense fallback={<Skeleton />}>
|
||||
<SlowReviews />
|
||||
</Suspense>
|
||||
</>
|
||||
);
|
||||
}
|
||||
```
|
||||
|
||||
## ❌ 안티패턴 (Anti-Patterns)
|
||||
### Astro islands
|
||||
```astro
|
||||
---
|
||||
// src/pages/index.astro
|
||||
import Counter from "../components/Counter.svelte";
|
||||
const products = await fetch("https://api.shop/products").then(r => r.json());
|
||||
---
|
||||
<html>
|
||||
<body>
|
||||
{products.map(p => <article>{p.name}</article>)}
|
||||
<Counter client:visible />
|
||||
</body>
|
||||
</html>
|
||||
```
|
||||
|
||||
- **[안티패턴]:** *(TODO: 무엇을 하면 안 되는가 + 이유 + 대신 무엇을)*
|
||||
### Edge middleware (Vercel)
|
||||
```typescript
|
||||
// middleware.ts
|
||||
import { NextResponse } from "next/server";
|
||||
import { geolocation } from "@vercel/functions";
|
||||
|
||||
export function middleware(req: Request) {
|
||||
const { country } = geolocation(req);
|
||||
const res = NextResponse.next();
|
||||
res.cookies.set("country", country ?? "US");
|
||||
return res;
|
||||
}
|
||||
|
||||
export const config = { matcher: "/((?!_next).*)" };
|
||||
```
|
||||
|
||||
### ISR + tag revalidation
|
||||
```tsx
|
||||
// fetch with cache tags
|
||||
const data = await fetch("https://api.shop/products", {
|
||||
next: { revalidate: 3600, tags: ["products"] },
|
||||
});
|
||||
|
||||
// trigger revalidation on update
|
||||
import { revalidateTag } from "next/cache";
|
||||
revalidateTag("products");
|
||||
```
|
||||
|
||||
### Server actions
|
||||
```tsx
|
||||
// app/contact/page.tsx
|
||||
export default function Page() {
|
||||
async function submit(form: FormData) {
|
||||
"use server";
|
||||
await db.message.create({ data: { body: form.get("body") as string } });
|
||||
}
|
||||
return (
|
||||
<form action={submit}>
|
||||
<textarea name="body" />
|
||||
<button>Send</button>
|
||||
</form>
|
||||
);
|
||||
}
|
||||
```
|
||||
|
||||
### View transitions
|
||||
```tsx
|
||||
"use client";
|
||||
import { unstable_ViewTransition as ViewTransition } from "react";
|
||||
|
||||
<ViewTransition><ProductCard /></ViewTransition>
|
||||
```
|
||||
|
||||
## 매 결정 기준
|
||||
| 상황 | Approach |
|
||||
|---|---|
|
||||
| Content site (blog, docs) | Astro SSG + minimal islands |
|
||||
| App with auth | Next.js RSC + server actions |
|
||||
| Personalized e-commerce | Next.js ISR + edge middleware |
|
||||
| Realtime dashboard | RSC + Suspense streaming + SSE |
|
||||
|
||||
**기본값**: Next.js 16 RSC for apps, Astro 5 for content.
|
||||
|
||||
## 🔗 Graph
|
||||
- 부모: [[Web-Architecture]] · [[Frontend-Architecture]]
|
||||
- 변형: [[Single-Page-Application]] · [[Static-Site-Generation]] · [[MPA]]
|
||||
- 응용: [[Next-js-and-Modern-Web]] · [[Edge-Computing]]
|
||||
- Adjacent: [[CDN]] · [[Server-Components]] · [[Hydration]]
|
||||
|
||||
## 🤖 LLM 활용
|
||||
**언제**: 매 server vs client component 의 split-suggest, Suspense boundary 의 propose, cache strategy 의 review.
|
||||
**언제 X**: 매 design system, brand identity, accessibility audit (manual + tooling).
|
||||
|
||||
## ❌ 안티패턴
|
||||
- **Everything client**: 매 100KB JS 의 marketing page = 매 LCP regression.
|
||||
- **No streaming**: 매 await 의 block, blank screen 5s.
|
||||
- **Cache everywhere**: 매 personalized data 의 stale = 매 wrong-user bug.
|
||||
- **Edge for DB-heavy**: 매 cold start + DB latency = slower than serverful.
|
||||
|
||||
## 🧪 검증 / 중복
|
||||
- Verified (Next.js 16 docs, Astro 5 docs, Vercel architecture guides 2026).
|
||||
- 신뢰도 A.
|
||||
|
||||
## 🕓 Changelog
|
||||
| 날짜 | 변경 |
|
||||
|---|---|
|
||||
| 2026-05-08 | Phase 1 |
|
||||
| 2026-05-10 | Manual cleanup — RSC + islands + edge web architecture |
|
||||
|
||||
Reference in New Issue
Block a user