CMS for JavaScript: server and frontend roles in 2026

Choose a JavaScript CMS by the role it plays. Distinguish a Node-hosted editor from a frontend client, then check typed content and published updates.

A JavaScript CMS can be a content server you run, an editor written in JavaScript or a service your storefront reads through an API. Choose by who owns the content database and publishing workflow, then decide how approved changes reach customers. A shared programming language alone doesn’t settle either question.

For a retailer, the useful test is a policy correction. An editor must be able to preview it privately, approve it and confirm which version customers receive. The same check applies to any shopping assistant that reads that policy.

A JavaScript CMS can occupy different layers

A server-side CMS application owns content storage and access rules. Its editor is the interface people use to change content. A frontend displays the content, using an application programming interface (API) to request records when it builds or serves a page.

Those roles can share a deployment or live in separate systems. A JavaScript editor running in a browser still needs a content service behind it. Likewise, adding a CMS client library to a storefront doesn’t create an editorial workflow.

Compare the operating models

ApproachMaintained exampleContent modelWhat your team operates
Run a Node CMS applicationStrapiStructured content types, with content accessed through its APIsApplication releases, database and media storage on a self-managed installation
Configure an editor for hosted contentSanity Studio and Content LakeSchema-defined documents and referencesStudio configuration and deployment, access rules and frontend integration; Sanity hosts the content service
Read content in the storefrontA framework server or browser clientA projection of the upstream CMS recordsRequests, response validation, rendering and publication refresh

Strapi’s quick start requires a supported Node.js long-term-support release. That runtime requirement belongs to the CMS server. It doesn’t require customers’ browsers to run Node.js.

Sanity’s setup guide creates a TypeScript-configured Studio. The Studio edits documents in its hosted content service. Deploying that editor and deploying the public storefront are separate jobs, even when one team maintains both.

Choose a self-managed CMS when your team needs control over the application and can maintain its data services. A hosted content service reduces that server work, while your team still owns schemas and the storefront connection.

Define the content and permission contract

Define a small public record before choosing how to fetch it. A returns policy needs an identity, approved text and a version the storefront can display. Product guidance can reference that policy without copying its wording into every product record.

The following is a fictional content contract. The CMS’s own draft and permission features enforce the separation between its public and private fields.

RecordPublic fieldsPrivate editorial fields
PolicyPolicy ID, slug, title, approved body and content versionDraft body, reviewer notes and approval state
Product guidanceProduct ID, fit guidance and policy referenceProposed guidance and review comments

Keep live stock and prices in the commerce system that owns them. Keep orders and customer account details there too. A product ID in the CMS connects editorial guidance to a product without making the CMS the authority for its availability.

Give the public reader permission to retrieve approved content only. Give editors their own authenticated access. A preview reader needs permission to read drafts, with its credential held on the server. Hiding a private field in the page template doesn’t prevent exposure if the browser can retrieve it.

Types describe the expected response

TypeScript interfaces help developers keep fields consistent between queries and templates. A PublishedPolicy type can require policyId, title, body and contentVersion. Generated query types can also catch a template that expects a field the query never selects.

Compile-time types don’t inspect a real API response. A type assertion cannot prove that the CMS returned a string or an approved record. Validate the response at the server boundary, including required fields and allowed values, before rendering it.

Incorrect: cast a response to PublishedPolicy and render missing text as an empty string. Correct: validate the result, reject malformed records and show a deliberate error or unavailable state. Treat a missing record separately from an upstream request failure.

Deliver the approved version

The frontend must request the approved content view and have a defined refresh path. For example, Sanity’s published perspective excludes unpublished changes. Its draft perspective provides the editor’s preview view and requires a different access path.

Choose when the storefront reads that public view. A static site reads it during a build, so approval must trigger a successful rebuild and release. A server-rendered site can read it per request or cache it with an explicit refresh rule.

For a fictional retailer, policy version returns-7 allows change-of-mind returns within 14 days. An editor prepares returns-8, changing that period to 21 days. These are example policy terms, not a statement of consumer rights.

  1. Keep returns-7 in the public query while the editor previews returns-8. Check that a separate customer session still receives the 14-day wording.
  2. Approve and publish returns-8 in the CMS. Confirm that the published record contains the 21-day wording and the matching content version.
  3. Run the configured frontend refresh. For a static deployment, wait for the build and release to finish. For cached rendering, invalidate the affected page or content dependency.
  4. Load the customer page in a fresh session. Inspect its visible version and full policy wording, including any repeated delivery or returns summary elsewhere.
  5. Refresh any separately stored policy source used for shopping answers. Ask a returns question and compare the answer’s period with returns-8.

If the page still shows returns-7, compare the CMS’s published response with the rendered page. Then inspect cache invalidation or build results. A successful publishing click proves the record changed in the CMS. It doesn’t prove a downstream page refreshed.

Keep the last approved page available when a refresh fails, and alert the person responsible for publication. Don’t silently replace policy text with a blank page. For a material policy correction, pause dependent answers until their source matches the approved version.

Choose the framework-specific implementation

The framework decides where content requests run and how a published record becomes HTML. That affects credential handling and the refresh procedure even when every option uses JavaScript.

Next.js has Draft Mode for editor previews. Its router and cache configuration determine the implementation, so use the dedicated CMS for Next.js guide before wiring preview routes or publication events.

Astro prerenders pages by default and supports on-demand rendering through an adapter. Choose the CMS for Astro approach when deciding whether a policy change needs a rebuild or a server request.

Nuxt’s data-fetching helpers coordinate server requests and the data passed to the browser. Its server-rendered payload can contain fetched content, so select only public fields for customer pages. Use a Nuxt-specific implementation when preview state or server credentials affect the request.

A TypeScript CMS can suit a team that wants shared types across its content code. Make the final choice on the work your team can own: database recovery for a self-managed server, schema maintenance for the editor and a verified publication path for the storefront. Use the CMS framework guides to select that delivery path before connecting customer-facing answers.

Give your store its own shopping agent

Customers ask in their own words. Your agent finds, compares and checks out from your catalogue, right on your site.

See it in actionFree trial · Simple setup