Updating the Codebase
How to keep your TanStarter project up to date with the latest repository code
TanStarter is regularly updated with new features, bug fixes, and security patches. This guide explains how to update your project to the latest version.
You can update your codebase to the latest version. Note that the more customizations you've made, the more complex the update process becomes. Updates involve merging the latest TanStarter template code with your changes using Git, so you may need to resolve merge conflicts carefully to preserve your customizations.
Pull Updates
If you started your project using the Git repository, you can pull updates directly.
# Add the template repository as upstream remote
git remote add upstream https://github.com/MkFastHQ/mkfast-template.git
# Fetch the latest changes from template
git fetch upstream
# Create a new branch for the update
git checkout -b update-template
# Merge the changes (resolve conflicts if necessary)
git merge upstream/mainUpdate Dependencies
Install new project dependencies:
pnpm installUpdate Database
When updates include database schema changes:
- Check the schema changes in the
src/db/schema.tsfile - Generate database migration files:
pnpm run db:generate- Apply migrations to the database:
# Apply to local D1 database
pnpm run db:migrate:local
# Apply to remote D1 database
pnpm run db:migrate:remoteMerge Updates
If you have already linked your project to your own GitHub repository in the Getting Started guide, you can push the updates to your remote repository after merging:
# Push the update branch to your remote repository
git push origin update-template
# Merge to main branch and push
git checkout main
git merge update-template
git push origin mainTesting After Updates
After updating, thoroughly test your application:
- Run the development server:
pnpm run dev- Check for console errors
- Test critical user flows
- Run linting and formatting:
pnpm run lint
pnpm run format- Check if the build succeeds:
pnpm run buildReceiving Update Notifications
To receive update notifications for TanStarter:
- Watch the GitHub repository
- Join the Discord community
- Follow @TanStarter on X
Next Steps
Now that you understand how to keep your TanStarter project up to date, explore these related topics:
TanStarter Docs