Files
ipal-kit/docs/agent/skills/ipal-setup/SKILL.md
T
Radosław SmolińskiandClaude Opus 5.5 6b4336f961 Detailed cookie settings window (CookieBanner settings="detailed")
A third settings mode next to 'inline' and 'modal': a large dialog where every consent
category is a card with its on/off control, description and an expandable list of the
cookies it covers (name, provider, purpose, duration), taken from Cookie Settings → Cookies
— the same rows as <CookieTable>. The developer picks the mode with one prop; the
component default stays 'inline', so existing sites are unchanged.

Cookie Settings gets a localized detailLabels group (list labels, English fallback);
getConsentTexts passes texts.cookies and texts.details, sharing the row mapping with
getCookieTable. New classNames slots and data-ipal handles for the cards and lists.

Docs for devs and agents: consent.md (modes compared, which to pick — new projects default
to 'detailed' when the cookie list is filled), AGENT.md, PROGRAMISTA §2.8/§2.11/§6, skills
ipal-setup, ipal-site, ipal-upgrade, ipal-locale-add, ipal-consent-check. Postgres/SQLite
projects need migrate:create for the new fields.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-21 18:16:30 +02:00

66 lines
5.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
name: ipal-setup
description: Sets up a new client project on Payload 3 + Next 16 + @intecion/ipal-kit from an empty folder with the full mandatory feature set (AGENT.md §0b) — registry and dependencies, version overrides, i18n config, payload.config with ipalKit (2FA injected, white-label, forms, mailAdapter, R2 storage), core collections, design tokens, UI primitives, proxy with Markdown negotiation, layout with JSON-LD, Turnstile and consent, catch-all page, SEO routes, GEO routes (llms.txt, llms-full.txt, Markdown, MCP), security headers, env validation. Use when starting a new website project or when a project is missing its ipal-kit foundation.
---
# ipal-setup
**Cel: OBOWIĄZKOWY KOMPLET z AGENT.md §0b — wszystkie 18 pozycji.** Wszystko
sprawdza etap 11; nie kończysz z brakami (chyba że `ipal-audit-skip` z decyzji klienta).
Kod i szczegóły: `node_modules/@intecion/ipal-kit/docs/dev/PROGRAMISTA.md` §1–2
(przed instalacją pakietu: poproś użytkownika o ten plik albo działaj wg kroków
poniżej i doczytaj po `pnpm add`). Reguły: `docs/agent/AGENT.md`.
**Jeden etap = jeden commit.** Nie czekasz na OK między etapami (AGENT.md §0a) —
pytania o brakujące dane zbierasz w jedną listę na początku; tryb „krok po kroku”
tylko, gdy użytkownik o to poprosi. Pełna budowa strony: skill **ipal-site**.
1. **Instalacja** — `.npmrc` (`@intecion:registry=…`, `legacy-peer-deps=true`),
`pnpm add @intecion/ipal-kit` + zależności z PROGRAMISTA §1 **razem z
`@payloadcms/storage-s3` i `@clocklimited/payload-2fa`**, `pnpm.overrides`
na wersję `payload` dla wszystkich `@payloadcms/*`, build z `--webpack`.
Nigdy instalacja z gita. Nie twórz `middleware.ts`.
2. **Skille i AGENTS.md** — skopiuj skille (AGENT.md §14), w `tsconfig.json` `"exclude": ["node_modules", ".agents"]`, utwórz `AGENTS.md`
wg AGENT.md §13 z danymi od użytkownika (zapytaj o: klient, domena, rynek,
języki, dane R2, klucze Turnstile, SMTP/Graph).
3. **Konfiguracja** — `src/i18n.config.ts` (`as const satisfies I18nConfig`),
`payload.config.ts` wg PROGRAMISTA §2.3: `twoFactor` z **wstrzykniętym**
`payloadTotp`, `whiteLabel: true`, `email: mailAdapter()`, `forms: {…}`,
**`buildR2Storage(['media'], { s3Storage })` zawsze** (bez `R2_*` w dev = dysk lokalny),
`indexNow: true`, `consentLog: true`.
`.env.example` z `R2_*`, `IPAL_IP_HEADER`, `NEXT_PUBLIC_SERVER_URL`, `IPAL_NOINDEX` (puste; `1` na stagingu).
4. **Rdzeń** — wspólne pola i prymitywy (`../ipal-block/resources/kod-sekcji.md`), `Pages` (z `buildSummaryField()` — GEO), `Media`
z `focalPoint: true`, `normalizeFilenameHook`, `buildOptimizeUploadHook`/`buildOptimizeUploadField`,
`buildMediaPlaceholderHook`/`buildMediaPlaceholderField`; prymityw `Media` przez `mediaImageProps`/`videoProps`
(PROGRAMISTA §2.4, storage.md). Żadnych innych kolekcji (`users` wstrzykuje plugin).
5. **Style** — `styles.css` z `@theme` z `DESIGN.md` (jeśli brak — zapytaj o
Impeccable albo załóż neutralne tokeny), `fluid.css` lub `fluid-wide.css` (AGENT §6.11a), fonty
przez `next/font` z `latin-ext`, `@source` na plugin (AGENT.md §6.11, przykład w `../ipal-block/resources/kod-sekcji.md`).
6. **Routing** — `proxy.ts` (`createProxy(i18nConfig, { NextResponse, markdown: true })`), `lib/content.ts`
(`createContentHelpers` z `markdownAlternate: true`, `summaryField`, `mcp` — PROGRAMISTA §2.7),
layout bez `<head>`: `<SiteProviders shell={await getSiteShell(locale)} logEndpoint banner={<CookieBanner equalChoice settings="detailed" />}>`
(tryb okna ustawień `inline` / `modal` / `detailed` wg designu — consent.md),
catch-all: `createPageRoute(content, { blocks, notFound, permanentRedirect, blockProps })` + literał `revalidate`,
`not-found.tsx`: `createNotFoundPage(content, { load: loadNotFoundView })` + `notFoundView.ts` z
`renderNotFoundView` (PROGRAMISTA §2.6–2.8, pages.md).
7. **SEO i bezpieczeństwo** — sitemap, robots, manifest, health jako re-eksporty z `lib/content`
(`sitemapRoute`, `robots`, `manifest`, `healthRoute`; z `force-dynamic` poza robots; bez CSS w `public/`), `htmlLimitedBots`, `buildSecurityHeaders`, `buildUploadSecurityHeaders`,
`images: buildImagesConfig()`,
`instrumentation.ts` z `assertEnv(ipalEnvRules({ storage: true, ipHeader: true }))` z `@intecion/ipal-kit/env` (PROGRAMISTA §2.8–2.9, env.md).
8. **GEO (obowiązkowe)** — re-eksporty z `lib/content`: `llms.txt` (`llmsRoute`), `llms-full.txt`
(`llmsFullRoute`), `md/[locale]/[[...slug]]/route.ts` (`markdownRoute`), `api/mcp/route.ts`
(`mcpGET`/`mcpPOST`, publiczny), `indexnow-key.txt/route.ts` (`indexNowKeyRoute`); robots
wpuszcza boty AI (PROGRAMISTA §2.8, AGENT.md §0b.5–8).
9. **Formularze** — skill **ipal-form**: blok z `<RenderForm>`, `formClasses.ts`, `createSubmitAction` raz, każdy formularz z seeda
(mail do firmy + potwierdzenie do klienta). Cookies: skan + import (ipal-consent-check), `<CookieTable>`
na stronie polityki cookies; ta sama lista pokazuje się w oknie `settings="detailed"` (Detail labels w panelu).
10. **Nawigacja** — skill **ipal-nav**.
11. **Kontrola kompletu** — `pnpm generate:types`, `pnpm payload generate:importmap`,
**ipal-audit** (pełny) = 0 błędów, w tym sekcja „missing: …” (§0b); po
`pnpm build && pnpm start` **ipal-seo-check** = 0 błędów (llms, Markdown, MCP, JSON-LD).
Potem lista kroków w panelu dla użytkownika (PROGRAMISTA §2.11) z kluczami
Turnstile i transportem maila.
Dalej: bloki (skill **ipal-block**), kolekcje treści (**ipal-collection**).