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
+39 -4
View File
@@ -16,11 +16,24 @@ import { pageLink, tx } from './lib'
const blocks = libraryBlockSlugs(blockOptions)
export async function seedBaseGlobals(seed: Seeder) {
await seed.fillGlobal('company', { email: '[TO FILL: e-mail that receives form submissions]', name: '[TO FILL: company name]' })
// the inbox and the name come from the starter's answers (AGENTS.md → Project decisions)
await seed.fillGlobal('company', { email: '[email protected]', name: 'Example Studio' })
await seed.fillGlobal('site-settings', {
// @starter:if themeToggle
allowThemeToggle: true,
// @starter:else
//: allowThemeToggle: false,
// @starter:endif
// @starter:if defaultLight
//: defaultTheme: 'light',
// @starter:endif
// @starter:if defaultDark
//: defaultTheme: 'dark',
// @starter:endif
// @starter:if defaultSystem
defaultTheme: 'system',
siteName: '[TO FILL: site name]',
// @starter:endif
siteName: 'Example Studio',
themeToggleLabel: tx('Tryb ciemny', 'Dark mode'),
})
}
@@ -32,7 +45,9 @@ export async function seedBasePages(seed: Seeder) {
pageTemplates.services({ blocks }),
pageTemplates.contact({ blocks, form: { $form: 'Contact form' } }),
// The archive page lists its entries with an entry list block (the editor decides where)
// @starter:if posts
pageTemplates.blogIndex({ blocks, layout: (b) => [b[0], { blockType: 'entryList', entryCollection: 'posts', limit: 9, mode: 'latest', variant: 'cards' }, ...b.slice(1)] }),
// @starter:endif
pageTemplates.legal('privacyPolicy', { blocks }),
pageTemplates.legal('termsOfService', { blocks }),
pageTemplates.cookiePolicy({ blocks }),
@@ -44,15 +59,35 @@ export async function seedBaseNavigation(seed: Seeder) {
const link = (label: { en: string; pl: string }, slug: string) => ({ link: { label, page: { $page: slug }, type: 'internal' } })
await seed.fillGlobal('site-settings', {
...systemPageRefs({ cookiePolicy: 'polityka-cookies', homepage: 'start', notFound: 'nie-znaleziono', privacyPolicy: 'polityka-prywatnosci', termsOfService: 'regulamin' }),
// @starter:if posts
postsArchive: { $page: 'blog' },
// @starter:endif
})
await seed.fillGlobal('header', {
links: [pageLink(tx('Kontakt', 'Contact'), 'kontakt')],
menuLabel: tx('Menu', 'Menu'),
navItems: [link(tx('O nas', 'About'), 'o-nas'), link(tx('Usługi', 'Services'), 'uslugi'), link(tx('Blog', 'Blog'), 'blog'), link(tx('Kontakt', 'Contact'), 'kontakt')],
navItems: [
link(tx('O nas', 'About'), 'o-nas'),
link(tx('Usługi', 'Services'), 'uslugi'),
// @starter:if posts
link(tx('Blog', 'Blog'), 'blog'),
// @starter:endif
link(tx('Kontakt', 'Contact'), 'kontakt'),
],
})
await seed.fillGlobal('footer', {
columns: [{ heading: tx('Strona', 'Site'), items: [link(tx('O nas', 'About'), 'o-nas'), link(tx('Usługi', 'Services'), 'uslugi'), link(tx('Blog', 'Blog'), 'blog')] }],
columns: [
{
heading: tx('Strona', 'Site'),
items: [
link(tx('O nas', 'About'), 'o-nas'),
link(tx('Usługi', 'Services'), 'uslugi'),
// @starter:if posts
link(tx('Blog', 'Blog'), 'blog'),
// @starter:endif
],
},
],
})
}