We accept USD, EUR, PLN and 19 other currencies
Seamless communication in English and Polish
We always meet deadlines - no more dragging projects
Custom Web Applications

Payload CMS in Next.js projects: when can a CMS be part of your app instead of a separate tool?

Your website is gaining a client portal, user roles, and documents, and a separate CMS fits your app less and less? Find out when Payload in Next.js can take over the admin panel, permissions, and part of the backend, and when to stay with Sanity.

Summarize this article with AI

Payload makes sense when your CMS manages product data, too, and not only content. Key takeaways:

  • Code-first: you define the data model, relationships, and permissions in TypeScript. Changes go through Git, code review, and tests like the rest of your code.
  • One application: Payload runs inside Next.js. With the Local API, server code reaches your data without extra HTTP requests.
  • Ready-made back office: the admin panel, login, roles, and file handling are there from day one, so your budget goes into product features.
  • Security: the Local API can bypass Access Control by default. You have to enforce access rules on purpose.
  • Payload or Sanity: for a content website, Sanity is usually simpler and cheaper to start with. Payload works better for client portals, B2B platforms, and MVPs.
  • Cost: self-hosted Payload has no license fees, but you pay for infrastructure and maintenance. Compare the total cost of ownership (TCO) for your specific project.

On most websites, a CMS has a simple job. Marketing logs into the panel, updates the offer, publishes an article, swaps an image, or builds a landing page. The frontend pulls content from the CMS and shows it to visitors.

For a project like that, a separate headless CMS such as Sanity often works great. Trouble starts when the product you're building stops being a regular website.

A client portal gets added. Users get their own accounts and roles. The company needs catalogs, documents, files, individual data, and a panel for its staff. Some content should be visible only to specific clients. Publishing processes, change approvals, and relationships between organizations, users, and resources start to pile up.

That's when the line between the CMS and the application starts to blur.

This is exactly where Payload gets interesting. Its creators now describe it as more than a headless CMS: an open-source backend and full-stack framework for Next.js. One configuration gives you an admin panel, data models, database migrations, a REST API, GraphQL, authentication, access control, and file handling.

For your company, that means less work that a traditional architecture would require you to build from scratch or assemble from several separate services.

How is Payload different from a traditional headless CMS?

In the typical model, a headless CMS is an external content source. The frontend runs in one environment, the CMS in another, and they talk to each other through an API.

That's a good setup if the system's main job is content management. Articles, offer pages, case studies, authors, categories, and marketing materials fit that model perfectly.

Payload goes further.

It's a code-first solution. Data structure, fields, relationships, permissions, and part of the system's behavior are defined in TypeScript. Based on that, Payload builds the matching admin layer and API.

If your app has collections like organizations, users, products, documents, or orders, you describe them directly in the project. The relationships between them are part of the configuration too.

A change to the data model becomes a normal code change. It can go through Git, code review, tests, and your standard deployment pipeline.

Your tech team gets much more control this way. For the business, that means fewer situations where product growth is blocked by something the external CMS vendor didn't plan for.

When does a CMS become part of the product?

A B2B platform is the easiest way to show it.

At first, the company has a website. Marketing manages the offer, articles, and case studies. The CMS stores mostly public content.

Then a client portal appears.

After logging in, a user sees documents assigned to their company, individual materials, offers, information about ongoing services, and data available only to their organization. The client's admin has more permissions than a regular employee. The team on the provider's side needs yet another level of access.

In a system like this, "content" no longer means just an article.

A document, product, user, organization, manual, file, or configuration can all be part of one data model. The admin panel is no longer the back office of a blog. It becomes the place where you manage part of the product.

That's the moment Payload starts to make more sense than a traditional CMS running next to the app.

Why does Payload fit Next.js so well?

Today, Payload can be installed directly inside a Next.js app. The admin panel and Payload's HTTP layer live in the same project, and the rest of your application can run right alongside them.

Architecturally, that matters a lot.

In the traditional setup, the Next.js frontend sends an HTTP request to an external CMS. The CMS responds through an API. You have to maintain configuration on both sides, handle authorization, type syncing, network errors, and more dependencies.

