Skip to content

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.

If you initialized your project using a Git repository, you can pull updates directly.

Terminal window
# Add the template repository as the upstream remote repository
git remote add upstream https://github.com/ShipSaaS/shipsaas.git
# Fetch the latest changes from the upstream template
git fetch upstream
# Create a new branch for the update
git checkout -b update-template
# Merge the changes (resolve conflicts if necessary)
git merge upstream/main

Install any new project dependencies:

Terminal window
bun install

When the update contains database schema changes:

  1. Check for database schema changes in the src/db/schema.ts file.
  2. Generate database migration files:
Terminal window
bun run db:generate
  1. Apply migrations to your databases:
Terminal window
# Apply to your local D1 database
bun run db:migrate:local
# Apply to your remote D1 database
bun run db:migrate:remote

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:

Terminal window
# Push the update branch to your remote repository
git push origin update-template
# Merge into the main branch and push
git checkout main
git merge update-template
git push origin main

After updating, thoroughly test your application:

  1. Start the local development server:
Terminal window
bun run dev
  1. Check the console for any errors.
  2. Test critical user workflows and operations.
  3. Run linting and formatting checks:
Terminal window
bun run lint
bun run format
  1. Verify that the production build compiles successfully:
Terminal window
bun run build

To stay informed about the latest ShipSaaS updates:

  1. Watch the GitHub Repository.
  2. Follow our X account @ShipSaaS.

Now that you know how to keep your ShipSaaS project up-to-date, explore these related topics: