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>
5.4 KiB
5.4 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-single-page-applications-spa | Single Page Applications (SPA) | 10_Wiki/Topics | verified | self |
|
none | A | 0.9 | applied |
|
2026-05-10 | pending |
|
Single Page Applications (SPA)
매 한 줄
"매 한 HTML 의 모든 view 의 client-side 의 render". SPA 매 initial load 후 server-fetch 의 X 의 navigation — 매 data-only API call. 2026 매 SPA-only 의 declining trend — 매 SSR/RSC hybrid (Next.js 15, Remix, Astro Islands) 의 mainstream.
매 핵심
매 핵심 Architecture
- 매 single
index.htmlshell. - 매 JS bundle 의 view rendering (React / Vue / Svelte).
- Client-side routing (History API).
- 매 API 의 JSON fetch — REST / GraphQL / tRPC.
매 Pros
- 매 fluid navigation — 매 page reload X.
- 매 rich interactivity.
- 매 backend / frontend 분리 — 매 separate deploy.
매 Cons
- Initial bundle size — 매 large.
- SEO 의 challenge — 매 crawler 의 JS execution 의존.
- TTI (Time to Interactive) 의 slow.
- 매 JS-disabled / network-fail 의 blank screen.
매 vs MPA / SSR / SSG
- MPA: server 의 매 page-by-page render.
- SSR: 매 first render 의 server, 매 hydrate 후 SPA-like.
- SSG: 매 build-time 의 pre-render — 매 static deploy.
- RSC (React Server Components): 매 server/client 의 component-level mix.
매 2026 trend
- 매 pure SPA 의 niche (admin panel, internal tool).
- Next.js / Remix / SvelteKit 의 hybrid 의 default.
- Astro Islands — 매 partial hydration.
- 매 streaming SSR + Suspense — 매 perceived perf 개선.
💻 패턴
React Router v7 — 매 client-side routing
import { createBrowserRouter, RouterProvider } from "react-router";
const router = createBrowserRouter([
{ path: "/", element: <Home /> },
{ path: "/posts/:id", element: <Post />, loader: postLoader },
{ path: "*", element: <NotFound /> },
]);
export default function App() {
return <RouterProvider router={router} />;
}
History API — manual SPA navigation
function navigate(url: string) {
history.pushState({}, "", url);
render(); // re-render based on location.pathname
}
window.addEventListener("popstate", render);
Code splitting — 매 route-level lazy
import { lazy, Suspense } from "react";
const Dashboard = lazy(() => import("./Dashboard"));
<Suspense fallback={<Spinner />}>
<Dashboard />
</Suspense>
Data fetching — TanStack Query
import { useQuery } from "@tanstack/react-query";
function Post({ id }: { id: string }) {
const { data, isLoading } = useQuery({
queryKey: ["post", id],
queryFn: () => fetch(`/api/posts/${id}`).then(r => r.json()),
staleTime: 60_000,
});
if (isLoading) return <Skeleton />;
return <Article {...data} />;
}
Vite — SPA build
// vite.config.ts
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
export default defineConfig({
plugins: [react()],
build: {
rollupOptions: {
output: {
manualChunks: {
vendor: ["react", "react-dom"],
ui: ["@radix-ui/react-dialog"],
},
},
},
},
});
SPA fallback — server config (nginx)
location / {
try_files $uri $uri/ /index.html;
}
Skeleton + optimistic UI
const mutation = useMutation({
mutationFn: postComment,
onMutate: async (newComment) => {
await queryClient.cancelQueries({ queryKey: ["comments"] });
const prev = queryClient.getQueryData(["comments"]);
queryClient.setQueryData(["comments"], (old: any) => [...old, newComment]);
return { prev };
},
onError: (_, __, ctx) => queryClient.setQueryData(["comments"], ctx.prev),
});
매 결정 기준
| 상황 | Approach |
|---|---|
| Public marketing site | SSG (Astro / Next static) — 매 SPA X. |
| Content blog | SSG / ISR. |
| SaaS dashboard (auth-walled) | SPA OK — 매 SEO 의 X 필요. |
| E-commerce | SSR/RSC — 매 SEO + perceived perf. |
| Internal admin tool | SPA — Vite + React Router. |
| Rich realtime app | SPA + WebSocket. |
기본값: 매 새 project 의 Next.js / Remix / SvelteKit (hybrid). 매 pure SPA 의 internal tool 만.
🔗 Graph
- 부모: Web Architecture
- 변형: MPA · SSR · SSG · Islands Architecture
- 응용: SvelteKit
- Adjacent: Code Splitting · Hydration · Service Worker
🤖 LLM 활용
언제: 매 auth-walled rich app — admin, dashboard, realtime collaborative tool. 언제 X: 매 SEO-critical / content-heavy site — 매 SSR/SSG 의 사용.
❌ 안티패턴
- 매 SEO-critical site 의 pure SPA: 매 crawler 문제 → SSR/SSG.
- 매 huge initial bundle (no code-split): TTI 악화.
- 매 in-memory routing 의 history API X: 매 back-button 의 X.
- 매 server fallback (try_files) 의 X: 매 deep-link refresh 의 404.
- 매 every state 의 Redux: 매 over-engineering — TanStack Query + local useState.
🧪 검증 / 중복
- Verified (MDN Web Docs, React Router v7 docs).
- 신뢰도 A.
🕓 Changelog
| 날짜 | 변경 |
|---|---|
| 2026-05-08 | Phase 1 |
| 2026-05-10 | Manual cleanup — SPA arch + 2026 hybrid trend 정리 |