LogoTanStarter Docs
LogoTanStarter Docs
HomepageIntroductionCodebaseGetting StartedEnvironments
Configuration
Deployment

Integrations

CloudflareDatabaseAuthenticationEmailNewsletterStoragePaymentNotificationsAnalyticsChatboxAffiliates

Customization

MetadataPagesLanding PageBlogComponentsUser ManagementAPI Key Management

Codebase

Project StructureFormatting & LintingEditor SetupUpdating the Codebase
X (Twitter)

Updating the Codebase

How to keep your TanStarter project up to date with the latest repository code

TanStarter is regularly updated with new features, bug fixes, and security patches. This guide explains how to update your project to the latest version.

You can update your codebase to the latest version. Note that the more customizations you've made, the more complex the update process becomes. Updates involve merging the latest TanStarter template code with your changes using Git, so you may need to resolve merge conflicts carefully to preserve your customizations.

Pull Updates

If you started your project using the Git repository, you can pull updates directly.

# Add the template repository as upstream remote
git remote add upstream https://github.com/MkFastHQ/mkfast-template.git

# Fetch the latest changes from 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

Update Dependencies

Install new project dependencies:

pnpm install

Update Database

When updates include database schema changes:

  1. Check the schema changes in the src/db/schema.ts file
  2. Generate database migration files:
pnpm run db:generate
  1. Apply migrations to the database:
# Apply to local D1 database
pnpm run db:migrate:local

# Apply to remote D1 database
pnpm run db:migrate:remote

Merge Updates

If you have already linked your project to your own GitHub repository in the Getting Started guide, you can push the updates to your remote repository after merging:

# Push the update branch to your remote repository
git push origin update-template

# Merge to main branch and push
git checkout main
git merge update-template
git push origin main

Testing After Updates

After updating, thoroughly test your application:

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

Receiving Update Notifications

To receive update notifications for TanStarter:

  1. Watch the GitHub repository
  2. Join the Discord community
  3. Follow @TanStarter on X

Next Steps

Now that you understand how to keep your TanStarter project up to date, explore these related topics:

Environment Setup

Configure environment variables

Deployment

Deploy your website

Website Configuration

Configure core website settings

Project Structure

Understand the template project structure

Table of Contents

Pull Updates
Update Dependencies
Update Database
Merge Updates
Testing After Updates
Receiving Update Notifications
Next Steps