Skip to main content
PandaCodeGen
Back to Insights

Next.js and CMS architecture

Next.js and Sanity: Fit, Cost and Tradeoffs

Next.js builds the website your visitors see. Sanity is where your team writes and stores the content. The two work well together for custom, content-heavy sites, but this is not the right setup for every business. Pick it because your requirements call for it, not because it is popular.

Assessed July 24, 2026 against current Sanity, Next.js and Google documentation. Pricing rechecked July 31, 2026.

Hassan Jamal·July 23, 2026·11 min read

The decision in one minute

  • Use both when you need a custom-built site and a real editing workflow for your team. You are running two systems, so there should be a reason.
  • Before you pick a CMS, check: how content is structured, whether editors can preview changes, whether it handles other languages, who can edit what, how easily you can get your content out, what it costs, and who can support it.
  • Next.js can send finished HTML to browsers and crawlers. Whether the site is actually fast, crawlable, accessible and secure still comes down to how it is built.
  • If your site is small and rarely changes, you may not need a headless CMS at all.

Sanity

Where your content lives, and where your team writes and edits it.

Next.js

The site itself: the pages, how they load, and how they connect to everything else.

Operations

The running side: keeping it fast, backed up and monitored, and who fixes it when it breaks.

What the integration currently provides

Sanity's current Next.js documentation describes an official next-sanity toolkit for App Router and Pages Router patterns. It covers server-side content queries, Next.js caching, Draft Mode, live content, webhook validation, Portable Text and visual editing. The frontend and content system remain separate products with separate configuration and failure modes.

Visual editing lets an editor click text on the page and land on the right field in Sanity Studio, and see draft changes in a preview before publishing. You have to get several things right for that to work: the project ID, the dataset, the tokens, which origins are allowed, the preview URLs, and keeping staging separate from live. Give the draft credentials the least access they need, and never expose them as public environment variables.

Rendering does not inherit a performance score

Next.js gives you server and client components, static and dynamic pages, caching and streaming. Those are useful tools for getting crawlable output and staying inside a performance budget. They do not make every page fast on their own. What still slows a page down: your queries, how you handle caching, images, fonts, the JavaScript you ship to the browser, and any third-party scripts your visitors have consented to.

No framework outcome guarantee

A Next.js and Sanity build does not guarantee 90-plus Lighthouse, rankings or AI citations. When a 90-plus target is accepted, PandaCodeGen names representative pages, mobile and desktop profiles and three recorded passing runs per page and profile in the signed terms.

What 25 document types looks like in practice

Panda Patches runs on this stack. Its Sanity Studio carries 25 registered document types, covering products, blog posts, FAQs, location pages, patch styles and company facts, among others. That number is the honest answer to “how much modeling is this?” A brochure site does not need 25. A catalog with categories, guides and reusable company facts gets there faster than most people expect, and every one of those types is a decision someone has to make before an editor can touch it. Disclosure: Panda Patches is owned and operated by Imran Raza Ladhani, a PandaCodeGen co-founder. PandaCodeGen built and maintains its platform and holds no ownership stake, so treat this as operating experience rather than an independent client reference.

How those numbers are gathered, and how lab runs differ from field data, is covered in Core Web Vitals explained. Building the frontend to a budget rather than to a framework default is the work described on our custom engineering service page.

Why do people say they are moving away from Next.js?

Because it asks you to hold more decisions than a framework used to, and for some teams that trade is a bad one. The complaints that recur are consistent and worth taking seriously: caching behavior that changes between major versions and has to be relearned, a rendering model with enough options that two developers on one project can disagree about which to use, and a gravitational pull toward one hosting provider that is convenient until you want to leave. None of those makes it a bad choice. They make it a choice with an ongoing attention cost, and a team that wants a framework to be settled rather than evolving will feel that cost every upgrade.

Where that lands for this stack specifically: if your site is content-led and someone will own the upgrades, the flexibility is the reason you are here and the cost is fair. If nobody will own them, you are buying a system that decays quietly, and a simpler setup will serve you longer with less. That is the same judgement the section on when a simpler stack is better makes, and it is worth making before the build rather than at the first major version bump.

A build you can open and check

