Files
ipal-kit/reference/README.md
T
Radosław SmolińskiandClaude Opus 5.5 8adac41f92 Reference site: Example Studio on ipal-kit (reference/), index for agents, CI job
reference/ is one complete client site on the plugin (made-up company, pl/en,
MongoDB, every library block and template, token standard light/dark, forms,
consent, SEO/GEO, enforced CSP, 2FA, base + demo seeds, Coolify runbook,
smoke tests). It uses the plugin as file:.. (injected) and is not shipped.

- docs/agent/reference-site/INDEX.md (generated by scripts/reference-index.mjs,
  kept current by test/referenceIndex.test.ts)
- AGENT.md section and pointers in ipal-site, ipal-setup, ipal-reference,
  ipal-upgrade, ipal-block; release steps in PROGRAMISTA §8.1b
- CI: reference (fast) on every push, reference-full on main; doctor steps
  wired, commented until ipal-doctor ships

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-29 15:17:11 +01:00

40 lines
2.4 KiB
Markdown

# 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.md` in the plugin package).
- **The project starter** (`ipal-kit create`) is generated from this folder; `starter.manifest.json` says 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
```bash
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 && ALLOW_LOCAL_MEDIA=1 PORT=3100 pnpm start`, then
`pnpm payload run e2e/create-test-admin.ts && pnpm test:e2e`.
## 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` |