Next.js for B2B SaaS: where it fits and where it doesn't

By Alvi Lika, Founder, Soatech

· · 5 min read

What Next.js does well for a multi-tenant B2B SaaS, how one production app (wintura.ai) actually uses it, and the cases where a different framework or a separate service is the better choice.

Next.js is a reasonable default for a B2B SaaS written in TypeScript. That isn't because it's the fastest or simplest framework. It's because one codebase can hold the marketing pages, the application and the HTTP endpoints that payment providers and schedulers call. This article explains what that buys you, how one production app uses it in practice, and where it's the wrong tool.

The example throughout is wintura.ai, which runs on Next.js 16 (App Router) with React 19 and the React Compiler enabled. Details come from its codebase.

How a real SaaS uses Next.js (not how tutorials do)

Tutorials tend to show a Next.js app made almost entirely of Server Components and Server Actions. Wintura's codebase looks different, for reasons that apply to most B2B products.

The server surface is mostly Route Handlers. Wintura has over a hundred route.ts handlers and uses Server Actions mainly for sign-in. That's not a mistake. Much of a SaaS backend is called by things that aren't your own forms: Stripe webhooks, scheduled jobs (Vercel Cron entries in vercel.json that hit /api/cron/*), public share links, and an interactive editor that fetches and saves data from the client. Route Handlers give those callers a stable URL and an explicit request and response. Server Actions fit best when a server-rendered form submits to your own server.

Many components are client components. A proposal editor (TipTap) and a drag-and-drop pipeline board (dnd-kit) are interactive by nature, and more than half of Wintura's .tsx files start with "use client". In an app built around an editor, Server Components reduce JavaScript on the surrounding pages, not in the editor itself. Expect a smaller bundle saving than a content-heavy site would get.

The pages that benefit most are the public ones. Wintura's decision log records pre-rendering its industry and comparison pages (/for/[slug], /vs/[slug]) at build time with generateStaticParams. Those pages are indexable HTML at no server cost, in the same repository as the app.

Long work runs with explicit limits or somewhere else. The AI generation route declares export const maxDuration = 300. Vercel's current default is 300 seconds with fluid compute, configurable up to 800 seconds on Pro (Vercel docs). PDF rendering runs in a separate Puppeteer service rather than inside a function.

Why it fits a B2B SaaS

  • One deployable for three jobs. Marketing pages, the authenticated app and the webhook and cron endpoints share types, auth helpers and data access code.
  • Static and dynamic in one app. Search-facing pages can be pre-rendered while the dashboard renders per request.
  • The React ecosystem. Editors, drag and drop, Stripe's React SDK and headless component primitives are all available as maintained packages. Wintura uses each of those categories.
  • Security headers in one place. Wintura sets its Content-Security-Policy, HSTS and related headers in next.config.ts, applied to every route.

Where Next.js is the wrong choice

  1. A content site with no application. A static site generator such as Astro, or plain HTML, is simpler and ships less.
  2. An existing backend in another language. If the API already lives in Python, Go or Rails, a Vite single-page app talking to that API avoids a second server runtime and duplicated session handling.
  3. Long-running or stateful work as the core of the product. Queues, streaming pipelines, heavy background processing or many persistent connections belong in dedicated workers. Next.js can trigger them, but shouldn't host them.
  4. A team that can't keep up with the framework. Next.js has a large surface area (several rendering modes, caching layers, a proxy layer, Server Functions), and it ships security fixes often. Its published security advisories for 2026 include several rated critical. Pinning an exact version is only safe if someone reads the advisories and upgrades promptly. If nobody owns that job, the framework's breadth becomes a liability.
  5. Self-hosting at scale without preparation. Next.js runs on a Node.js server or in Docker (self-hosting guide). With several instances, you have to provide a shared cache handler, a consistent Server Functions encryption key and a deployment ID yourself. That's fine, but it's real work, and it's easy to miss if you're used to a managed platform.

The alternatives, briefly

  • React Router v7 (framework mode). The successor to Remix v2 (Remix announcement). Loaders and actions work much like web forms. It's a good fit if you prefer request/response patterns to Server Components.
  • SvelteKit. A smaller runtime and a pleasant authoring experience. The trade-off is a smaller component ecosystem than React's, which matters for editor- and widget-heavy apps.
  • Vite + React with a separate API. The most control and the most to assemble yourself: routing, data loading, auth and deployment.

None of these is wrong for a SaaS. The choice should follow from the product's needs: how much of it is public content versus interactive app, where the backend lives, and who will maintain the framework.

Questions to ask whoever proposes your stack

  1. Why this framework for this product, and what would make you choose differently?
  2. Which parts will be server-rendered, which interactive, and which run as separate services?
  3. How will security releases be tracked and applied, and by whom?
  4. Where will it be deployed, and what changes if you move it?
  5. Can you show a running product built this way?

For the decisions behind the rest of Wintura's stack, see five stack decisions from the Wintura build.

See the full build these notes come from.

Read the Wintura case study

Working on a feature this article touches? A 30-minute call is the quickest way to scope it.

Discuss your project