Payload also gives you a Local API. Server-side code can work with data directly, without an extra HTTP connection. That applies to React Server Components, route handlers, hooks, and server scripts, among others.

REST and GraphQL still have their place. Payload generates both, so you use them wherever the system actually needs to communicate through an API.

The difference is that inside a single app, you don't need an artificial network layer just so one part of your own system can talk to another.

Fewer connections mean a simpler architecture, fewer potential points of failure, and easier maintenance.

Payload as the admin panel for a custom application

The admin back office often turns out to be one of the more expensive parts of a custom system.

End users need a good product interface, but someone on the company side has to manage what's underneath. That means browsing users, editing data, adding documents, managing catalogs, changing statuses, and controlling access.

If everything is built from scratch, you have to design the panel, build forms and lists, implement permissions, set up validation, handle errors, and keep developing all of it alongside the app.

Payload generates the panel automatically from the data model you define. You can also extend it with your own React components and tailor it to a specific process.

Every panel takes some work, and more specialized systems will need custom views and workflows.

What changes is the starting point. The team doesn't begin with a blank page.

For an MVP, a B2B portal, or an internal business app, this can noticeably shorten development time. You shift budget from repetitive back-office work to the features that actually set your product apart.

Roles, organizations, and data access

In a complex system, splitting users into "admin" and "regular user" stops being enough very quickly.

You might have a platform admin, a client admin, an employee of that client, a sales rep, support staff, and a system operator. Each person should see a different scope of data and be able to perform different operations.

Payload has an Access Control mechanism that works at the collection, operation, and field level. Rules can be based on the user, their role, document properties, or the organization they belong to.

So you can set up a rule where an employee of Company A sees their own organization's resources but can't read Company B's data. A platform admin can have broader access, while someone in marketing only sees the areas they need for their work.

Payload also offers an official multi-tenant solution, which helps on platforms that serve many organizations within one application.

None of this frees the team from designing security. Permissions have to be planned carefully, tested, and monitored.

An important Local API trap: access has to be designed on purpose

The close integration between Payload and Next.js is very convenient, but it comes with a consequence your development team needs to know about.

Operations run through Payload's Local API can bypass Access Control by default. That's useful for internal tasks run by trusted server code, but it would be dangerous if a developer assumed the logged-in user's permissions would be checked automatically.

If the Local API performs an operation on behalf of a specific user, you need to pass that user's context and enforce the access rules.

This is a good example of a broader rule. Payload gives you a lot of control, and with it comes more responsibility for the team.

Self-hosting or owning your code doesn't make a system safer than a SaaS product on its own. The advantage is that you can design security around your system's actual requirements.

Publishing, versions, and custom approval processes

Payload can handle document versioning, drafts, change previews, and scheduled publishing. For content projects, that's a solid base for normal editorial work.

If your organization needs a more elaborate process (content creation, legal review, manager approval, publishing), you can build that workflow on top of Payload's mechanisms.

There are two separate things here, though.

Drafts, versions, and publishing are built-in capabilities. A multi-step approval process tailored to a specific organization requires designing the right rules, statuses, and app behavior.

That can be simpler than building the entire back office from scratch. But the process won't appear on its own once you install the CMS.

Does Payload replace the backend?

No. That claim would go too far.

Payload can take over a large part of a typical app's backend. It provides a foundation for data management, an API, auth, access control, an admin panel, file uploads, migrations, and hooks for running your own logic during the data lifecycle.

For many client portals, content systems, and MVPs, that's a big chunk of work that would otherwise have to be written separately.

That said, it's not a good idea to put all of your product logic inside the CMS.

If the app runs complex calculations, sophisticated financial processes, or heavy data processing, or needs a specialized backend architecture, it needs a proper application layer.

That's how we look at Payload at WebProfessor. We use it where it cuts repetitive work and simplifies the system. We don't force it onto problems that a separate backend handles better.

Payload vs Sanity: both are headless, but they solve slightly different problems

It's easy to oversimplify a comparison between Payload and Sanity.

