Updating the Codebase
How to keep your MkSaaS project up to date with the latest changes
MkSaaS is regularly updated with new features, bug fixes, and security patches. This guide explains how to update your project to the latest version.
While updating your codebase to the latest version is possible, it's important to note that the more customizations you make to your application, the more complex the update process becomes, so please be patient. This is because updates involve rebasing your custom code on top of the latest MkSaaS template code using Git, which may require resolving merge conflicts and careful handling to preserve your customizations.
Before updating your codebase, ensure your Git repository is clean with no uncommitted changes.
Update Process
If you started your project using the Git repository, you can pull updates directly. There are two approaches:
# Add the upstream remote if you haven't already
git remote add upstream https://github.com/MkSaaSHQ/mksaas-template.git
# Fetch the latest changes
git fetch upstream
# Create a new branch for the update
git checkout -b update-mksaas
# Merge the changes (resolve conflicts if necessary)
git merge upstream/mainDependency Updates
To install new dependencies:
pnpm installDatabase Schema Updates
When updates include database schema changes:
- Review changes in
src/db/app.schema.ts,src/db/auth.schema.ts, andsrc/db/migrations/. - If the template update already includes a migration, keep that migration and
apply it as provided. Do not run
db:generateagain for the same change. - Apply pending migrations to a local or test database first:
pnpm db:migrate- Verify the production database URL, migration history, and backup before applying the same migrations to production.
- Run
db:generateonly when you made your own schema change and no migration exists yet:
pnpm db:generateTesting After Updates
After updating, thoroughly test your application:
- Run the development server:
pnpm run dev- Check for console errors
- Test critical user flows
- Run the full local validation suite:
pnpm check- Run the end-to-end journeys when the update changes application behavior:
pnpm e2e- Before releasing a broad template update, run the upgrade verification suite:
pnpm verify:upgradeverify:upgrade runs check (read-only lint, type checking, unit tests, and build), then development E2E and production smoke. Prepare a migrated test PostgreSQL database before browser tests. Real payment sandbox tests and live email/OAuth/AI checks remain separate; see Automated Testing.
Keeping Up with Changes
To stay informed about updates:
- Watch the GitHub repository
- Check the Roadmap regularly
- Join the Discord community
- Follow MkSaaS on Twitter/X and other social platforms
Video Tutorial
Next Steps
Now that you understand how to keep your MkSaaS project up to date, explore these related topics:
MkSaaS Docs