Next.js Development

Next.js Apps With Rendering and Caching Decided on Purpose

Next.js is my default for React projects that need both search visibility and app-like interactivity, and I've used it to ship production SaaS front ends and marketing sites. Its strength is in per-route choices: what renders on the server, what gets cached, and what runs in the browser. Get those wrong and you get stale pages, slow builds or a bloated bundle; get them right and the framework does a lot of the work for you.

What is Next.js development?

Next.js is an open-source React framework, maintained by Vercel, that adds server rendering, static generation, file-based routing, data caching and build optimisation to React. Next.js development means designing an application's routes, rendering modes and data-fetching strategy around those features, today usually with the App Router and React Server Components.

Who it's for

  • SaaS teams that want the marketing site and product UI on one React stack
  • Content and e-commerce sites where organic search traffic matters
  • Teams on a client-only React app struggling with SEO or first-load speed
  • Projects on the Pages Router deciding whether and how to move to the App Router

Problems it solves

  • Pages arrive empty for crawlers until JavaScript runs
  • Content edits need a full rebuild and redeploy to appear
  • The JavaScript bundle keeps growing and interactions feel sluggish on phones
  • Some data is stale while other data is refetched constantly, because caching was never designed
Scope

What can be delivered

  • App Router architecture

    Route groups, nested layouts, loading and error boundaries, and a clear split between Server and Client Components.

  • Rendering strategy per route

    Static, incrementally regenerated or dynamic rendering chosen for each route according to how often its data changes.

  • Caching and revalidation

    Tag- or path-based revalidation wired to CMS webhooks or database writes, so pages update without a rebuild.

  • Search foundations

    Metadata API, canonical URLs, generated sitemaps and robots rules, Open Graph images and JSON-LD in server-rendered HTML.

  • Performance tuning

    next/image, next/font, script loading strategies and bundle analysis focused on Core Web Vitals from real devices.

  • Pages Router migration

    A route-by-route move into the App Router, which can run alongside the Pages Router in the same app during the transition.

Technical approach

Choosing a rendering mode per route

Rendering is decided route by route. Static generation suits pages that are the same for everyone and rarely change. Incremental Static Regeneration serves a cached page and rebuilds it after an interval or on demand, which suits articles and product pages. Dynamic rendering is for pages that depend on the request, such as cookies, headers or search params. Client-side rendering still has a place inside signed-in dashboards where SEO doesn't matter.

Rendering modes in the App Router
ModeWhen the HTML is producedGood for
Static (SSG)At build timeMarketing pages, docs, legal pages
ISRAt build or first request, then regenerated on a timer or on demandBlog posts, product and category pages
Dynamic (SSR)On every requestPersonalised or request-dependent pages
Client-renderedIn the browser after loadHighly interactive views behind a login

Server Components and the client boundary

React Server Components run only on the server, so data access, secrets and heavy libraries stay out of the browser bundle. I keep "use client" as far down the tree as possible, wrapping just the interactive pieces, and stream slower sections with Suspense so the rest of the page isn't held up. Server Actions are convenient for forms and mutations, but each one is a publicly reachable endpoint and needs the same validation and authorisation as any API route. I go deeper on these patterns in Next.js App Router patterns.

Caching, metadata and crawlable output

Caching defaults have shifted between major versions; since Next.js 15, fetch requests and GET route handlers are no longer cached by default. So I state caching intent explicitly for each data source and call revalidateTag or revalidatePath after writes, letting a CMS publish or price change refresh only the affected pages.

For search, generateMetadata produces titles, descriptions, canonicals and Open Graph tags on the server, sitemap.ts and robots.ts build those files from the same data as the pages, and JSON-LD ships in the initial HTML. next/image handles responsive sizes and lazy loading, and next/font self-hosts fonts with fallback metrics that reduce layout shift.

Technology

Technologies for Next.js Development

Framework

  • Next.js
  • React
  • TypeScript

Rendering

  • React Server Components
  • Server Actions
  • SSR · ISR · SSG
  • Suspense streaming

Data

  • React Query
  • Prisma
  • PostgreSQL
  • MongoDB

UI

  • Tailwind CSS
  • shadcn/ui
  • Radix UI
  • Framer Motion

Hosting and delivery

  • Vercel
  • GCP Cloud Run
  • Docker
  • GitHub Actions
Process

How the work runs

  1. 01

    Inventory routes and data sources

    List every route, who sees it, where its data comes from and how often that data changes.

  2. 02

    Write the rendering and caching plan

    Assign each route a rendering mode and each data source a cache lifetime and revalidation trigger, before building screens.

  3. 03

    Build with preview deployments

    Each pull request gets a preview URL, and working features are demoed weekly so feedback lands early.

  4. 04

    Measure and tune

    Bundle analysis, Lighthouse in CI and field Core Web Vitals after launch, with fixes targeted at the slowest templates.

  5. 05

    Launch and hand over

    Production deployment, monitoring, and documentation of the caching rules so the next developer doesn't guess.

Trade-offs

Decisions worth making early

  • Hosting shapes the setup

    Vercel supports every Next.js feature with little configuration. Self-hosting on Cloud Run or another container platform works well too, but image optimisation, a shared ISR cache across instances and CDN behaviour need explicit setup.

  • Not every app needs Next.js

    A dashboard behind a login with no SEO needs can be a plain React single-page app built with Vite, which is simpler to host. Custom web applications sometimes take that route.

  • The framework moves quickly

    Major versions change defaults and APIs. Pin versions, read the upgrade guides, use the official codemods and keep test coverage on critical routes so upgrades stay routine.

  • Watch for Client Component creep

    One "use client" near the top of a tree turns everything below it into client code. Code review should catch it before the bundle grows. Heavier business logic often belongs in a separate Node.js backend rather than in route handlers.

Related work

Projects involving this work

From my portfolio. Descriptions are the same as on the projects page.

  • Instantly.ai preview

    Web

    Instantly.ai

    B2B CRM for cold-email outreach with AI-powered personalization, deliverability and warm-up. Built core CRM modules, AI prompt tooling and real-time updates.

    • Next.js
    • NestJS
    • OpenAI
    • WebSockets
    • Postgres
    View product
  • Publishing.ai preview

    Web

    Publishing.ai

    Generative-AI self-publishing platform that helps authors draft, refine and market full manuscripts end-to-end.

    • Next.js
    • Node
    • OpenAI
    • GCP
    View product
  • Virtual Show Room preview

    Web

    Virtual Show Room

    Interactive digital showroom for automotive and retail brands, bridging physical and online retail experiences.

    • Next.js
    • Node
    • GCP
    View product
  • All projects
Further reading

Related articles

Related services
  • Web Development

    Custom Web Applications

    Browser-based software built around your workflow: dashboards, portals and real-time tools with proper access control, state handling and tests.

  • Web Development

    Node.js Development

    Node.js backends in NestJS, Express or Fastify, built for I/O-heavy workloads with queues, real-time channels and proper observability.

  • Web Development

    WordPress Development

    WordPress sites built with block themes and custom blocks, careful plugin choices, caching and security upkeep, or as a headless CMS behind Next.js.

  • Custom Software

    SaaS Development

    Multi-tenant SaaS products with subscription billing, roles and permissions, designed to stay maintainable as customers and features grow.

FAQs

Use the App Router for new projects. It is where Next.js development is focused and it supports Server Components, streaming, nested layouts and the Metadata API. The Pages Router is still supported, so an existing app doesn't need an urgent rewrite, and both routers can coexist while you migrate route by route.