Ladies 4 Jesus went live on this stack and is public, so nothing below has to be taken on trust. It runs Next.js 16.2.7 on the App Router with React 19.2 and Tailwind v4, with Sanity v6 as the CMS and Vercel for hosting. The content model is nine schemas: two singletons for site settings and one page, and seven document types for devotionals, testimonies, questions, generic pages, comments, contact messages and content reports.

Two decisions in it are the ones this article has been describing, and they are worth seeing in a real project. The Studio is embedded in the application at /studio rather than deployed separately, which means schema changes ship with an ordinary git push and there is no second deploy step to forget. And content edits reach the live site in about sixty seconds through revalidation, with no code deploy at all. A non-technical administrator runs the site day to day without a developer in the loop. That is the whole argument for this pairing, and it either works in practice or it does not.

There are two live records of it working, and they are worth reading against each other because their disclosure status differs. Ladies 4 Jesus is an independent client: a migration onto this exact pairing where the deciding requirement was that the owner run everything herself, and where nine content types and five moderated submission paths are managed from the embedded Studio without a developer. Panda Patches is the same stack under commerce load, and it is founder-affiliated rather than independent. That makes it operating experience, labelled as such. Read the independent record first if what you are assessing is whether this holds for someone who is not us.

The moderation model is worth noting because it is a content-modeling decision rather than a feature. Five of the seven document types are user-submitted (testimonies, questions, comments, messages and reports) and each carries a status field, so nothing a visitor submits is publicly readable until it is approved in the Studio. That is enforced in the queries rather than by a plugin, which is the difference between a workflow and a setting.

What we measured, and what it does not prove

Loaded on August 2, 2026 in headless Chromium 150, one unthrottled run from a single location: time to first byte (TTFB) 81 ms, 65 requests, 629 KB transferred in total. Of that, 273 KB is CSS and fonts and 216 KB is JavaScript, which is the honest weak spot. The typography choices on a design-led site cost real bytes, and we are not going to present that as a performance win. One lab run from one machine is not what visitors experience, and this figure is a starting point for the site's own field data rather than a score.

Two things it does not yet demonstrate, stated so the example is not read as more than it is. The site launched recently, so there is no traffic, ranking or conversion history to report and we will not invent one. And its structured data is currently Organization and WebSite only, so the article-level schema this site argues for elsewhere is not yet on it. Both are checkable today by anyone who opens the page source.

Content modeling and editorial fit

Model reusable business concepts rather than treating every page as an unstructured canvas, and put the rules in the schema itself. Structured content improves consistency and reuse, but an overly abstract model slows editors down, and a page builder can be the better answer when visual composition changes frequently. Fit depends on the operating team, not on a CMS leaderboard.

  • Model reusable business concepts such as services, locations, people, evidence and articles instead of treating every page as an unstructured canvas.
  • Prototype the jobs your editors really do: writing a piece, getting it reviewed, previewing it, scheduling it, translating it, and taking it down.
  • Put the rules in the schema itself: what has to be filled in, how documents reference each other, who owns the slug, how images work, how rich text is stored, and which metadata is mandatory.
  • Check an editor can do the everyday things without calling a developer, and without being handed access they do not need.

Structured content can improve consistency and reuse, but an overly abstract model can slow editors. A page builder can be preferable when visual composition changes frequently. File-based content can be preferable when developers own every update. Fit depends on the operating team, not a CMS leaderboard.

Localization is a model, not a checkbox

Sanity documents field-level and document-level localization patterns and optional plugins. Next.js will happily serve a route per locale. The project still has to decide which document is the translation of which, what happens when one is missing, how slugs work per language, the hreflang and canonical tags, the sitemaps, who is allowed to edit which language, and how preview and publishing behave for each. Sanity does not automatically create a complete multilingual search implementation.

Current Sanity pricing needs careful reading

Sanity's pricing page, rechecked on July 31, 2026, lists Free at $0 for individuals experimenting or shipping smaller projects, with up to 20 seats, two permission roles and two public-only datasets. It lists Growth at $15 per seat per month with up to 50 seats and five roles. Growth does not raise the dataset count: it is still two, but they can be private rather than public only. Enterprise is custom-priced.

The same table sets limits on how many documents you can hold, how many requests and how much bandwidth you get, how many assets and webhooks, how many roles, and which features are included. Free is not accurately described as covering “most business websites.” Match dataset privacy, editor roles, document volume, usage, preview, scheduling, security and support needs to the current plan before estimating cost.

