payload
Use when working with Payload CMS — collection configuration, field types, access control, or Next.js integration. Also use when choosing a code-first CMS or self-hosting a headless CMS.
| Model | Source |
|---|---|
| sonnet | pack: cms |
Full Reference
┏━ 🔧 payload ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ Use when working with Payload CMS — collection… ┃ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
Payload CMS
Section titled “Payload CMS”Payload 3.x is a code-first, Next.js-native headless CMS — it runs inside your Next.js app with no separate server process. Collections, access control, hooks, and the admin panel are all defined in TypeScript. Requires Node.js 20.9.0+ and Next.js 15.2.9+.
Quick Reference
Section titled “Quick Reference”| Item | Value |
|---|---|
| Install | npx create-payload-app@latest |
| Admin URL | http://localhost:3000/admin |
| REST API | /api/<collection-slug> |
| GraphQL | /api/graphql |
| Key env vars | PAYLOAD_SECRET, DATABASE_URL, NEXT_PUBLIC_SERVER_URL |
| TypeGen | npx payload generate:types |
| Migrations | npx payload migrate |
| Version | 3.x (3.44+) |
Reference Index
Section titled “Reference Index”| I want to… | File |
|---|---|
| Set up a new project, configure adapters, and deploy | reference/setup.md |
| Define collections, globals, and all field types | reference/collections.md |
| Query data via Local API, REST, and GraphQL | reference/queries.md |
| Configure collection and field-level access control | reference/access-control.md |
| Write beforeChange, afterChange, and other lifecycle hooks | reference/hooks.md |
| Customize the admin panel, handle uploads, and configure storage | reference/api.md |
Usage: Read the reference file matching your current task from the index above. Each file is self-contained with code examples and inline gotchas.