# AGENTS.md

The flexible backend for all your projects 🐰 Turn your DB into a headless CMS, admin panels, or apps with a custom UI, instant APIs, auth & more.

## Setup

```
pnpm install
```

## Commands

```
pnpm build           # produce a build
pnpm test            # run the test suite, must pass before any commit
pnpm lint            # lint
pnpm format          # format
pnpm lint:style
pnpm test:blackbox
pnpm test:coverage
```

## Layout

- `app/`      1421 source files
- `api/`      1099 source files
- `packages/` 760 source files
- `tests/`    261 source files
- `sdk/`      235 source files
- `directus/` 3 source files

## Conventions

- Tests live alongside the code they cover, following `api/src/ai/chat/controllers/chat.post.test.ts`.
- CI defines what passing means. See `.github/workflows/assign-next-release-milestone.yml`, and keep it green.
- TODO: add the two or three conventions a newcomer always gets wrong here.

## Gotchas

- `api/src/services/mcp-oauth/index.test.ts` is 143KB. It will not fit comfortably in context, so read it in parts.

---

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.