The CMS line is only part of the running bill. Our note on what Next.js hosting actually costs covers the deployment side, and the published planning tiers show where build cost sits alongside it.

Security and governance boundaries

Two systems means two credential surfaces, and the one that leaks is usually the CMS token rather than the site. Keep write and draft-read tokens server-side under least privilege, verify that a webhook genuinely came from Sanity, and watch for revalidation that failed silently. The last item is the one to settle in writing before the build starts, because it is about who holds the exports and the recovery steps.

  • Use separate production and non-production datasets and credentials where the risk model requires it.
  • Keep write and draft-read tokens server-side and apply least privilege.
  • Check that a webhook really came from Sanity, make sure the same one cannot be replayed against you, and watch for revalidation that quietly failed.
  • Go through who can see which dataset, who holds which role, which origins are allowed, who can reach preview, and which editor accounts are still active long after someone left.
  • Keep the content exports, the schema code, a list of your assets and written recovery steps under whatever ownership you agreed.

That last point is the one worth settling in writing before the build starts. Our checklist on website and account ownership lists the accounts and records a client should hold in their own name.

How widely used is this stack, actually

Worth establishing before the comparison sections, because the two halves of this stack are not in the same position and most writing about it treats them as one thing.

Next.js is used by 4.2% of websites whose JavaScript library is known, which is 3.2% of all websites. That is a mainstream framework by any reading. The CMS beside it is not: Sanity is used by less than 0.1% of all websites whose content management system is known. W3Techs does not publish a figure below that threshold, so there is no trend to quote either.

We are stating this plainly because we build on it and it would be easy not to. Anyone telling you this stack is surging is describing a feeling rather than a measurement, and below the publisher's reporting threshold, so no exact value or trend is available. Headless CMSs are also harder to fingerprint than server-rendered ones, which may understate them.

What follows from it is a hiring and continuity question, not a quality one. A niche CMS means a smaller pool of people who have used it, and a slower answer when you search for a problem. That is a real cost and it is separate from whether the software is good. Weigh it against the thing the next section is about, which is whether the editing experience actually works for the person who has to use it every week.

Both figures were read from W3Techs on 2026-08-17. Detection by signature, so sites that strip their fingerprint are absent. Share of existing sites is not share of new builds.

Compare alternatives on equivalent requirements

WordPress, Contentful, Payload, Storyblok, Sanity and file-based content have different strengths, licensing, deployment and operating models. If anyone tells you Sanity is safer, cheaper, faster or more flexible, ask what they compared it against, on what date, and whether both sides covered the same scope. Judge the plan you would actually be on and the way it would actually be built.

  • How content is structured, how pieces relate, which languages, the media, and search.
  • Who can do what, how work gets approved, preview, scheduling, and whether you can see who changed what.
  • Frontend freedom, page composition and developer workflow.
  • The API, webhooks, moving your content in, getting it out, and everything it has to talk to.
  • Security, privacy, where the data physically sits, uptime, support, and what happens when you need to recover.
  • What three years costs you in vendor fees, hosting, engineering time and your own team's hours.

The WordPress side of that comparison is written up separately in WordPress against Next.js and in the reasoning behind our own stack choice. If the current site is already on WordPress, our WordPress migration service page describes how the move is scoped.

Two production sites we have shipped on this stack

Everything above is checkable against Sanity's and Vercel's own documentation, which is deliberate. This section is the part that is not: what actually happened when we built on it. Both projects have a published record, and one of them is founder-affiliated, which is stated here rather than left for you to work out.

Ladies 4 Jesus, an independent client

A community site on Next.js 16 with Sanity, where every visitor submission is moderated before it appears publicly. The Studio is embedded in the application at /studio rather than hosted separately, so the owner edits content at the same domain she visits, and edits reach the live site in about sixty seconds through revalidation with no code deploy.

The decision that mattered on this project was the CMS, not the framework. Sanity was chosen because a non-technical owner had to run content, moderation, gallery and settings without a developer, and she does. That is the requirement most stack comparisons skip, because it cannot be established from a feature table.

One integration detail is worth taking if you are building something similar: video uploads go to Vercel Blob rather than into the CMS, and a Sanity webhook fires on rejection or deletion to remove the associated asset. Without that, rejected submissions accumulate in storage indefinitely and nobody notices until the bill does. The full record is in the Ladies 4 Jesus case study.

