LogoMkSaaS Docs
LogoMkSaaS Docs
HomepageIntroductionCodebaseVideo TutorialsGetting StartedEnvironment Setup
Configuration

Integrations

DatabaseAuthenticationEmailNewsletterStoragePaymentCreditsCron JobsAIAnalyticsNotificationCaptchaChatboxAffiliates

Customization

MetadataFontsThemesImagesi18nBlogDocsComponentsCustom PagesLanding PageUser Management

Codebase

IDE SetupProject StructureFormatting & LintingUpdating 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
npm install
yarn install
bun install

Database Schema Updates

When updates include database schema changes:

  1. Check the schema changes in the src/db/schema.ts file
  2. Generate migration files:
pnpm run db:generate
npm run db:generate
yarn db:generate
bun run db:generate
  1. Apply migrations to the database with:
pnpm run db:migrate
npm run db:migrate
yarn db:migrate
bun run db:migrate

Testing After Updates

After updating, thoroughly test your application:

  1. Run the development server:
pnpm run dev
npm run dev
yarn dev
bun run dev
  1. Check for console errors
  2. Test critical user flows
  3. Run linting and formatting:
pnpm run lint
pnpm run format
npm run lint
npm run format
yarn lint
yarn format
bun run lint
bun run format
  1. Check build:
pnpm run build
npm run build
yarn build
bun run build

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

Table of Contents

Update Process
Dependency Updates
Database Schema Updates
Testing After Updates
Keeping Up with Changes
Video Tutorial
Next Steps