Updating Codebase
ShipSaaS is regularly updated with new features, bug fixes, and security patches. This document explains how to update your project to the latest version.
You can update your codebase to the latest template version. Note that the more customizations you make to your application, the more complex the update process will be. Updating involves merging the latest upstream ShipSaaS template code with your changes using Git, which may require carefully resolving merge conflicts to preserve your custom code.
Pulling Updates
Section titled “Pulling Updates”If you initialized your project using a Git repository, you can pull updates directly.
# Add the template repository as the upstream remote repositorygit remote add upstream https://github.com/ShipSaaS/shipsaas.git
# Fetch the latest changes from the upstream templategit fetch upstream
# Create a new branch for the updategit checkout -b update-template
# Merge the changes (resolve conflicts if necessary)git merge upstream/mainUpdating Dependencies
Section titled “Updating Dependencies”Install any new project dependencies:
bun installUpdating Database
Section titled “Updating Database”When the update contains database schema changes:
- Check for database schema changes in the
src/db/schema.tsfile. - Generate database migration files:
bun run db:generate- Apply migrations to your databases:
# Apply to your local D1 databasebun run db:migrate:local
# Apply to your remote D1 databasebun run db:migrate:remoteMerging Updates
Section titled “Merging Updates”If you have already linked your project to your own GitHub repository during the Getting Started phase, you can push the updates to your remote repository once the merge is complete:
# Push the update branch to your remote repositorygit push origin update-template
# Merge into the main branch and pushgit checkout maingit merge update-templategit push origin mainPost-Update Testing
Section titled “Post-Update Testing”After updating, thoroughly test your application:
- Start the local development server:
bun run dev- Check the console for any errors.
- Test critical user workflows and operations.
- Run linting and formatting checks:
bun run lintbun run format- Verify that the production build compiles successfully:
bun run buildReceive Update Notifications
Section titled “Receive Update Notifications”To stay informed about the latest ShipSaaS updates:
- Watch the GitHub Repository.
- Follow our X account @ShipSaaS.
Next Steps
Section titled “Next Steps”Now that you know how to keep your ShipSaaS project up-to-date, explore these related topics:
-
Environment Configuration - Configure environment variables
-
Deployment - Deploy your website
-
Website Configuration - Configure core website settings
-
Project Structure - Learn about the template’s project structure