repository-guide

Documents architecture, commands, and coding standards for a Next.js and Payload CMS repository.

Updated Sep 1, 2021
One-click install
npx skills add https://github.com/WP-Coaching/pellegrims.coach --skill repository-guide-wp-coaching
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: repository-guide
Source: https://github.com/WP-Coaching/pellegrims.coach/tree/main/.agents/skills/repository-guide
Command: npx skills add https://github.com/WP-Coaching/pellegrims.coach --skill repository-guide-wp-coaching

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Developers joining or working in the pellegrims.coach codebase need a single reference for project structure, build commands, coding conventions, and CMS architecture without digging through scattered config files. ## Core Features & Use Cases - Project Orientation: Maps the src/ directory layout, including App Router route groups (site) and (payload), collections, components, and i18n utilities. - Command Reference: Lists npm scripts for development, builds, Payload type generation, migrations, seeding, linting, and Playwright E2E tests. - Architecture Guidance: Explains the Payload CMS 3 integration with SQLite/libSQL, the dual i18n system (en, nl), and the Expand-and-Contract database migration pattern. - Use Case: A developer adding a new Payload collection uses this guide to follow naming conventions, run npm run generate:types, and create a migration safely. ## Quick Start Ask the AI to explain the project structure and the correct commands for adding a new Payload collection in this repository.

Frequently Asked Questions about repository-guide

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a new collection in Payload CMS?

Define the collection in `src/collections/`, then run `npm run generate:types` to update `payload-types.ts` for type-safe CMS interactions. For schema changes, create a migration with `npm run generate:migration` and apply it using `npm run migrate`.

How do I run end-to-end tests with Playwright?

Run `npm run test:e2e` for headless execution of tests in `tests/*.spec.ts`. Use `npm run test:e2e:headed` to watch the browser or `npm run test:e2e:ui` for Playwright's interactive UI mode.

Does Payload CMS work with SQLite in production?

The project uses SQLite via `@libsql/client` and `@payloadcms/db-sqlite`, supporting local SQLite files or remote Turso/libSQL databases through `DATABASE_URI`. If unset, development defaults to a local `./payload-local.db` file.

What is the Expand and Contract migration pattern?

It is a database change strategy that avoids breaking production: first add new columns or tables and deploy, then backfill data, and finally remove old structures only after code stops using them. This project requires it for all database changes.

How does internationalization work in a Next.js App Router site?

This project uses a dual i18n approach with translations in `src/lib/translations/`, a `getTranslations()` helper for server-side rendering, and `TranslationContext` for client-side locale switching between `en` and `nl`.