Frontend

Next.js

A React framework that adds server-side rendering, static generation, routing and server-side code to React applications.

What Next.js is

Next.js is an open-source framework built on React. It provides file-based routing, server-side rendering, static site generation and the ability to run server code alongside the UI, which makes it suitable for both public websites and full web applications.

What it solves

  • Poor SEO and slow first load of purely client-rendered React apps
  • Combining marketing pages and the logged-in application in one codebase
  • Boilerplate setup for routing, bundling and code splitting
  • Simple backend endpoints without a separate service for small use cases

When it makes sense

  • Public-facing products where search visibility and first-load speed matter
  • SaaS products that combine a marketing site, documentation and an application
  • E-commerce storefronts and content-heavy pages with dynamic data
  • Teams already using React who want sensible defaults instead of custom setup

Strengths

  • Multiple rendering strategies (static, server-rendered, client-side) per page
  • Built on React, so the React ecosystem and hiring pool apply
  • Good developer experience with routing, image optimization and bundling included
  • Can be deployed to managed platforms or self-hosted as a Node.js service or container

Limitations

  • Server rendering adds a Node.js runtime to operate, monitor and scale
  • Framework conventions change between major releases and can require migration work
  • Mixing server and client code increases complexity and the risk of leaking server-only logic
  • Built-in API routes are not a substitute for a well-structured backend in larger systems

Alternatives, and when they are better

  • React (single-page app)

    A plain client-rendered React app is simpler and cheaper to host when the product is entirely behind a login, SEO does not matter and there is already a separate backend.

  • Nuxt (Vue.js)

    If the team prefers Vue, Nuxt provides comparable server rendering and routing capabilities in the Vue ecosystem.

  • Astro

    For mostly static, content-focused sites with little interactivity, Astro can ship less JavaScript and be simpler to maintain.

Practical examples

  • An e-commerce storefront with server-rendered product pages and a client-side cart
  • A SaaS product with a public marketing site, pricing pages and a logged-in dashboard in one codebase
  • A marketplace with indexable listing pages and authenticated seller tools

How it fits into the product architecture

Next.js covers the presentation layer and can act as a thin backend-for-frontend that aggregates calls to core APIs. Business logic, background processing and data ownership usually stay in dedicated backend services. In production it runs either on a managed platform or as a containerized Node.js service behind a CDN, which means caching rules, environment configuration and server monitoring become part of the frontend’s operational responsibility.

Next step

Choosing a stack for a new product?

We start from requirements, costs of ownership and the team you will have, then recommend technology with the reasons written down.