Web Framework Deep Dive

Nuxt

The Vue meta-framework. File-based routing, auto-imports, server engine, SSR / SSG / hybrid — everything you need to ship a Vue app to production.

VueFull-stackSSR / SSG / HybridAuto-importsNitro Server
← Back to Client Side
Quick Facts

At a Glance

Built on
Vue + Vite + Nitro
Created
2016 · Sébastien Chopin
Routing
File-based (pages/)
Server
Nitro — runs on Node, Deno, Workers, Lambda, edge
Latest
Nuxt 3.x (Nuxt 4 in flight)

Basic Concepts

  • File-based routes: a file at pages/products.vue becomes /products.
  • Auto-imports: Vue APIs, components, and composables are imported automatically — zero ceremony.
  • Server routes live in server/api/ and run on the Nitro engine.
  • Hybrid rendering: mix SSR, SSG, ISR per route via routeRules.
  • Modules extend Nuxt — auth, content, image, sitemap, i18n — with one line in config.
Syntax

Taste of Nuxt

<script setup>
// Auto-imported: useFetch, useState, definePageMeta, etc.
const { data: products, pending } = await useFetch('/api/products');

definePageMeta({ title: 'Products' });
</script>

<template>
  <p v-if="pending">Loading…</p>
  <ul v-else>
    <li v-for="p in products" :key="p.id">
      {{ p.name }} — \${{ p.price }}
    </li>
  </ul>
</template>

// server/api/products.ts
export default defineEventHandler(async () => {
  return await db.products.findMany();
});
Mechanics

Key Features

Nitro Server Engine

Nuxt's universal server runtime. The same code deploys to Node, Cloudflare Workers, Vercel Edge, AWS Lambda, Netlify, Deno Deploy, Bun — pick your target with one config flag.

useFetch / useAsyncData

SSR-aware data fetching composables — runs on the server during the initial render, then stays in sync on the client. Built-in caching, deduplication, and refresh.

Hybrid Rendering & Route Rules
routeRules: {
  '/':        { prerender: true },          // SSG
  '/blog/**': { isr: 3600 },              // ISR
  '/admin/**':{ ssr: false },             // SPA
  '/api/**':  { cors: true },             // API
}
Modules Ecosystem
ModulePurpose
@nuxtjs/tailwindcssTailwind, zero config.
@nuxt/imageOptimized images / responsive sizes.
@nuxt/contentMarkdown / MDC content as a database.
@nuxtjs/i18nRouting-aware internationalization.
@sidebase/nuxt-authAuth.js integration.
@pinia/nuxtPinia state management.
Trade-offs

Strengths & Weaknesses

Strengths
  • Vue's productivity + production-ready meta-framework.
  • Auto-imports remove a ton of boilerplate.
  • Same code deploys to Node, Workers, Lambda, edge.
  • Vibrant module ecosystem.
Weaknesses
  • Smaller ecosystem & community than Next.js.
  • Magic auto-imports can confuse newcomers tracing definitions.
  • Major upgrades (Nuxt 2 → 3) were a big jump.
Where It Shines

Sweet Spots

Marketing & Content Sites

Nuxt Content + SSG = a Markdown-driven CMS in minutes.

SaaS Apps

Hybrid rendering for marketing + dashboard in one codebase.

Edge-First Apps

Deploy to Cloudflare Workers / Vercel Edge for global latency.

Vue Teams Going Full-Stack

The natural progression from a Vite + Vue SPA.

Continue

Other Web Frameworks