sitecms for Next.js

A headless CMS for Next.js where the client edits the content

By Updated

Short answer

sitecms is a hosted headless CMS where your client edits text, images, posts and prices on a Next.js site in a ready-made panel. Run npx sitecms-next init, read content with getContent() in server components, and a signed webhook clears the cache when the client saves or publishes. It needs Next.js 14.2+ with the App Router. The panel is in Swedish.

Who is sitecms for Next.js for, and who is it not for?

  • It fits a small business site made with Next.js, where the client changes text, images, news, services, prices and simple lists (team members, case studies, opening hours) without calling you.
  • It fits developers and agencies who want a hosted panel instead of running a CMS per client, at a fixed monthly price by number of sites and with unlimited editors.
  • It fits when the editor reads Swedish, and the site may still publish content in up to 10 languages.
  • It does not fit when the editor needs an English panel.
  • It does not fit when the content needs relations between content types, a GraphQL API, a visual page builder or more than 20 content types, 30 fields per type or 2,000 entries per type.
  • It does not fit when the CMS must run on your own server: sitecms is a hosted service only.

How do I connect a Next.js site?

  1. Create an account and a site in the panel and copy the API key from the site's Integration page.
  2. Run npx sitecms-next init in the project root and paste the key (or pass it: npx sitecms-next init <key>).
  3. Read content in a server component, as below.
  4. For live preview and visitor statistics, add <SitecmsPreview /> and <SitecmsAnalytics /> last in <body> in app/layout.tsx, and allow the panel to embed the site in next.config. Init prints these steps but never changes those files.
  5. Add CMS_API_KEY as an environment variable where the site is hosted, deploy, and invite the client by email as an editor.
bash
npx sitecms-next init
app/page.tsxtsx
import { editable, getContent, getPosts, image, text } from "sitecms-next";

export default async function Home() {
  const content = await getContent();
  const hero = image(content, "home", "hero.image");
  const posts = (await getPosts()).slice(0, 3);
  return (
    <main>
      <h1 {...editable("home", "hero.title")}>{text(content, "home", "hero.title", "Welcome")}</h1>
      {hero ? <img src={hero.src} alt={hero.alt} /> : null}
      <ul>{posts.map((p) => <li key={p.slug}>{p.title}</li>)}</ul>
    </main>
  );
}

The init command checks the key first, saves CMS_API_KEY in .env.local (and makes sure .gitignore covers it), installs the package, creates the revalidate, preview and events routes as files under app/api/sitecms/ (or src/app), creates sitecms.config.ts and adds "prebuild": "sitecms-next sync". Existing routes and config are never overwritten, and app/layout.tsx and next.config are never touched. The full walkthrough is in the documentation.

What does sitecms-next give you?

WhatIn sitecms-nextGood to know
Page contentgetContent() with the helpers text, image, block and seoServer components only, so the key stays on the server.
PostsgetPosts() and getPost(slug)Published posts only. getPost returns null for a missing post.
Custom content typesgetCollections(), getEntries(key) and getEntry(key, slugOrId)Published entries only. Added in 0.7.
LanguagesgetContent({ locale: "en" }) or createSitecms({ locale })Sent only when set. A missing translation falls back to the default language.
Revalidate webhookapp/api/sitecms/revalidate/route.ts, created by initEvery request is tagged sitecms, and a verified webhook clears the tag.
Live previewapp/api/sitecms/preview/route.ts, <SitecmsPreview /> and editable()Static pages stay static; only the person previewing gets dynamic rendering. Pages only, not posts or entries.
Visitor statisticsapp/api/sitecms/events/route.ts and <SitecmsAnalytics />No cookies, no local storage, no third-party script.
Quote requestssubmitQuoteRequest() and uploadQuoteAttachment()In a server action, never from the browser.
CLIsitecms-next init, sync, check, doctor, pullcheck verifies the key and shows the webhook status.

A fully static export (output: "export") cannot revalidate on the server. Paste a deploy hook from your host as the revalidate URL in the panel instead, and the site is rebuilt when the client saves or publishes.

What are the limits?

Read from the code. The limits are the same in every plan.
WhatLimit
Pages per site100
Custom content types (collections) per site20
Fields per content type30
Entries per content type2,000
Entries per API request1 to 200 (default 100), paged with offset
Languages per site10
Custom roles per site20, built from 11 permissions
Version historyThe 50 latest versions of each item, plus every version from the last 90 days
Scheduled publishing2 minutes to 1 year ahead, published with a few minutes' delay
Posts and editorsNo limit
  • Field types in custom content types: text, richtext, image, number, boolean, date, select, url. There are no relations between content types and no GraphQL API.
  • Only pages can be previewed on your site. Posts and entries in custom content types cannot: their drafts are visible in the panel only.
  • Routing, the language switcher and hreflang tags for a multilingual site are yours to build. sitecms delivers the content per language with ?locale=.
  • sitecms-next is version 0.7.1; the Astro, Nuxt and SvelteKit packages are at 0.1.1. Without the App Router, init creates no routes.

What does it cost?

The price is the full amount: no VAT is added, because the company behind sitecms is not VAT-registered. Annual billing costs ten months instead of twelve.
PlanSitesPer monthPer year
Solo1SEK 149SEK 1,490
Studio5SEK 499SEK 4,990
Byrå20SEK 1,490SEK 14,900

The price is per account, by number of sites. Every feature, every framework package and every limit above is the same in every plan, and editors cost nothing extra. The first 30 days are free with up to 20 sites and no card. If you do not pay when the trial ends, the panel is locked so nobody can edit. The website keeps showing the content that was saved last. More on the pricing page.

Frequently asked questions

Does it work with the Pages Router?

The package requires Next.js 14.2 or later with the App Router. In a project without the App Router, init creates no routes. You can still receive the webhook yourself with verifyWebhook, or use the core package sitecms-js.

Does a change need a new deploy?

Not on a site that renders on the server. Saving in the panel, or publishing on a site with draft mode, sends a signed webhook that clears the cache tag sitecms, and the next visitor gets the new content. A static export needs a deploy hook that rebuilds it.

Which Next.js versions are supported?

Next.js 14.2 or later with the App Router (the peer dependency is next >= 14.2), on Node 18.17 or later. Live preview needs sitecms-next 0.4 or later and visitor statistics 0.6 or later; the current version is 0.7.1.

Does my client need to understand Swedish?

Yes, the person who edits should be comfortable reading Swedish, because the panel, the emails and support are only in Swedish. You as the developer do not need Swedish to integrate, and the field labels the editor sees are the ones you write in sitecms.config.ts.

Can the client preview a post before publishing it?

Not on your site. Live preview works for pages. Drafts of posts and entries in custom content types are visible in the panel only.

What does it cost?

Solo (1 site) SEK 149 per month, Studio (5 sites) SEK 499 per month, Byrå (20 sites) SEK 1,490 per month. The price is the full amount: no VAT is added, because the company behind sitecms is not VAT-registered. Annual billing costs ten months instead of twelve. The first 30 days are free and need no card.

Sources

Read more