Sanity often gets labeled as "an external CMS you can't connect to your app," which isn't accurate. Sanity Studio is a React application and can be self-hosted or embedded in another project. The data, however, is stored in Sanity's hosted Content Lake.

With Payload, a company can run both the system and the database on its own infrastructure. Payload is also more tightly integrated with the Next.js architecture itself.

That's why at WebProfessor we judge these tools by what they'll be used for.

If we're building a marketing website, a content portal, or a site where content editing is the CMS's main role, Sanity will often be a great choice. It offers a comfortable environment for working with content, and there's no point in complicating a project without a reason.

Payload starts to look more attractive when the CMS has to manage part of the product. Users, organizations, roles, documents, and application data begin to form one shared model, and the admin panel needs to be part of the company's internal processes.

Asking "which CMS is better?" doesn't get you very far here. What matters more is whether you mainly need a content management system or an admin layer that evolves together with your app.

Payload makes the most sense when the CMS goes beyond content and starts managing users, roles, and product data. For a regular content website, a simpler headless CMS is usually enough.

Total cost of ownership (TCO): where the Payload model can start to pay off

CMS costs are one of the areas where it's easiest to jump to conclusions.

Payload is open source under the MIT license, and the self-hosted version has no license fee for the CMS itself. That doesn't make it free. You still need infrastructure, a database, persistent file storage, backups, monitoring, often an email provider, and people responsible for system updates.

A SaaS CMS has a different cost structure. You pay for the service, and the price can depend on the plan, number of users, data volume, API usage, extra environments, and more advanced features.

Sanity is a good reference point here. For many marketing websites and smaller teams, it has a favorable starting model. You can begin on the free plan and get ready-made infrastructure without maintaining a CMS, database, or production environment yourself. That's why it's often the simpler and more economical choice for typical content projects.

The math starts to look different as a project grows. A bigger editorial team means more CMS users, and large amounts of content, data, and operations can increase your use of paid resources. In the SaaS model, part of the cost grows along with how much you use the platform.

Self-hosted Payload works differently. You don't pay for each additional editor or panel user under a CMS price list, and more data doesn't automatically push you onto a higher SaaS plan. Instead, you pay for your own infrastructure and the work needed to maintain, update, monitor, and secure it.

That's why we don't treat Payload as a way to "avoid paying for a CMS subscription." For a smaller site, Sanity can be cheaper and much simpler to operate. Payload starts to gain an economic edge with larger teams, large amounts of data, and applications where the CMS becomes part of your own technology stack anyway. At WebProfessor, we match the model to the project's scale, the way the team works, and the expected TCO in the years ahead.

If a company has a simple website and a small team, a ready-made SaaS can come out noticeably cheaper than maintaining its own infrastructure.

The picture changes with a bigger product. If the CMS starts handling application data, many users, custom roles, and a growing number of integrations, you have to calculate the cost of the whole system. The subscription is only one part of it.

At that point, TCO includes SaaS fees, integration development, keeping data in sync, extra services, the cost of changes, and the time your team spends working around platform limitations.

In that scenario, Payload can change your cost structure. A larger share of spending moves from subscriptions and integrations to your own infrastructure and to developing code that stays under your company's control.

Will it be cheaper? You have to run the numbers for the specific project.

Fewer external systems mean lower integration costs

The license price is only part of TCO.

Picture an app where the CMS, user system, file storage, custom backend, and admin panel all run separately. Every connection between them needs an API, configuration, error handling, and monitoring.

When the data structure changes in one system, several others may need updates too. A change to an external API forces you to adjust the integration. And when syncing breaks, the team has to figure out which layer the data started drifting in.

Payload lets you bring some of these pieces closer together. You won't get rid of integrations entirely, because modern apps always talk to other services. What you can eliminate are the connections that exist only because the CMS was set up as a separate system.

Over a product's multi-year lifecycle, that weighs more in maintenance costs than a small difference in the monthly subscription.

Control over data and infrastructure

On a simple marketing website, where the CMS runs is rarely a major business issue.

That changes with a client portal, a B2B application, or an internal tool.

