c24165b8bc
에이전트 8종(대화형/프로그래머 C·S/디자이너/설계자/기획자/QA/PD/PM)에게 [공통 기본 능력 + 롤별 Specialty] 2층으로 지식을 주입하기 위한 재분류. 문서 내용·포맷은 무수정, 폴더 이동만 (6,372개 문서 수 보존 확인). - Topic_Programming → Domain_Programming (내부 구조 보존) - Topic_Graphic → Domain_Design - Topic_Business → Domain_Product - Topic_General → Domain_General - _Common 신설: Math(구 Topic_Math_Specialty), Reasoning(구 General/From_Thinking & Reasoning), Reasoning_Creativity(구 General/From_창의성), Communication(Poetic_Blog_Writing + From_writing) - 타 도메인의 From_* 폴더는 유지 (출처 표기일 뿐, 이미 도메인에 맞게 분류된 문서) - 빈 폴더 정리 (memory/procedures) - 에이전트→폴더 매핑은 workspace의 .astra/agent-knowledge-map.json (9개 에이전트) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
6.0 KiB
6.0 KiB
id, title, category, status, canonical_id, aliases, duplicate_of, source_trust_level, confidence_score, verification_status, tags, raw_sources, last_reinforced, github_commit, tech_stack
| id | title | category | status | canonical_id | aliases | duplicate_of | source_trust_level | confidence_score | verification_status | tags | raw_sources | last_reinforced | github_commit | tech_stack | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| wiki-2026-0508-web-rendering-strategies-csr-vs- | Web Rendering Strategies — CSR vs SSR | 10_Wiki/Topics | verified | self |
|
none | A | 0.9 | applied |
|
2026-05-10 | pending |
|
Web Rendering Strategies — CSR vs SSR
매 한 줄
"매 어디서 render 매 (server/build/client/edge), 매 언제 (request/build/runtime), 매 무엇 (static/dynamic) — 매 이 3 축 의 매 trade-off". 매 2026 매 hybrid (RSC + Streaming SSR + ISR + Edge) 매 default — Next.js / Nuxt / Remix / SvelteKit / Astro 매 모두 mix.
매 핵심
매 5 가지 strategy
- CSR (Client-Side Rendering): empty HTML + JS bundle → browser 매 render. SPA classic.
- SSR (Server-Side Rendering): per-request HTML on server.
- SSG (Static Site Generation): build-time HTML.
- ISR (Incremental Static Regeneration): SSG + on-demand or time-based revalidate.
- RSC (React Server Components, 2023~): server-only component, zero JS ship for that part.
매 핵심 metric
- TTFB: server response time.
- FCP / LCP: 매 visible content speed.
- TTI: 매 interactive — hydration cost.
- INP: 매 interaction latency (FID 의 후속, Core Web Vitals 2024+).
- JS bundle: 매 작을 수록 hydration fast.
매 응용
- Marketing site → SSG / ISR (Astro, Next).
- E-commerce → ISR + dynamic SSR for cart.
- Dashboard / admin → CSR or SSR with auth.
- Blog → SSG + ISR.
- Real-time chat → CSR + SSE/WebSocket.
- News site → ISR (revalidate every 60s).
💻 패턴
Next.js App Router (RSC + streaming)
// app/products/[id]/page.tsx — RSC, fetched on server, no JS shipped
export default async function ProductPage({ params }: { params: { id: string } }) {
const product = await db.product.findUnique({ where: { id: params.id } });
return (
<article>
<h1>{product.name}</h1>
<Suspense fallback={<Skeleton />}>
<Reviews productId={params.id} />
</Suspense>
</article>
);
}
ISR with revalidate
// Next.js — 매 60s 마다 background regenerate
export const revalidate = 60;
export default async function Posts() {
const posts = await fetch("https://api.example.com/posts").then((r) => r.json());
return <ul>{posts.map((p) => <li key={p.id}>{p.title}</li>)}</ul>;
}
SSG with generateStaticParams
export async function generateStaticParams() {
const slugs = await getAllSlugs();
return slugs.map((slug) => ({ slug }));
}
CSR via dynamic + ssr:false
"use client";
import dynamic from "next/dynamic";
const Chart = dynamic(() => import("./HeavyChart"), { ssr: false });
export default function Page() { return <Chart />; }
Streaming SSR (Suspense)
// app/dashboard/page.tsx
export default function Dashboard() {
return (
<>
<Header />
<Suspense fallback={<Skel />}><SlowWidget /></Suspense>
<Suspense fallback={<Skel />}><AnotherSlow /></Suspense>
</>
);
}
// 매 shell 먼저 flush, 매 widget ready 시 stream
Edge runtime (Vercel / Cloudflare Workers)
// Next.js — Edge 매 cold start 매 0 에 가까움
export const runtime = "edge";
export async function GET(req: Request) {
const country = req.headers.get("x-vercel-ip-country") ?? "US";
return new Response(`Hello from ${country}`);
}
Astro islands
---
// 매 default static, 매 island 만 hydrate
import Counter from "../components/Counter.tsx";
const posts = await fetch("...").then((r) => r.json());
---
<html>
<body>
{posts.map((p) => <article><h2>{p.title}</h2></article>)}
<Counter client:visible /> <!-- viewport entry 시 hydrate -->
</body>
</html>
On-demand revalidation
// Next.js — webhook 받으면 매 즉시 invalidate
import { revalidateTag, revalidatePath } from "next/cache";
export async function POST(req: Request) {
const { tag } = await req.json();
revalidateTag(tag);
return Response.json({ ok: true });
}
매 결정 기준
| 상황 | Approach |
|---|---|
| Static marketing | SSG / Astro |
| Blog with comments | SSG + CSR comments |
| News feed (changes hourly) | ISR (revalidate=3600) |
| Product page + cart | RSC + Client island for cart |
| Real-time dashboard | CSR + WebSocket |
| Geo-personalized | Edge SSR |
| Authenticated app | SSR with auth + RSC |
기본값: Next.js App Router (RSC default) + Suspense streaming + ISR for content. 매 client component 매 조심히.
🔗 Graph
- 부모: Large_Frontend_Projects · Web Performance
- 변형: CSR · SSR · SSG · ISR · RSC
- 응용: Astro · SvelteKit · Remix
- Adjacent: Streaming SSR · Edge Runtime · Hydration · Core Web Vitals Optimization (INP, LCP, CLS) · Islands Architecture
🤖 LLM 활용
언제: Rendering strategy 결정, Next.js / Nuxt / Astro setup, Core Web Vitals tuning. 언제 X: Pure native app, internal CLI, embedded device UI.
❌ 안티패턴
- CSR for SEO-critical content: 매 crawler 매 problem.
- SSR everywhere without caching: 매 server CPU 폭발 — ISR / cache 도입.
- Hydration mismatch: server HTML ≠ client render — 매 console error + flicker.
- Massive client bundle: 매 hydration TTI 늦어짐 — RSC / island 활용.
- No streaming: 매 slow API 매 entire page block — Suspense.
- Misuse of
"use client": 매 RSC tree 의 매 leaf 만 client.
🧪 검증 / 중복
- Verified (Next.js 15 docs, Vercel team blog, web.dev rendering guide 2025).
- 신뢰도 A.
🕓 Changelog
| 날짜 | 변경 |
|---|---|
| 2026-05-08 | Phase 1 |
| 2026-05-10 | Manual cleanup — RSC, streaming, ISR, edge runtime patterns |