Upgrade and Compatibility
Upgrade and Compatibility
Generated projects are independent source trees. NextDevTpl 4.0.0 does not overwrite or automatically upgrade an existing project. Upgrade by generating a temporary comparison project, reviewing its differences, and merging changes manually in small groups.
Before Upgrading
- Ensure the current project has a recoverable code commit and back up its production database.
- Keep
nextdevtpl.generated.jsonand record the current Node/pnpm versions, target, and service configuration. - Run the existing type, test, build, and deployment health checks to retain a baseline.
- Separately record information omitted from the manifest: remote skin URL, archive SHA-256, secret-store location for access tokens, and local skin directory.
- Record the skin changes, StyleKit palette ID, and app-specific pages and business code.
Generate a 4.0.0 Comparison Project
Read the 3.x nextdevtpl.generated.json and translate its preset, modules, service adapters, and target into 4.0.0 CLI flags. There is no command that reads the old manifest and upgrades or overwrites the existing app.
Full-mode example:
pnpm dlx create-nextdevtpl@4.0.0 ../nextdevtpl-v4-compare \
--preset custom \
--modules auth,dashboard,support \
--target server \
--payment stripe \
--skin ./my-skin \
--no-install --yes
Replace the sample preset, modules, adapters, target, and skin with the current project's choices. Omit --skin for the built-in default. Confirm local or remote skin paths and credentials before running. A palette is supported only with the built-in default skin:
pnpm dlx create-nextdevtpl@4.0.0 ../nextdevtpl-v4-compare \
--preset saas \
--target vercel \
--skin default \
--palette glassmorphism \
--no-install --yes
An older record without a mode field is treated as full mode. For an existing full product, omit --mode or pass --mode full. --mode demo generates a separate presentation app and is not a replacement for a production app.
Review and Merge
Generate into a temporary directory and compare:
nextdevtpl.generated.json, including its newmode, skin source/digest, and optional palette record.- The
src/skin/directory,skin.jsoncompatibility range, 20 view entries, and base-component overrides. src/core/skin/view contracts, fixed page exports, and in-memory runtime boundary.- The single plan catalog in
src/core/plans/and the full-mode payment configuration mapping. src/features/*/view/contracts.tsand skin pages; move app-specific view changes into the skin without depending on privatesrc/core/skin/demo/implementations.package.json, lockfile,messages/, environment examples,drizzle/schema, and deployment files.- Project-owned pages, views, actions, services, migrations, and business rules.
Port custom pages and components into skin views first, then merge the original business modules and adapters. Do not treat template repository paths, the M6 draft directory, or demo-only controllers as generated runtime dependencies. Remote skin URLs are omitted from generated manifests; recover them from the source information saved by your team.
Database and Verification
Compare the Drizzle schema and migrations in the 4.0.0 project with the current app. Merge only required migrations. Generate, review, and apply forward migrations in a test database first; schedule the production change only after verifying its data results. Do not rewrite migrations that have already run in production or run generation over the existing project.
At minimum, verify strict type checking, project tests, production build, auth and core business flows, selected service adapters, and deployment health. Database configuration and migrations belong to full mode; demo exports require neither a database nor business environment variables.
Rollback
Return app code to the pre-upgrade commit. Repair database migrations already applied in production with a separately reviewed forward migration instead of deleting history or rolling back committed data. Restore deployment variables and external service configuration from the change record.
See the Generator Guide and Skin Authoring for skin flags and demo boundaries. The repository upgrade guide covers source-level comparison.