sitecms for Next.js
A headless CMS for Next.js where the client edits the content
By Oskar ÖstlindUpdated
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?
- Create an account and a site in the panel and copy the API key from the site's Integration page.
- Run
npx sitecms-next initin the project root and paste the key (or pass it:npx sitecms-next init <key>). - Read content in a server component, as below.
- For live preview and visitor statistics, add
<SitecmsPreview />and<SitecmsAnalytics />last in<body>inapp/layout.tsx, and allow the panel to embed the site innext.config. Init prints these steps but never changes those files. - Add
CMS_API_KEYas an environment variable where the site is hosted, deploy, and invite the client by email as an editor.
npx sitecms-next initimport { 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?
| What | In sitecms-next | Good to know |
|---|---|---|
| Page content | getContent() with the helpers text, image, block and seo | Server components only, so the key stays on the server. |
| Posts | getPosts() and getPost(slug) | Published posts only. getPost returns null for a missing post. |
| Custom content types | getCollections(), getEntries(key) and getEntry(key, slugOrId) | Published entries only. Added in 0.7. |
| Languages | getContent({ locale: "en" }) or createSitecms({ locale }) | Sent only when set. A missing translation falls back to the default language. |
| Revalidate webhook | app/api/sitecms/revalidate/route.ts, created by init | Every request is tagged sitecms, and a verified webhook clears the tag. |
| Live preview | app/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 statistics | app/api/sitecms/events/route.ts and <SitecmsAnalytics /> | No cookies, no local storage, no third-party script. |
| Quote requests | submitQuoteRequest() and uploadQuoteAttachment() | In a server action, never from the browser. |
| CLI | sitecms-next init, sync, check, doctor, pull | check 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?
| What | Limit |
|---|---|
| Pages per site | 100 |
| Custom content types (collections) per site | 20 |
| Fields per content type | 30 |
| Entries per content type | 2,000 |
| Entries per API request | 1 to 200 (default 100), paged with offset |
| Languages per site | 10 |
| Custom roles per site | 20, built from 11 permissions |
| Version history | The 50 latest versions of each item, plus every version from the last 90 days |
| Scheduled publishing | 2 minutes to 1 year ahead, published with a few minutes' delay |
| Posts and editors | No 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-nextis 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?
| Plan | Sites | Per month | Per year |
|---|---|---|---|
| Solo | 1 | SEK 149 | SEK 1,490 |
| Studio | 5 | SEK 499 | SEK 4,990 |
| Byrå | 20 | SEK 1,490 | SEK 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
- Every featureDrafts, scheduling, history, languages, content types and roles, with limits.
- All frameworksFive packages, versions and requirements side by side.
- DocumentationConfig, content, collections, ?locale=, drafts, preview and the REST API.
- Pricing
- Compare with other CMSsIncluding when another CMS fits better.