Fork checklist — new product from the platform
Reusable (prefer dependency, not copy)
- OpenAPI fragments + merge pipeline patterns from prego-zuplo
- Worker skeleton (Hono, auth middleware, tenant context) from prego_ai
@platform/platform-trust(X-Internal-Sig contract) inPrego/packages/platform-trust, vendored intoprego-zuploandprego_aiaspackages/platform-trust. WithPregocloned beside those repos, refresh vendors viapnpm run sync:platform-trust(ornpm run sync:platform-trustin prego_ai).- Documentation spine under Prego/docs
platform/andcontracts/
Configurable (per environment)
- Cloudflare account IDs, zone names, Worker names
- Zuplo environment variables and upstream URLs
INTERNAL_SECRET, JWT issuers, Stripe keys- Frappe site ↔
tenant_idmapping in control-plane
Copied per product
- Product-specific OpenAPI fragments and route modules
- Domain Frappe app (or separate app repo) for that vertical
- Product UI routes and branding in Next.js apps
- Pulumi stack names / Ansible inventory for that product’s infra
Bootstrap order (runbook)
- Pulumi (or equivalent) — core bindings and secrets placeholders
- Ansible — bench / VM provisioning if used
- Control-plane — create tenant row and runtime record
- Zuplo — point upstreams at new Worker/Frappe URLs
- Workers — deploy with secrets; enable
REQUIRE_INTERNAL_SIGwhen ready - Pages — deploy UI with correct public API base URL
Adjust to your stack; document the final order in a single runbook page per product.
Verification
- Tenant isolation test (cross-tenant request must fail)
- OpenAPI merged output matches deployed routes
- prego-zuplo (after
config/*.oas.jsonor merge-list changes): repo rootpnpm run sync-oasthenpnpm run verify;pnpm run verify:portalmatches GitHub CI (adds Zudoku productiondocsbuild). See How to add an API §1. - prego-zuplo Portal
ALLOWED_ORIGINSincludes every browser origin you use (local dev, production,*.pages.devpreviews if applicable). If web apps sendx-trace-id, the active CORS policy’sallowedHeadersmust allow it — see prego-zuplodocs/runbook/and Tenant & trust boundaries. - prego_ai: repo root
npm run install:workersthennpm run test.packages/platform-trustis vendored fromPrego/packages/platform-trust(rsync both gateway and worker repos when the contract changes). Default Actions do not clone privatePrego. - Staging e2e: sign-in → one critical API → optional assistant route if applicable
한국어
재사용은 계약·워커 뼈대·문서 체계를 의존성으로 가져가고, 설정은 계정/시크릿/업스트림 URL, 복사는 제품별 OAS·도메인 앱·UI입니다. 부트스트랩 순서는 한 runbook에 고정합니다. prego-zuplo OAS 변경 후에는 루트에서 sync-oas → verify, CI와 동일 검증은 verify:portal입니다. prego_ai는 루트에서 install:workers → test이며 platform-trust는 모노레포에서 벤더합니다. 브라우저 출처·ALLOWED_ORIGINS·x-trace-id CORS는 prego-zuplo docs/runbook/ 과 테넌트 신뢰 경계를 맞춥니다.