PRO
Inspect ↗
Learn more

Built for agentic development.

The Sanity setup
agents don't reinvent.

Every run invents a new one, none decided. This Next.js and Sanity kit commits six years of decisions. Your agent builds inside them, and checks its work through MCP and a real Chrome.

For engineers who work in Next.js and Sanity.

Next 16.x
Agents.md: loaded
Sanity v6
MCP: 2 servers
TS: strict
Drift: 0
Common problems
001 Agent redesigns the architecture on every prompt ∞ HRS.. 002 Page builder schema + section registration + preview ~5 HRS.. 003 Draft mode + live preview + webhook revalidation ~4 HRS.. 004 CDN vs. data cache: stale content after publish ~3 HRS.. 005 Studio structure editors can actually use ~3 HRS.. 006 SEO metadata, OG images, sitemaps, robots.txt ~2 HRS.. 007 Rewriting the same 12 components ~2 HRS.. 008 Redirects, analytics, view transitions, Mux ~2 HRS.. 009 Contact form + spam guard + Resend wiring ~1 HR.. 010 ESLint, Prettier, Biome, git hooks ~1 HR.. 011 Basic auth for staging environments ~1 HR.
Estimated time lost:

The page builder
alone costs you days.
Every single time.

It's never the easy stuff that hurts. It's the page builder, modeled from scratch again. Draft mode and live preview, wired up and subtly broken again. The cache bug where published content goes stale and the client swears you shipped something wrong. A Studio structure your editors actually understand, instead of one they email you about.

This is the part nobody quotes for and everybody rebuilds. Days gone before the real work starts.

Every decision
already made. So
you can skip to
the actual work.

The Content Architecture is the production foundation underneath my client work. Hundreds of choices, schema, fetching, structure, SEO, made once over six years and committed. Not a starter you outgrow in a month. Clone it, rename it, ship. The architecture is fixed; the tools are defaults you can swap. Fixed decisions are also what make agentic development work: an agent inside committed conventions ships, an agent without them redesigns.

001 / Agent-native

AGENTS.md and a dozen scoped skills let Claude Code or Cursor ingest the conventions before the first prompt, instead of proposing a plausible new architecture per run. Two preconfigured MCP servers ship in the repo: one reads the Next.js runtime, compilation errors, routes, docs matching the installed version, the other drives a real Chrome for screenshots, traces, and screencasts. The agent builds inside the decisions and checks its own work.

002 / Agent-ready in production

The shipped site stays legible to agents that read it. An editable llms.txt, drafted from your content with Sanity Agent Actions, and a token-light Markdown version of every page, served on the same URL through content negotiation. Generated in Studio, served verbatim, and a feature you can put in your own proposal.

003 / Schema as a system

Document roles, factory functions, singletons. Every schema looks the same, so every editor knows where to go. You never model the structure from scratch again.

004 / The hard fields, already built

The three fields nobody gets right the first time. A link field that handles internal refs, external URLs, email, and params. A media field that normalizes image, Mux, Rive, and Lottie into one shape, each returning dimensions, so you forget layout shift. A page builder with guardrails. Reusable, typed, composed everywhere.

005 / Fetch layer, solved

CDN bypassed in production, Data Cache doing the work, webhooks invalidating on publish, draft mode wired in. Stale content after publish stops being a midnight problem.

006 / A Studio editors actually use

Every document type where editors expect it. Pages own their routes, singletons stay locked, no hunting. Clients stop emailing to ask where their homepage lives.

007 / SEO, done not deferred

Per-page metadata from schema, sitemap driven by Sanity, OpenGraph with auto-cropped images, robots.txt included. Nothing bolted on the week before launch.

008 / Production-ready from day one

Basic auth, spam-protected forms, redirects managed in Sanity, analytics, view transitions. The plumbing you reconfigure every project, already wired.

009 / Wired up, not just cloned

An interactive setup script provisions the Sanity project, mints the tokens, adds CORS, and registers the revalidation webhook, then writes your .env. Export and migration scripts back up production and move content between environments. The first run is handled, not documented.

