Project starter: ipal-kit create <domain> generates a new site from the reference site

- bin `ipal-kit` (subcommand `create`): the architecture questions (or --answers JSON),
  rendering from reference/ through starter.manifest.json (placeholders, @starter:if variants,
  //: alternatives, demo dropped), answers into AGENTS.md "Project decisions" and ipal-doctor.json,
  local .env with a fresh PAYLOAD_SECRET, install from the shipped lockfile, ipal-skills,
  ipal-tokens, generate:types/importmap, typecheck, ipal-doctor when shipped, secret check,
  first commit
- @intecion/ipal-kit/starter: the building blocks (renderSite, validateAnswers, applyVariants,
  collectBundle, lockfileWithoutPlugin, secretFindings …)
- build:starter packs reference/ into dist/starter/template.json.gz (90 KB);
  starter:gate in prepublishOnly: site from the packed tarball, frozen install, seed, build,
  targeted SEED_ONLY seed in production mode, full seed refused, pnpm start checks
- D15: plugin dependencies pinned exactly (nodemailer 10.3.1)
- reference/: @starter:if markers (runs as before), manifest generate/variants/rewrite
- docs: project-starter.md, AGENT.md, ipal-setup, ipal-site, ipal-reference (+ api.md),
  README, PROGRAMISTA §2, CHANGELOG, docs/README, reference index

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Radosław Smoliński
2026-10-29 15:50:44 +01:00
co-authored by Claude Opus 5.5
parent 154049662e
commit 804a09efed
43 changed files with 2902 additions and 99 deletions
+15 -1
View File
@@ -66,7 +66,21 @@ propose a concrete choice and get a yes before you build it.
## 1. Installation
**Steps.** Scaffold: `npx create-payload-app@latest <project>` (Blank, Postgres/Mongo), delete the starter
**New site: `ipal-kit create` does stages 1–10 in one command** (`node_modules/@intecion/ipal-kit/docs/project-starter.md`).
After stage 0, write the answers as JSON (shape `StarterAnswers` from `@intecion/ipal-kit/starter`) and run, from the
folder that will hold the project (needs the `@intecion` registry line in `~/.npmrc`):
```bash
pnpm --config.auto-install-peers=false dlx @intecion/ipal-kit@<version> create <domain> --answers answers.json
```
It generates the site from the reference site, writes `.env` (fresh `PAYLOAD_SECRET`), installs from the shipped
lockfile, runs `ipal-skills`, `ipal-tokens`, `generate:types`, `generate:importmap`, `typecheck` (and `ipal-doctor
--strict` when shipped), checks for secrets and makes the first commit. **Check:** `git log --oneline` = 1 commit,
`git status` clean, `AGENTS.md` → "Project decisions" holds every answer, `pnpm typecheck` passes. Then go to stage 11.
**Turn off / override:** it refuses another default language than `pl`, sites without `en`, URLs without a prefix and
Postgres — use the stages below; every generated file is the project's own afterwards. The stages below are also the
path for an existing project.
**Steps (manual path).** Scaffold: `npx create-payload-app@latest <project>` (Blank, Postgres/Mongo), delete the starter
`src/app/(frontend)/layout.tsx` and `page.tsx` (the frontend root becomes `[locale]/layout.tsx`). Do not create
`middleware.ts` (Next 16 = `proxy.ts`; delete an existing one). Never install from git (`git+https://…`).
```ini