The system may store user profiles, client documents, account configurations, materials available to specific organizations, and other data tied to how the product works.

Payload lets you deploy the app wherever a suitable Next.js environment can run, and you choose the hosting setup and database yourself. Payload currently supports PostgreSQL, MongoDB, and SQLite, among others, through dedicated adapters.

More control is especially useful when a company has its own infrastructure requirements or wants to reduce its dependence on a single SaaS platform.

Security and cost still depend on how you plan it. The difference is that those decisions are made on your side.

Payload, MVPs, and time-to-market

With an MVP, it's especially easy to burn through the budget on features that are technically necessary but don't validate any business hypothesis.

Users need to log in. The admin needs a panel. Someone has to manage data and files. You need roles and an API.

None of these, though, is what the customer will ultimately pay for.

If Payload provides a large part of that back office, the team can move on to building the actual product sooner. Developers spend less time building an admin panel, permission system, or basic API layer from scratch, and more time on features that set the product apart and create value for its users.

For an MVP, that translates into a shorter time-to-market and better use of the development budget.

When is Payload overkill?

Payload has a lot of capabilities, but it shouldn't be the default CMS for every project.

At WebProfessor, for simple company websites and projects built heavily around content marketing, we'll still choose Sanity more often. On a well-designed Astro site, pairing a lightweight frontend with a convenient headless CMS is simpler and supports performance, SEO, and marketing work well.

Payload gets more interesting once we move into a more custom Next.js solution.

Before deciding, it's worth answering a few questions:

  • Will the CMS manage only public content, or product data as well?
  • Do users and organizations need different levels of access?
  • Does the app need its own admin panel?
  • Should some of the data be stored and processed on our own infrastructure?
  • Does the current CMS require more and more integrations and workarounds?
  • Will the product be continuously developed by a team working in Next.js and TypeScript?
  • After calculating a 3-⁠5-year TCO, does a custom solution start to make economic sense?

If most of your answers are "no," a simpler headless CMS will probably be the better choice.

If most are "yes," take a look at Payload before you start building yet another admin panel, user system, and API layer from scratch.

When does Payload really give you an edge?

Payload's biggest advantage shows up when the CMS stops being a place to type in text and becomes part of the product's architecture.

In a client portal, it can manage users, organizations, materials, and documents. On a B2B platform, it can handle the catalog and data access for individual clients. In an MVP, it can deliver the admin panel and a large share of the back office before the team starts building the product's most custom features.

In that scenario, the company gains more control over its code, data, and roadmap. The team cuts down on unnecessary integrations, and the development budget goes to the parts that actually build a business advantage.

That's not an argument for replacing every CMS with Payload.

Technology should simplify a project. If Payload simplifies the architecture, shortens development, and improves TCO, it's a strong candidate. If it adds complexity to a regular content website, choose something simpler.

That's how it works for us at WebProfessor. Sanity is our natural choice for many content projects. We use Payload when the CMS has to go deeper into the product and Next.js stops being just a website frontend and becomes the foundation of a custom application.

Frequently asked questions

Yes. It works especially well for projects with users, organizations, roles, documents, and data available only to specific people. Its Access Control system lets you build those rules without creating the whole back office from scratch.

It can take over a large part of a typical backend, including data models, the API, auth, permissions, migrations, files, and the admin panel. However, not every piece of business logic belongs there. More specialized processes may need a separate backend layer.

For a marketing website, blog, or large content site, Sanity will often be the simpler option. Payload becomes especially interesting when the CMS needs to be tied to users, roles, and application data, and developed directly alongside a Next.js project.

You can't assume that without an analysis. Self-hosted Payload is open source and has no traditional license fee, but the company pays for infrastructure and maintenance. On larger projects, cutting subscriptions and integrations can lower TCO, while on a small site a ready-made SaaS may still be more economical.

Payload offers authorization and access control mechanisms that let you build a secure application, but in the self-hosted model, responsibility for maintaining it stays with the tech team. The system needs regular updates, monitoring, and backups. The team also has to respond to vulnerabilities and look after the security of the infrastructure, database, and stored files.

More tips and resources

See more