Staff check (userMeetsRole): the 'no roles field = every account passes' rule applied to the account's own collection, so an account of a second auth collection (customers) passed every staff check. It now applies only to staff collections: the panel's login collection plus the new access.staffCollections. The injected auth collection uses the new adminOrSelfIn(slug), so an account of another collection with the same numeric id is not 'self'. 2FA: @clocklimited/payload-2fa wraps the collections and globals present when it runs; ipalKit's own globals and collections were added later and stayed unwrapped, so a password without the TOTP code opened them over REST and GraphQL. ipal-kit now has its own second-factor check (secondFactorPassed / requireSecondFactor): applied to every collection and global at the end of ipalKit, again in onInit for entities added by plugins listed after it, and inside userMeetsRole and the endpoints that take a project access function. It fails closed: an unrecognised user shape is refused, and startup stops when the injected 2FA plugin lacks the parts the check reads (twoFactor.guard: false opts out). Tests through real HTTP requests (REST and GraphQL) against Payload's route handlers, plus the reference smoke test. Docs, agent guide, skills and the reference skills copy updated; changelog entry without a version. Co-Authored-By: Claude Fable 5.2 <[email protected]>
Example Studio — the ipal-kit reference site
One complete client site on @intecion/ipal-kit that uses every convention in docs/agent/AGENT.md, kept
current with each plugin release. The company, people, numbers and texts are made up; example-studio.pl
is a placeholder domain.
- Agents copy patterns from here (index:
docs/agent/reference-site/INDEX.mdin the plugin package). - The project starter (
ipal-kit create) is generated from this folder;starter.manifest.jsonsays what it keeps, drops or turns into placeholders. - The plugin's CI builds it, seeds it and runs the smoke tests on every change (
.gitea/workflows/ci.yml).
Run it locally
pnpm --dir .. build # the plugin's dist (this site uses it as file:.., injected)
pnpm install --ignore-workspace # re-run after every plugin build (refreshes the injected copy)
cp .env.example .env # then fill PAYLOAD_SECRET; DATABASE_URI points at a local MongoDB
pnpm seed # demo + base content, every language
pnpm dev # http://localhost:3000/pl
Production check: pnpm build && pnpm payload run e2e/create-test-admin.ts && ALLOW_LOCAL_MEDIA=1 pnpm test:e2e
(Playwright starts the built site on port 3100 itself; another port: E2E_BASE_URL=http://localhost:3200, built with
the same NEXT_PUBLIC_SERVER_URL; a server you started yourself: E2E_REUSE_SERVER=1).
What is where
| Convention | Files |
|---|---|
| Languages | src/i18n.config.ts, src/proxy.ts |
| Data layer | src/lib/content.ts, src/lib/globals.ts |
| Pages, collections, globals | src/collections/, src/globals/, src/content.config.ts |
| Block library | src/blocks/configs.ts, src/blocks/registry.ts |
| Design tokens | src/design/tokens.ts → src/design/tokens.css, src/app/(frontend)/styles.css, DESIGN.md, /design |
| Layout, header, footer | src/app/(frontend)/[locale]/layout.tsx, src/components/layout/ |
| Routes, 404, forms action | src/app/(frontend)/[locale]/ |
| SEO / GEO / ops routes | src/app/sitemap.xml, robots.ts, manifest.ts, llms*.txt, md/, api/mcp, api/health, api/csp-report, indexnow-key.txt |
| Security headers, CSP | next.config.ts |
| Env validation | src/instrumentation.ts, .env.example |
| Seeds | src/seed/ (base.ts kept by the starter, demo.ts + showcase.ts + media.ts dropped) |
| Deploy | docs/DEPLOY.md |
| Smoke tests | e2e/, playwright.config.ts |
| Project decisions | AGENTS.md |