This is the actual repo.
README.md
# The Content Architecture
A production Next.js and Sanity foundation, committed rather than reinvented.
## Features
- Next.js 16 with App Router and Server Components
- Sanity CMS with an in-app Studio and a structure editors can navigate
- TypeScript strict, Tailwind CSS 4, and Biome
- Reusable components, page builder sections, and rich text blocks
- Draft mode with live preview, SEO helpers, and tag-based revalidation
- **Agent-native by default:** `AGENTS.md` and a dozen scoped skills load the
conventions before the first prompt. Two MCP servers ship in the repo.
- **llms.txt for AI assistants:** an editable, generated `/llms.txt` drafted
from your own content, owned by an editor instead of a build step.
- **Agent Markdown:** pages serve a token-light Markdown representation to
clients sending `Accept: text/markdown`, on the same URL.
- Scaffolding via Plop for repeatable section and block generation
- Seed dataset of example content, imported with `npm run seed`
## Getting started
**New here? Start with [`GETTING-STARTED.md`](GETTING-STARTED.md).** It is the
guided path from a fresh clone to your first rendered section. The sections
below are the reference.
### Prerequisites
- Node.js >= 24.15.0
- npm >= 11.6.2
### Installation
```bash
npm install
```
### Environment variables
Create a `.env` file and add at least:
```env
SANITY_API_VIEW_TOKEN=your-view-token
SANITY_API_EDIT_TOKEN=your-edit-token
SANITY_REVALIDATE_SECRET=your-revalidate-secret
RESEND_API_KEY=your-resend-api-key
NEXT_PUBLIC_URL=http://localhost:3000
NEXT_PUBLIC_SANITY_DATASET=production
NEXT_PUBLIC_SANITY_PROJECT_ID=your-project-id
NEXT_PUBLIC_SANITY_API_VERSION=2026-02-19
NEXT_PUBLIC_SANITY_STUDIO_BASE_PATH=/studio
```
`NEXT_PUBLIC_SANITY_STUDIO_BASE_PATH` is the public URL for Studio. The app
mounts Studio under `app/sanity-studio/`; `next.config.ts` rewrites the public
path to that folder.
### Development
```bash
npm run dev
```
- App: [http://localhost:3000](http://localhost:3000)
- Studio: `http://localhost:3000` + your studio base path
### Build
```bash
npm run build
npm run start
```
## Docs
Feature-level docs live in `docs/` so the root README stays light.
- Documentation hub: [`docs/README.md`](docs/README.md)
- Caching and revalidation: [`docs/features/caching.md`](docs/features/caching.md)
- Redirects: [`docs/features/redirects.md`](docs/features/redirects.md)
- Code generation (Plop): [`docs/features/code-generation.md`](docs/features/code-generation.md)
- Spam prevention: [`docs/features/spam-prevention.md`](docs/features/spam-prevention.md)
## Conventions
Every decision here is already made. Read `AGENTS.md` before changing the
architecture, build inside the conventions, and verify in a real browser.
Terminal
mainUpdated today

The work that gets remembered.

Real sites, shipped on The Content Architecture. With the plumbing already handled, the effort goes where it shows. The work here has been recognized by Awwwards, FWA, and CSSDA, and picked up across design directories.

“We shipped the Good Fella site on an early version and it saved us tons of time. Six months in, we're still building pages and sections in an afternoon without fighting the setup.”
Julian Fella
Co-founder, Good Fella
“Edo and I ran a client project on this together. The plumbing was already handled, so the week we'd normally lose to setup went into the creative work the client actually remembers.”
Elliott Mangham
Founder & frontend engineer
“I opened the fetch layer and found the revalidation problem I'd burned two days on last project, already solved and committed. That one folder paid for the whole thing, and the rest is six years of decisions I'd have made the slow way.”
Malik Kotb
Web designer & engineer
01 / 03

One repo.
One pricing.
Lifetime updates.

€549
001One-time fee, no subscription
002Perpetual license, unlimited projects
003Commercial use, no attribution
004Lifetime updates, included
005Agent-ready: skills, MCP, llms.txt
006Private GitHub Discussions
007Direct line to the maintainer
008Full source on purchase, sales final
009For Next.js + Sanity engineers, not no-code
010All prices in EUR

Before you buy

Next.js 16 with the App Router and React Compiler, Sanity v6, TypeScript in strict mode, Tailwind 4, and Biome for lint and format. Deploys on Vercel out of the box, and runs on Cloudflare via OpenNext.

 /$$$$$$$$ /$$                                                       /$$            /$$$$$$              /$$
|__  $$__/| $$                                                      | $$           /$$__  $$            | $$
   | $$   | $$$$$$$   /$$$$$$        /$$$$$$$   /$$$$$$  /$$   /$$ /$$$$$$        |__/  \ $$        /$$$$$$$  /$$$$$$  /$$   /$$  /$$$$$$$
   | $$   | $$__  $$ /$$__  $$      | $$__  $$ /$$__  $$|  $$ /$$/|_  $$_/           /$$$$$/       /$$__  $$ |____  $$| $$  | $$ /$$_____/
   | $$   | $$  \ $$| $$$$$$$$      | $$  \ $$| $$$$$$$$ \  $$$$/   | $$            |___  $$      | $$  | $$  /$$$$$$$| $$  | $$|  $$$$$$
   | $$   | $$  | $$| $$_____/      | $$  | $$| $$_____/  >$$  $$   | $$ /$$       /$$  \ $$      | $$  | $$ /$$__  $$| $$  | $$ \____  $$
   | $$   | $$  | $$|  $$$$$$$      | $$  | $$|  $$$$$$$ /$$/\  $$  |  $$$$/      |  $$$$$$/      |  $$$$$$$|  $$$$$$$|  $$$$$$$ /$$$$$$$/
   |__/   |__/  |__/ \_______/      |__/  |__/ \_______/|__/  \__/   \___/         \______/        \_______/ \_______/ \____  $$|_______/
                                                                                                                       /$$  | $$
                                                                                                                      |  $$$$$$/
                                                                                                                       \______/


  /$$$$$$   /$$$$$$   /$$$$$$        /$$   /$$  /$$$$$$  /$$   /$$  /$$$$$$   /$$$$$$$
 |____  $$ /$$__  $$ /$$__  $$      | $$  | $$ /$$__  $$| $$  | $$ /$$__  $$ /$$_____/
  /$$$$$$$| $$  \__/| $$$$$$$$      | $$  | $$| $$  \ $$| $$  | $$| $$  \__/|  $$$$$$
 /$$__  $$| $$      | $$_____/      | $$  | $$| $$  | $$| $$  | $$| $$       \____  $$
|  $$$$$$$| $$      |  $$$$$$$      |  $$$$$$$|  $$$$$$/|  $$$$$$/| $$       /$$$$$$$//$$
 \_______/|__/       \_______/       \____  $$ \______/  \______/ |__/      |_______/|__/
                                     /$$  | $$
                                    |  $$$$$$/
                                     \______/