Next Best Practices

Next.js best practices: file conventions, RSC boundaries, data patterns, async APIs…

A working reference of Next.js best practices covering file conventions, React Server Component boundaries, async APIs, data patterns, metadata, error handling, and image and font optimization. It enforces the disciplines that actually matter in production: keeping the use-client boundary at the leaf, awaiting async params, generating metadata from a single source, and never shipping a route without its loading, error, and not-found states.

$15 one-time
Add to a kit →

Prices include 20% VAT. · Forged on real agency work · one-time, no lock-in

  • Type Skill
  • Category Development
  • Delivery Email · instant
  • License One-time
Run preview
forgehouse, next-best-practices

Inside the run · no black box

See the actual work before you buy it.

Misplace a special file in Next.js and it fails silently, not loudly. That is why this review starts at file conventions and works down to an explicit cache strategy on every fetch.

  1. Audits file conventions first: special files in the right places, route segments and groups correct, and the v16 rename respected (middleware becomes proxy), because a misplaced file fails silently rather than loudly.
  2. Enforces server/client boundary discipline with the wrapper pattern: 'use client' spreads upward through imports, so interactive pieces are isolated at the leaves while pages, grids and lists stay server-rendered and ship no JS.
  3. Migrates async APIs for Next.js 15+: params, searchParams, cookies() and headers() are all Promises now, so every page, layout and generateMetadata gets the await, and waterfalls get collapsed into Promise.all.
  4. Requires the failure-mode trio on every route: loading.tsx skeleton, error.tsx with a reset/retry, not-found.tsx with a way forward. A network failure showing a blank page is treated as a release blocker.
  5. Keeps metadata in one source of truth: generateMetadata produces title, description, OG, canonical and alternates; manual meta tags in page bodies are banned, sitemap.ts and robots.ts live in code.
  6. Closes on the verification checklist: Zod validation inside Server Actions, next/image with sizes and priority on the LCP element, NEXT_PUBLIC_ prefix rules, and an explicit cache strategy (force-cache, no-store or revalidate) on every fetch.
Use cases · what happens when you plug it in

One power source. 6 lines out.

next-best-practices · core

core active · 6 lines

  1. Keeping the use-client boundary small to shrink the JS bundle

    ✓ keeping the use-client b…
  2. Migrating to async params and searchParams on Next.js 15 and up

    ✓ migrating to async params
  3. Generating SEO metadata, sitemap, and robots from one source

    ✓ generating seo metadata
  4. Avoiding data-fetch waterfalls with parallel Promise.all

    ✓ avoiding data-fetch wate…
  5. Adding error, loading, and not-found states to every route

    ✓ adding error, loading, and
  6. Optimizing images and fonts for Core Web Vitals

    ✓ optimizing images and fo…
Benefits · what you walk away with

Yours to keep.

Drag time forward. Watch what stays.

Forever

That's what owning means.

The rented stack

ai writing tool: subscription

expired · access lost

analytics suite: subscription

expired · access lost

design platform: subscription

expired · access lost

(nothing left)

Your forge

  1. Cut client JavaScript by isolating interactivity at the leaf

    license: perpetual
  2. Catch breaking changes at build time instead of in production

    license: perpetual
  3. Rank better with single-source dynamic metadata and OG images

    license: perpetual
  4. Eliminate blank pages with mandatory failure-state coverage

    license: perpetual

subscriptions expire · deeds don't

What's included · the full manifest

Everything in the box.

Pick a piece up. Watch it work.

Server and client boundary wrapper pattern with right and wrong examples

part 01 of 06 · in the box

6 parts · one working system · ships instantly by email

Who it's for

This wasn't forged for everyone.

  • Not for you if you'd rather rent a tool than own one.
  • Not for you if you want someone else to run your stack.
  • Not for you if you're happy guessing.
Still here? Good.

For Next.js developers who want App Router code that is fast, SEO-correct, and production-safe without learning every pitfall the hard way.

then this was forged for you.

Works with

Universal by design: these run in any AI. Delivered in the open Agent Skills + MCP format (native in Claude); ChatGPT, Gemini, Cursor and Copilot adapt the same files their own way.

  • Claude Native format
  • ChatGPT Adapts via open standards
  • Gemini Adapts via open standards
  • Cursor Adapts via open standards
  • Copilot Adapts via open standards
Questions · still in the air

Catch what's on your mind.

the air is clear. nothing between you and the forge.
catch a spark: the forge will answer

  1. We're still on the Pages Router. Is this reference relevant to us?

    Only partially. The image, font, and metadata fundamentals carry over, but the core disciplines, RSC boundary placement, async params migration, and the route-level loading/error/not-found convention, all assume the App Router. It's most valuable while or after you switch.

  2. What's the concrete discipline that actually shrinks my JS bundle?

    Keeping the use-client boundary at the leaf: interactive bits get isolated into the smallest possible client component while everything above stays on the server. The reference shows the wrapper pattern with right and wrong examples, because the common mistake is marking a whole page client for one button.

  3. Does it scan my existing codebase and flag violations automatically?

    No. It's a working reference plus an eight-point validation checklist you apply during review, not a lint rule or scanner. You bring the discipline of running the checklist; it brings the list of what actually matters in production.

  4. How is it delivered?

    By email right after purchase: ready to run, downloaded instantly, no setup wait.

  5. One-time or subscription?

    A one-time purchase; no subscription or hidden fees. VAT (20%) is included.

  6. Can I get a refund?

    As a digital product, it can’t be refunded once downloaded. That’s why we show exactly what’s inside and who it’s for, right here.