Checklists

Nuxt implementation checklist

This checklist ensures your Nuxt application is optimized for performance, security, and scalability before deployment to production environments such as Vercel, Netlify, or self-hosted Docker containers.

Progress0 / 30 complete (0%)

Performance and Rendering

0/5
  • Enable Payload Extraction

    recommended

    Verify that 'experimental.payloadExtraction' is set to true in nuxt.config.ts to reduce the size of the initial HTML response.

  • Implement Nuxt Image

    critical

    Replace standard <img> tags with <NuxtImg> to enable automatic resizing, WebP conversion, and lazy loading.

  • Analyze Bundle Sizes

    recommended

    Run 'npx nuxi analyze' to identify large third-party dependencies and replace them with smaller alternatives or move them to server-only modules.

  • Configure Route Rules

    critical

    Define SWR (Stale-While-Revalidate) or ISR (Incremental Static Regeneration) rules in nuxt.config.ts for high-traffic dynamic pages.

  • Optimize Font Loading

    recommended

    Use @nuxtjs/google-fonts with 'download: true' to host fonts locally and prevent layout shifts (CLS).

Security and Environment

0/5
  • Validate Environment Variables

    critical

    Use a validation schema (e.g., Zod) within a nitro plugin to ensure all NUXT_PUBLIC_* and NUXT_PRIVATE_* variables are present at runtime.

  • Install Nuxt Security Module

    critical

    Configure 'nuxt-security' to automatically apply CSP headers, CORS policies, and Rate Limiting to server routes.

  • Sanitize Server Routes

    critical

    Verify that all /server/api routes use readBody() or getQuery() with input validation to prevent injection attacks.

  • Disable Production DevTools

    recommended

    Ensure 'devtools: { enabled: false }' is explicitly set or conditionally disabled for production builds.

  • Restrict Public Assets

    critical

    Audit the /public folder to ensure no sensitive configuration files, .env backups, or private keys are exposed.

Data Fetching and State

0/5
  • Unique useFetch Keys

    critical

    Ensure every manually keyed useFetch or useAsyncData call has a unique string key to prevent hydration mismatches during SSR.

  • Pinia Server-Side State

    critical

    Verify that Pinia stores are initialized within the setup function to prevent state cross-contamination between different user requests.

  • Handle Fetch Errors

    recommended

    Implement 'fatal: true' in createError calls within fetch blocks to force a redirect to the error page when critical data fails.

  • Lazy Loading Data

    optional

    Use useLazyFetch for non-critical UI components to prevent blocking the initial page navigation.

  • Cache API Responses

    recommended

    Use Nitro's 'useStorage' or 'defineCachedEventHandler' to cache expensive database queries or external API calls.

SEO and Meta Management

0/5
  • Dynamic Meta Tags

    critical

    Use useSeoMeta() in every page component to define unique titles, descriptions, and Open Graph images.

  • Sitemap Generation

    recommended

    Configure @nuxtjs/sitemap to automatically crawl routes and include dynamic slugs from your CMS or database.

  • Robots.txt Configuration

    recommended

    Add @nuxtjs/robots to prevent indexing of staging environments and private admin routes.

  • Canonical URL Implementation

    recommended

    Verify that useHead() includes a canonical link tag to prevent duplicate content penalties from search engines.

  • Structured Data

    optional

    Inject JSON-LD scripts using useHead for product, article, or organization schemas to improve rich snippet visibility.

Error Handling and Logging

0/5
  • Global Error Page

    critical

    Create a custom error.vue in the root directory to handle 404 and 500 errors with a user-friendly UI.

  • Sentry Integration

    recommended

    Configure Sentry or a similar observability tool to capture both client-side Vue errors and server-side Nitro errors.

  • Hydration Mismatch Audit

    critical

    Run the build in a staging environment and check the browser console for hydration mismatches that could break interactivity.

  • Structured Server Logs

    optional

    Ensure Nitro server logs are outputting in JSON format for easier ingestion by log management platforms like Datadog or Logtail.

  • Route Middleware Guards

    critical

    Verify that auth middleware correctly redirects unauthenticated users before the page component begins mounting.

Deployment and CI/CD

0/5
  • Nitro Preset Selection

    critical

    Explicitly set the 'NITRO_PRESET' environment variable (e.g., vercel, netlify, or node-server) to match your hosting provider.

  • Prisma/Drizzle Migration Check

    critical

    Include a database migration step in your CI/CD pipeline before the 'nuxt build' command executes.

  • Health Check Endpoint

    recommended

    Create a /server/api/health.ts route that returns a 200 status to allow load balancers to monitor instance readiness.

  • Brotli Compression

    recommended

    Ensure the hosting provider or reverse proxy (Nginx) is configured to serve .mjs and .css files with Brotli compression.

  • Source Map Generation

    optional

    Disable production source maps in nuxt.config.ts unless they are specifically required for your error reporting service.