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:
co-authored by
Claude Opus 5.5
parent
154049662e
commit
804a09efed
@@ -9,12 +9,36 @@ import {
|
||||
} from '@intecion/ipal-kit'
|
||||
import { withPayload } from '@payloadcms/next/withPayload'
|
||||
|
||||
// @starter:if enforceCsp
|
||||
// CSP enforced: the reference site is the example after the report-only phase (security.md → "ROLL OUT CSP").
|
||||
// Flags = what the site loads: Turnstile on forms, Google analytics/GTM when IDs are set in Site integrations.
|
||||
const csp = { mode: 'enforce', r2Url: process.env.R2_PUBLIC_URL, reportUri: '/api/csp-report' } as const
|
||||
// @starter:else
|
||||
//: // CSP step 1: report-only. Read the [csp] lines in the logs, add a flag or `extra` per report, then switch to
|
||||
//: // mode: 'enforce' (security.md → "ROLL OUT CSP"; ipal-doctor.json silences the report-only finding until then).
|
||||
//: const csp = { mode: 'report-only', r2Url: process.env.R2_PUBLIC_URL, reportUri: '/api/csp-report' } as const
|
||||
// @starter:endif
|
||||
|
||||
// Flags = what the site loads: Turnstile on forms, the analytics tools whose IDs are set in Site integrations.
|
||||
const securityHeaders = buildSecurityHeaders({
|
||||
csp: { ...csp, analytics: true, turnstile: true },
|
||||
csp: {
|
||||
...csp,
|
||||
// @starter:if analytics
|
||||
analytics: true,
|
||||
// @starter:endif
|
||||
// @starter:if metaPixel
|
||||
//: metaPixel: true,
|
||||
// @starter:endif
|
||||
// @starter:if linkedIn
|
||||
//: linkedIn: true,
|
||||
// @starter:endif
|
||||
// @starter:if tiktok
|
||||
//: tiktok: true,
|
||||
// @starter:endif
|
||||
// @starter:if clarity
|
||||
//: clarity: true,
|
||||
// @starter:endif
|
||||
turnstile: true,
|
||||
},
|
||||
hsts: process.env.NODE_ENV === 'production',
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user