# 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.