Updating the Codebase
How to keep your Dirstarter project up to date with the latest changes
Dirstarter 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 Dirstarter code using Git, which may require resolving merge conflicts and careful handling to preserve your customizations.
Important
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 Dirstarter
- 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
lib
andserver
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
prisma/migrations
directory - Apply migrations with:
Testing After Updates
After updating, thoroughly test your application:
- Run the development server:
npm run dev
- Check for console errors
- Test critical user flows
- Run linting and formatting:
npm run lint
andnpm run format
- Check build:
npm run build
Keeping Up with Changes
To stay informed about updates:
- Watch the GitHub repository
- Check the changelog regularly or subscribe to the RSS feed
- Join the community Discord server
Last updated on