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
+12 -1
View File
@@ -25,7 +25,7 @@ pnpm test:e2e # smoke tests, after `pnpm pay
| Start command | `pnpm start` (`next start` with `--disable-proto=throw`) |
| Port | 3000 — no host port mapping (it disables rolling updates) |
| Health check | `GET /api/health` → 200 (503 without the database) |
| Domains | `https://example-studio.pl,https://www.example-studio.pl`, redirect www → apex (matches `NEXT_PUBLIC_SERVER_URL`) |
| Domains | both hosts: `example-studio.pl` and `www.example-studio.pl` (with `https://`), redirect to the host of `NEXT_PUBLIC_SERVER_URL` |
## 3. The Coolify MongoDB resource
- Same server and Docker network as the app; never exposed publicly.
@@ -33,6 +33,10 @@ pnpm test:e2e # smoke tests, after `pnpm pay
(database name from `databaseNamesFor('example-studio.pl')`; `instrumentation.ts` checks it).
- Scheduled backups to S3/R2, and **Backup now** before every seed or bulk change.
- MongoDB needs no migrations.
<!-- @starter:if !r2 -->
#: - **Media on local disk** (no R2): Coolify → the app → **Persistent Storage** → a volume for the `media` folder
#: (the upload collection's `staticDir`), or every redeploy deletes the uploads (deployment.md §4.8).
<!-- @starter:endif -->
## 4. Environment variables (Coolify → Environment Variables)
| Variable | Build | Runtime | Note |
@@ -40,10 +44,17 @@ pnpm test:e2e # smoke tests, after `pnpm pay
| `DATABASE_URI` | ✓ | ✓ | build prerenders pages from the database |
| `PAYLOAD_SECRET` | ✓ | ✓ | random, ≥ 32 characters |
| `NEXT_PUBLIC_SERVER_URL` | ✓ | ✓ | `https://example-studio.pl` |
<!-- @starter:if r2 -->
| `R2_BUCKET`, `R2_ENDPOINT`, `R2_ACCESS_KEY_ID`, `R2_SECRET_ACCESS_KEY` | | ✓ | required in production |
| `R2_PUBLIC_URL` | ✓ | ✓ | empty = media served by the app |
<!-- @starter:endif -->
<!-- @starter:if graph -->
#: | `GRAPH_TENANT_ID`, `GRAPH_CLIENT_ID`, `GRAPH_CLIENT_SECRET`, `GRAPH_SENDER` | | ✓ | e-mail through Microsoft Graph (all four) |
<!-- @starter:endif -->
| `IPAL_IP_HEADER` | | ✓ | `x-forwarded-for` behind Coolify's proxy (`cf-connecting-ip` behind Cloudflare) |
<!-- @starter:if crawl -->
| `IPAL_COOKIE_SCAN_URL`, `IPAL_COOKIE_SCAN_TOKEN` | | ✓ | the shared cookie-crawler service |
<!-- @starter:endif -->
| `INDEXNOW_KEY` | | ✓ | or generate the key in Site integrations |
| `ALLOW_LOCAL_MEDIA` | — | — | **never set here** (local / CI only) |