LogoMkSaaS Docs
LogoMkSaaS Docs
HomepageIntroductionCodebaseVideo TutorialsGetting Started: Install and Run LocallyEnvironment Setup
Configuration

Integrations

DatabaseAuthenticationEmailNewsletterStorage
Payment
AIAnalyticsNotificationCaptchaChatboxAffiliates

Customization

MetadataFontsThemesImagesSaaS Internationalization with next-intlBlogDocsComponentsCustom PagesLanding PageUser ManagementAPI Key Management

Codebase

IDE SetupProject StructureFormatting & LintingAutomated TestingUpdating the Codebase
X (Twitter)

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/main

Dependency Updates

To install new dependencies:

pnpm install

Database Schema Updates

When updates include database schema changes:

  1. Review changes in src/db/app.schema.ts, src/db/auth.schema.ts, and src/db/migrations/.
  2. If the template update already includes a migration, keep that migration and apply it as provided. Do not run db:generate again for the same change.
  3. Apply pending migrations to a local or test database first:
pnpm db:migrate
  1. Verify the production database URL, migration history, and backup before applying the same migrations to production.
  2. Run db:generate only when you made your own schema change and no migration exists yet:
pnpm db:generate

Testing After Updates

After updating, thoroughly test your application:

  1. Run the development server:
pnpm run dev
  1. Check for console errors
  2. Test critical user flows
  3. Run the full local validation suite:
pnpm check
  1. Run the end-to-end journeys when the update changes application behavior:
pnpm e2e
  1. Before releasing a broad template update, run the upgrade verification suite:
pnpm verify:upgrade

verify: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:

  1. Watch the GitHub repository
  2. Check the Roadmap regularly
  3. Join the Discord community
  4. 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:

Environment Setup

Configure environment variables

Deployment

Deploy your website to a cloud provider

Website Configuration

Configure website settings

Project Structure

Understand the organization of your project

Automated Testing

Run MkSaaS unit tests, browser journeys, and real payment sandbox tests

Table of Contents

Update ProcessDependency UpdatesDatabase Schema UpdatesTesting After UpdatesKeeping Up with ChangesVideo TutorialNext Steps