--- name: meta-frameworks-overview description: Explains meta-frameworks like Next.js, Nuxt, SvelteKit, Remix, Astro, and their architectural patterns. Use when comparing frameworks, choosing a framework for a project, or understanding what features meta-frameworks provide beyond base UI libraries. --- # Meta-Frameworks Overview ## What is a Meta-Framework? A meta-framework builds on top of a UI library (React, Vue, Svelte) to provide: ``` UI Library (React, Vue, Svelte) ↓ adds Meta-Framework Features: ├── File-based routing ├── Server-side rendering (SSR) ├── Static site generation (SSG) ├── API routes / backend integration ├── Code splitting & bundling ├── Image optimization ├── Deployment optimizations └── Full-stack capabilities ``` ## Why Meta-Frameworks? ### Without a Meta-Framework (Manual Setup) ``` Create React App ├── Configure Webpack/Vite ├── Set up React Router ├── Configure SSR manually (complex) ├── Set up Express/Node server ├── Configure code splitting ├── Set up environment variables ├── Configure production build └── Handle deployment ``` ### With a Meta-Framework ``` npx create-next-app / npm create astro ├── Routing: ✓ automatic ├── SSR/SSG: ✓ built-in ├── API routes: ✓ included ├── Bundling: ✓ optimized ├── Deployment: ✓ streamlined └── Start building: ✓ immediately ``` ## Framework Comparison Matrix | Framework | UI Library | Rendering | Philosophy | |-----------|------------|-----------|------------| | **Next.js** | React | SSR, SSG, ISR, CSR | Full-stack React | | **Remix** | React | SSR, progressive enhancement | Web standards, forms | | **Nuxt** | Vue | SSR, SSG, ISR | Full-stack Vue | | **SvelteKit** | Svelte | SSR, SSG, CSR | Compiler-first | | **Astro** | Any (React, Vue, Svelte, etc.) | SSG, SSR, Islands | Content-first, minimal JS | | **Solid Start** | Solid | SSR, SSG | Fine-grained reactivity | | **Qwik City** | Qwik | Resumable | Zero hydration | ## Next.js **Full-stack React framework by Vercel.** ### Key Features - **App Router** (new): React Server Components, nested layouts - **Pages Router** (legacy): Traditional file-based routing - **Rendering options:** SSG, SSR, ISR, CSR per route - **API Routes:** Backend endpoints within the same project - **Image/Font optimization:** Built-in components ### Routing Model ``` app/ ├── page.tsx → / ├── about/page.tsx → /about ├── blog/ │ ├── page.tsx → /blog │ └── [slug]/page.tsx → /blog/:slug └── api/ └── route.ts → API endpoint ``` ### Rendering Decision ```tsx // Static (default - SSG) export default function Page() { return