3.8 KiB
3.8 KiB
Payload Monorepo Agent Instructions
Project Structure
- Packages are located in the
packages/directory.- The main Payload package is
packages/payload. This contains the core functionality. - Database adapters are in
packages/db-*. - The UI package is
packages/ui. - The Next.js integration is in
packages/next. - Rich text editor packages are in
packages/richtext-*. - Storage adapters are in
packages/storage-*. - Email adapters are in
packages/email-*. - Plugins which add additional functionality are in
packages/plugin-*.
- The main Payload package is
- Documentation is in the
docs/directory. - Monorepo tooling is in the
tools/directory. - Test suites and configs are in the
test/directory. - LLMS.txt is at URL: https://payloadcms.com/llms.txt
- LLMS-FULL.txt is at URL: https://payloadcms.com/llms-full.txt
Dev environment tips
- Any package can be built using a
pnpm build:*script defined in the rootpackage.json. These typically follow the formatpnpm build:<directory_name>. The options are all of the top-level directories inside thepackages/directory. Expnpm build:db-mongodbwhich builds thepackages/db-mongodbpackage. - ALL packages can be built with
pnpm build:all. - Use
pnpm devto start the monorepo dev server. This loads the default config located attest/_community/config.ts. - Specific dev configs for each package can be run with
pnpm dev <directory_name>. The options are all of the top-level directories inside thetest/directory. Expnpm dev fieldswhich loads thetest/fields/config.tsconfig. The directory name can either encompass a single area of functionality or be the name of a specific package.
Testing instructions
- There are unit, integration, and e2e tests in the monorepo.
- Unit tests can be run with
pnpm test:unit. - Integration tests can be run with
pnpm test:int. Individual test suites can be run withpnpm test:int <directory_name>, which will point attest/<directory_name>/int.spec.ts. - E2E tests can be run with
pnpm test:e2e. - All tests can be run with
pnpm test. - Prefer running
pnpm test:intfor verifying local code changes.
PR Guidelines
- This repository follows conventional commits for PR titles
- PR Title format: ():