reference/ (not shipped, own lockfile, plugin as file:..) builds a complete site
on the plugin; docs/agent/reference-site/INDEX.md (shipped) maps features to its
files, with a test; AGENT.md and skill pointers, PROGRAMISTA §8.1b, a Gitea CI job
that builds, seeds and smoke-tests it. Checked here: plugin gate green; reference
seed, next build (SSG) and 15/15 Playwright smoke tests on a throwaway MongoDB.
Merge addition: CHANGELOG Unreleased line for the reference site index.
Status: **design approved.** The owner decided D1–D10 on 2026-10-29 (§10): D3 was revised to the team's
existing deploy process (no Dockerfile), D9 no longer applies, and D10 is MongoDB only. All four sibling
tracks have answered, and their designs are folded in. Nothing is built yet: building starts when the
coordinator confirms all five designs (starter, doctor, blocks, tokens, reference site) are in and
consistent.
Branch: `claude/reference-site-57ce26`. Written 2026-10-29 against ipal-kit 1.14.6.
## 1. What it is
The reference site is one complete, realistic client site built on `@intecion/ipal-kit`. It uses every
convention in `docs/agent/AGENT.md`. It is updated in the same change as each plugin release, so it is
never behind. It has three jobs:
1. **Agents copy from it.** When AGENT.md or a skill says "do X", there is a working file that does X.
2. **The project starter is generated from it.**`ipal-kit create` = the reference site minus its demo
content (§6).
3. **It is the plugin's real-world test.** CI builds it, runs `ipal-doctor` on it and runs smoke tests
against it (§7). If a release breaks a real site, the release fails here first.
The site belongs to a made-up company, so it never contains real client data (§5).
## 2. Where it lives
### Options
| | A. Grow `dev/` into it | B. Separate repository | C. A folder in the plugin, not shipped |
|---|---|---|---|
| Plugin tests | `dev/` exists to test edge cases: SQLite, `twoFactor: false`, crawl on, a test email adapter, odd configs. A real site needs the opposite: 2FA on, a real email transport, the real DB. One app can't be both. Tests get slower and flakier. | Not affected | Not affected: `dev/` stays the test sandbox |
| Staying current | Same commit as the plugin | Lags behind. It needs a published version, a bump PR and a second CI. It drifts. | **Same commit as the plugin.** It uses the plugin through `link:..`, so a breaking change fails CI in the same PR. |
| Starter source | Messy: test-only config would leak into new sites | Clean, but the starter must fetch another repo | Clean: the starter copies one folder |
| Shipped in npm | `dev/` isn't shipped | — | Not shipped: `files` is `dist`, `docs`, `bin` |
| Agents in a client project | Can't see it | Need access to the repo | **Can't see it by default** (not in `node_modules`). Fixed with a pointer (§8). |
### Recommendation: C — `reference/` in the plugin repo
```
ipal-kit/
src/ dist/ docs/ bin/ # the plugin (shipped)
dev/ # test sandbox (unchanged; used by vitest and playwright)
reference/ # the reference site (NOT shipped)
services/cookie-crawler/
```
- `reference/package.json` depends on `"@intecion/ipal-kit": "link:.."` in the repo. The starter
rewrites this to the released version (`"1.15.0"`, pinned exactly, as on the live sites).
- Install it with its own lockfile: `pnpm --dir reference install --ignore-workspace`. The repo has no
pnpm workspace today, so the plugin's install and lockfile don't change.
- It is a normal project: `src/`, `AGENTS.md`, `.env.example`, `docs/DEPLOY.md`, its own `README.md`.
No Dockerfile (D3).
`reference/` is the project root, so a file's path in `reference/` equals its path in a client project.
- **How agents reach it** (C's one gap): the docs ship a generated **file index with excerpts**
(`docs/agent/reference-site/INDEX.md`, §8). The full tree is at
`https://git.intecion.net/IntecionSoftware/ipal-kit/src/tag/v<version>/reference`, one URL per release
tag. The doc pages link to the file for their module.
Why not grow `dev/`: `dev/` is tuned for fast unit and integration tests. It turns 2FA off, uses SQLite
and has a single test page. Turning it into a showcase would make the plugin's own test suite slower
and would mix test hacks into code that agents copy. Keep both: **`dev/` tests the plugin, `reference/`
shows how a project uses it.** The e2e smoke tests move to `reference/` (§7). `dev/e2e.spec.ts` keeps
its admin-logo test.
## 3. Stack and conventions (copies the live sites, decisions in §10)
| | Reference site | Why |
|---|---|---|
| DB | **MongoDB only** (`@payloadcms/db-mongodb`): a local Mongo in dev, a separate Coolify MongoDB resource in production, a service container in CI | All 7 live sites use Mongo. **D2 + D10, accepted.** The adapter sits alone in `src/db.ts`, so a future Postgres client is one file, but v1 ships no Postgres files. |
| DB name | `example-studiopl_dev` locally, `example-studiopl_prod` in Coolify | the plugin's `databaseNamesFor()` (on `main` since 0ed3898): domain without dots, hyphens kept, + `_dev`/`_prod`. Never hand-written. |
| Next / Payload | Same versions as the plugin's devDependencies (Next 16.4.3, Payload 3.90.2) | One supported set per release |
| Styling | Tailwind 4 + the token standard (track "design tokens") | |
| Media | Local in dev, R2 (`@payloadcms/storage-s3`) in prod, through env | AGENT.md §0b |
| Email | `IPAL_*` transport env; in dev, a local mail catcher of the developer's choice; in CI, a Mailpit service container that the smoke test reads | Forms are tested end to end without a real inbox |
| `Usługi` / Services + 3 service pages | Archive vs detail template, `Service` JSON-LD |
| `Realizacje` / Case studies (collection with URLs) | `content.collections` archive + detail, gallery with the **lightbox** |
| Blog (collection `posts`) | Archive with pagination, post template, table of contents, author/date, `Article` JSON-LD |
| `Kontakt` / Contact | Contact form, opening hours, map/address from Company |
| `Wycena` / Quote | Multi-step form (the current `dev/` form, moved here) |
| `Polityka prywatności`, `Polityka cookies`, `Regulamin` | `privacyPolicy` / `cookiePolicy` / `termsOfService` roles; the cookie list comes from the scan |
| 404 | `notFound` role, `createNotFoundPage` |
| **`Bloki` / Blocks** (showcase) | Every block × every `variant` on one page, `noindex`. Each block appears at least once on the **inverted** background (and muted), which tests the token re-mapping inside inverse sections. The place to see the whole library. Phase-2 blocks (video, tabs, map, cookieTable, comparisonTable) are added when they ship. |
| **Design** (styleguide) | Every token: colours, type scale, spacing, radius, shadows, in light and dark side by side; `noindex` |
| Maintenance | Construction mode (toggle documented, off by default) |
Globals: Header (with a mobile menu), Footer, Company (NAP, NIP placeholder, socials), Site settings
(name, description, logo, favicon, OG image, theme, search engines, system pages).
### 4.3 Design tokens, light and dark
- Tokens from the token standard only (draft in `docs/dev/design-tokens-proposal.md` on
`claude/design-tokens-95806d`). The plugin exports `@intecion/ipal-kit/tokens.css` (neutral
defaults: light in `:root`, dark in `[data-theme=dark]`) and `@intecion/ipal-kit/tailwind.css` (a
Tailwind 4 `@theme inline` map plus the dark variant). Components use utilities such as `bg-surface`,
`text-fg`, `py-section` and `rounded-card`. No hex, no `dark:` for colours (they flip on their own),
and no raw size in any component (the doctor checks this).
- The project overrides only `src/design/tokens.css`, generated from `src/design/tokens.ts` by
`ipal-tokens` (the TS source is still the tokens track's open decision). It overrides the brand layer:
primary, secondary, accent, bg, fonts through next/font `--font-family-body` / `--font-family-heading`, and radius.
The files are built on `claude/design-tokens-build` (9511b12): `tokens.css`, `tailwind.css`, `a11y.css` and the `@intecion/ipal-kit/tokens` entry. The reference site imports them from the plugin and vendors nothing.
- The `/design` page lists the tokens from the token list the plugin exports, and shows the dark side in a
`data-theme="dark"` wrapper.
- Theme switcher + `Site settings → Theme` (theme.md), no flash of the wrong theme. Both themes appear
in the smoke test's screenshots.
- `DESIGN.md` in the project root describes the made-up brand. It shows what a real project's
`DESIGN.md` should contain.
### 4.4 Forms, email, consent, cookies
- Contact + quote forms seeded with `ipal-form` templates: an email to the company **and** a
confirmation to the customer, in both languages; `createSubmitAction`; Turnstile (test keys in dev
and CI); rate limit.
- `CookieBanner` with detailed settings and consent log (`consentLog: true`); GTM/GA4/Meta Pixel wired
but **off** until IDs are entered (placeholder IDs only in an `.env.example` comment).
- Cookie scanner with `crawl: true` pointed at `services/cookie-crawler` (run on its own in dev; a service container in CI);
the seeded cookie list is in the **approved** state, plus one pending sample, so the review/approve
flow can be tried in the panel.
### 4.5 SEO and GEO
- `generatePageMetadata`, hreflang, canonical from `NEXT_PUBLIC_SERVER_URL`.
- `sitemap.xml`, `robots.ts` (AI crawler policy from the panel), `llms.txt`, `llms-full.txt`,
Dependencies: phase 3 needs the block library and tokens merged; phase 6 needs the doctor CLI; phase 7
needs the starter. Phases 1–2 and 4–5 can start right away.
## 10. Decisions (all made by the owner, 2026-10-29)
| # | Decision | Accepted |
|---|---|---|
| D1 | Where it lives | **C: `reference/` in the plugin repo, not shipped**; `dev/` stays the test sandbox |
| D2 | Database of the reference site (and so the starter default) | **MongoDB**: all 7 live sites use it. The plugin's Postgres support stays tested by `dev/` + vitest. |
| D3 | Deploy style for every new site | **Revised by the owner: the team's existing process.** Build and check locally; Coolify builds and runs the app from the repo (no Dockerfile); MongoDB is a separate Coolify resource on the same Docker network; targeted seeds run from the app container's Terminal (§4.8). The first answer (a standalone Dockerfile) is withdrawn. |
| D4 | CI cost | Fast part on every PR; full job (start, seed, doctor, Playwright, starter) on `main` and before each release |
| D5 | Does the starter keep the `/design` styleguide page? | **Yes**, `noindex`; it helps the designer of each new site. Drop the Blocks showcase. |
| D6 | Source of truth with the starter | **Reference site is the source**, starter generated by manifest (agreed with the starter session, confirmed by the owner) |
| D7 | Made-up company | `Pracownia Przykład` / "Example Studio" (architecture studio): services, case studies, blog |
| D8 | Is the reference site deployed anywhere? | Optional: a Coolify app at `reference.<internal domain>` with `noindex`, redeployed per release. Useful for showing clients; not required. |
| D9 | Dockerfile image type | **Doesn't apply**: there is no Dockerfile (D3 revised) |
| D10 | Postgres in v1 (= starter D12) | **MongoDB only.** No Postgres files or `--db postgres` in v1 |
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.