# AGENTS.md

Payload is the open-source, fullstack Next.js framework, giving you instant backend superpowers. Get a full TypeScript backend and admin panel instantly. Use Payload as a headless CMS or for building powerful applications.

## Setup

```
pnpm install
```

## Commands

```
pnpm dev               # run locally
pnpm build             # produce a build
pnpm test              # run the test suite, must pass before any commit
pnpm lint              # lint
pnpm bf
pnpm build:admin-bar
pnpm build:all
pnpm build:all:force
```

## Layout

- `packages/`  3628 source files
- `test/`      1934 source files
- `templates/` 768 source files
- `examples/`  576 source files
- `tools/`     53 source files
- `scripts/`   13 source files

## Conventions

- Tests live alongside the code they cover, following `.github/actions/ai-reviewer/src/diff.test.ts`.
- TypeScript is not in strict mode. Turning it on catches a whole class of mistakes before they run.
- CI defines what passing means. See `.github/workflows/activity-notifications.yml`, and keep it green.
- TODO: add the two or three conventions a newcomer always gets wrong here.

## Gotchas

- `test/benchmark-blocks/payload-types.ts` is 699KB. It will not fit comfortably in context, so read it in parts.
- Copy `.env.example` before running anything that needs configuration.

---

Drafted by agentreadme.com from what is in this repository. Everything marked TODO
needs a human. Check it in as AGENTS.md at the root.
