feat: registry-driven templates + conformance repoint#25
Merged
Conversation
Replace the hardcoded per-framework generators (react/express) and the per-framework configure step with a registry-driven template source (src/core/templates.ts). The CLI reads registry.json from the seamless-templates monorepo at a pinned ref, builds its prompts from it, downloads the selected templates, and applies each template's template.json env contract. Adding a framework is now a templates-repo change. SEAMLESS_TEMPLATES_DIR scaffolds from a local checkout; SEAMLESS_TEMPLATES_REF pins a different ref.
verify.ts resolves the react-vite web template from a sibling seamless-templates checkout by default; the reusable verify-conformance workflow checks out seamless-templates (templates-ref input) and points SEAMLESS_REACT_DIR at the react-vite subpath. Preserves the auth-contract conformance guarantee against the new template source.
Picks up the templates release that drops the inert per-template conformance workflow, so scaffolded web projects no longer inherit it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Makes the CLI scaffold from the new seamless-templates monorepo via a registry, so adding a framework becomes a data change instead of a code change, and repoints the conformance harness at the monorepo so the auth-contract guarantee is preserved.
Phase 1: registry-driven scaffolding
src/core/templates.ts: opens a template source (local checkout viaSEAMLESS_TEMPLATES_DIR, or the monorepo zipball at the pinnedSEAMLESS_TEMPLATES_REF, downloaded once viaadm-zip), readsregistry.json, reads eachtemplate.json, copies the template in, and applies its env contract resolving{{placeholders}}({{apiToken}},{{jwksKid}},{{secret:N}}, ...). Enforcesrequires.cliMin.projectSetup.ts) are built from the registry (coming-soondisabled,betalabelled);init.tsloops over the selected templates instead ofif (framework === "react").frontend/react.ts,backend/express.ts), the per-frameworkconfigure.ts, and now-unusedrepoUtils.ts.v0.1.1tag) sources produce scaffolds identical to the previous behavior (same files,node_modulesexcluded,.envkeys/values matching the old configure step, fresh 32-byteCOOKIE_SIGNING_KEY).Conformance repoint
seamless verifyresolves thereact-viteweb template from../seamless-templates/templates/web/react-viteby default (still overridable withSEAMLESS_REACT_DIR).verify-conformance.ymlchecks outseamless-templates(inputtemplates-ref) instead of the standalone starter and pointsSEAMLESS_REACT_DIRat the subpath. No compose changes needed.v0.1.1, which drops the inert per-template conformance workflow (it did nothing in the monorepo and leaked into scaffolded projects). A root conformance workflow now lives in seamless-templates.Merge ordering
This PR's updated reusable workflow interface must land on
mainbefore the seamless-templates root conformance workflow (which references@main) goes green. There are no open templates PRs, so the window is contained.Follow-up (not in this PR)
Make
seamless verifyiterate the registry so every web/api template is conformance-tested, not justreact-vite(tracked separately).