Syncing Boilerplate New Features
The synchronization steps described in this document apply to project upgrades managed via Git repositories. When using the boilerplate and wanting to upgrade to specific version features, refer to this document.
This document uses upgrading from any NEXTY.DEV 3.x version to version 3.2.10 as an example to demonstrate how to sync boilerplate new features.
NEXTY.DEV v3.2.10 upgraded the user management infrastructure with these new features:
- Email OTP login
- Login rate limiting
- User source information tracking
These features enable better user source and attribution analysis. Recommended for developers using 3.x versions to upgrade.
Upgrade Steps
- Create a new branch
git checkout -b upgrade/3.2.10- Backup database
If the features you're upgrading affect database design, backup your database first or prepare a new database for testing.
Version 3.2.10 upgrade only adds one new table without affecting existing database structure, so this step isn't necessary.
- Add upstream remote repository
git remote add upstream "https://github.com/wenextdev/nexty.dev.git" 2>/dev/null || true
git fetch upstream --tags- Select commits to merge
By reviewing the boilerplate commit history, the commits related to 3.2.10 version features are 2fb2b25 fe305c1 a3852c6 7e117cd eeb9c48 72c6f45 66079b8.
Now use the cherry-pick command to merge these commits.
git cherry-pick 2fb2b25 fe305c1 a3852c6 7e117cd eeb9c48 72c6f45 66079b8You may encounter conflicts in this step. Resolve conflict files according to the "Source Control" panel on the left side of Cursor.
Important Note
If you encounter conflicts with database migration files, keep your own migration files and don't use the boilerplate's migration files:
lib/db/migrations/meta/,lib/db/migrations/00xx_xxxxxxx.sqlare all generated by yourselflib/db/migrations/meta/_journal.jsonshould not contain any records from boilerplate migration files
After resolving conflicts, continue with the command:
git add -A
git cherry-pick --continueRun git status to check the status. If it shows "Cherry-pick currently in progress", it means it's not complete. Continue executing git cherry-pick --continue until synchronization is complete.

- Install dependencies
pnpm install- Modify environment variables
Version 3.2.10 adds the environment variable NEXT_PUBLIC_USER_SOURCE_TRACKING_ENABLED. Set to true to enable user source information tracking, set to false to disable.
NEXT_PUBLIC_USER_SOURCE_TRACKING_ENABLED="true"Remember to modify the production environment variable as well, otherwise it won't take effect in production.
- Migrate database
Before executing migration commands, confirm that lib/db/migrations/meta/, lib/db/migrations/00xx_xxxxxxx.sql are all generated by yourself, and lib/db/migrations/meta/_journal.json doesn't contain any records from boilerplate migration files.
If you merged these files with boilerplate records in the previous steps, you need to have AI help you revert these file versions.
After confirming everything is correct, execute the migration commands:
npm run db:generate
npm run db:migrate- Local verification and deployment
npm run devAfter confirming the features work correctly, merge to the main branch and push code to the remote repository for deployment.
- Update production database
If you used a test database during the upgrade process, you still need to execute migration commands for the production environment database, same as step 7.
Summary
The 3.2.10 version upgrade has minimal impact and maximum benefit. If you're unfamiliar with the upgrade steps, this is a good opportunity to get familiar with the process.
For upgrades to other versions, if you're still unsure how to proceed, you can share this document with AI as a reference and inform AI of your current version and the version you want to upgrade to. AI will review the records and provide you with upgrade steps.