Panda Patches, founder-affiliated and labelled as such

Panda Patches is owned and operated by a PandaCodeGen co-founder. We built and maintain its platform but hold no ownership stake, so it is operating experience rather than independent client proof, and we do not present it as the latter.

With that stated: it is a three-year-old WordPress store migrated to a headless Next.js, Sanity, Supabase and Square stack, and no ranking losses were recorded in Search Console during the monitored post-launch period. It is the reason we can say what Sanity is like as a commerce CMS rather than as a marketing-site CMS, which are different jobs. Sanity holds the product content; Supabase holds the data that has to be queried and written; Square holds checkout. Trying to put all three in the CMS is the mistake that makes people say they moved away from this stack. The record is in the Panda Patches project notes.

What neither project establishesis what your build will cost or how fast it will be. Two sites is not a sample, the requirements were ours and our clients', and nothing here is a benchmark. It is first-hand experience offered as experience, which is worth more than a feature comparison and less than a measurement of your own project.

When a simpler stack is better

If your site is small and rarely changes, you may not need a headless CMS at all. The deciding question is not capability but ownership: if nobody will own the two systems and the integration between them, you are buying something that decays quietly, and a simpler setup will serve you longer with less.

  • The site is small, rarely changes and has no non-technical editing requirement.
  • Your team needs to build pages visually, and nobody has shown you the Studio doing that.
  • The budget will not carry two systems, the work to connect them, and someone owning it afterwards.
  • The managed platform you already pay for meets your needs on search, speed, integrations, governance and getting your data out.

Where the choice is really a budget question, work through what shapes the cost of a custom website and what a rebuild involves before committing to two operated systems.

Acceptance and handover

Acceptance is a demonstration, not a document. Someone has to show published, draft and preview working, show what caching and revalidation actually do, and walk one real example of each page type through metadata, rendered output, accessibility and performance checks. The handover half is what people forget: tokens, roles, datasets, allowed origins, webhooks, deploy, monitoring, rollback, and who to call.

  • Approved content schema and editor-task test script.
  • Someone shows you published, draft and preview working, and shows you what caching and revalidation actually do.
  • A real example of each page type checked for metadata, what actually renders, accessibility and speed.
  • Written down: the tokens, the roles, the datasets, the allowed origins, the webhooks, and who owns each environment.
  • Handed to you: how to export, how to deploy, what to monitor, how to roll back, and who to call.

When the build replaces a site that already ranks, add the URL and redirect checks set out in what a migration does to search visibility to the same acceptance list. To scope a specific content model and locale set, use the contact form.

Primary sources

Get your migration plan

We map your content, what your editors actually have to do each week, the languages you need, what it connects to and who should own what. Only then do we tell you whether Sanity is right or whether something simpler is. The proposal carries the current vendor prices and an acceptance test you can measure.

Frequently asked questions

Frequently Asked Questions

Is Sanity better than WordPress for Next.js?

Not universally. Compare the current products on the same content model, editor tasks, preview, localization, permissions, integrations, portability, security, support and three-year operating cost. The correct choice depends on the team and accepted requirements.

Do I need to know code to edit a Sanity website?

Editors can use a configured Sanity Studio without changing application code, but a developer normally designs and maintains the content schema, integrations, preview, validation and deployment. Test the real editor tasks before accepting the workflow.

How much does a Next.js + Sanity website cost?

Our tiers start at $1,500, $3,500 and $5,000 to $10,000, and a Next.js plus Sanity build usually lands in the middle two because the content model is the work. Sanity's own plan sits on top of that: it is free to start, and the paid tiers add datasets, seats and API volume. Model the seat count, because that is the line that grows.

Is Sanity free?

Sanity currently lists a $0 Free plan for individuals and smaller projects, with published feature and usage limits including public-only datasets. Growth is currently $15 per seat per month and adds broader roles, private datasets and pay-as-you-go capacity. Recheck the official pricing page before approval.

Can Sanity handle multiple languages?

Sanity documents field-level and document-level localization patterns. The project must still implement translation relationships, slugs, fallbacks, locale routes, hreflang, canonicals, sitemaps, preview and publishing rules.

Sanity vs Contentful: which is better for Next.js?

There is no universal winner. Compare current plans and implementations on content structure, editor workflow, localization, permissions, APIs, preview, portability, security, support, usage and total operating cost.