TanstackTemplate
Adoption

Adoption Overview

Adoption means creating a second product from this source template while preserving the proven Cloudflare/TanStack shape. Do identity and resource replacement before changing runtime behavior.

Adoption Order

  1. Start from a source commit with current staging evidence:

    pnpm report:release-status
  2. Copy or fork the repository into the downstream product repository.

  3. Create an adoption manifest from the example.

  4. Replace product identity and public positioning.

  5. Replace Cloudflare resource names and IDs.

  6. Recreate secrets in the new GitHub repository and Cloudflare account.

  7. Run the adoption planner and marker scanner.

  8. Deploy to a quick workers.dev staging target.

  9. Add custom domain, GitHub Actions dispatch, production resources, and operator evidence only after quick staging is proven.

Keep

Keep these template boundaries until a second product proves a different need:

  • TanStack Start application structure.
  • Cloudflare Workers, D1, R2, Workers AI, AI Gateway, and scheduled/provider collection shape.
  • Product-local workflow and provider registry.
  • Better Auth account-session pattern.
  • Manual /upgrade request flow and workspace plan-source activation path.
  • Local verification, config doctor, release readiness, and smoke scripts.
  • Public-copy rules that avoid unsupported legal, safety, and provider claims.

Replace

Replace these before any public deploy of a copied product:

  • GitHub organization and repository path.
  • Package slug and package scope.
  • Public product name and public positioning.
  • Landing page copy, proof assets, safety pages, and compliance notes.
  • Worker script names.
  • D1 database names and IDs.
  • R2 source and output bucket names.
  • workers.dev URLs and any custom-domain origins.
  • Smoke base URLs and canary URLs.
  • Landing proof artifact IDs.

Secret names may stay because they describe roles. Secret values must be recreated in the copied Cloudflare account and GitHub repository.

Acceptance Checks

Run these before treating the copied product as a clean template adoption:

pnpm template:plan-adoption -- --manifest template-adoption.local.json
pnpm template:scan-instance-markers -- --fail-on-markers
pnpm verify:local
pnpm doctor:config
pnpm report:release-readiness

The scanner intentionally ignores the adoption guide and its test fixtures in strict mode, so any remaining original marker is a real replacement task.

On this page