Updating the Codebase
How to keep your MkSaaS project up to date with the latest changes
MkSaaS is actively maintained and 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. This is because updates involve rebasing your custom code on top of the latest MkSaaS 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
Method 1: Using Git (Recommended)
If you started your project using the Git repository, you can pull updates directly. There are two approaches:
Option A: Merge Approach (Safer)
Choose this option if you want a safer update process with clear merge points.
Option B: Rebase Approach (Cleaner History)
Choose this option if you prefer a linear history. This approach is more advanced and may require more Git experience to resolve conflicts.
If you have any merge conflicts, you will have to resolve them manually. If you are not sure how to do this, please refer to the Git documentation.
Method 2: Manual Update
If you prefer to update manually or didn't use Git:
- Download the latest version of MkSaaS
- Compare your customized files with the new version
- Apply changes selectively, focusing on:
package.json
for dependency updates- Configuration files like
next.config.js
- Core functionality in
src/lib
andsrc/components
directories
Dependency Updates
To update only the dependencies:
For major dependency updates, check compatibility first:
Database Schema Updates
When updates include database schema changes:
- Check the migration files in the
drizzle
directory - Apply migrations with:
Testing After Updates
After updating, thoroughly test your application:
- Run the development server:
- Check for console errors
- Test critical user flows
- Run linting and formatting:
- Check build:
Keeping Up with Changes
To stay informed about updates:
- Watch the GitHub repository
- Check the changelog regularly
- Join the Discord community
- Follow MkSaaS on Twitter/X and other social platforms
Next Steps
Now that you understand how to keep your MkSaaS project up to date, explore these related topics: