Migrating from v1

Guidelines for migrating from Makerkit v1 to Remix SaaS Boilerplate.

This guide will help you migrate from Makerkit v1 to the Remix SaaS Boilerplate. The Remix SaaS Boilerplate is a complete rewrite of Makerkit v1, and there are significant changes between the two versions. This guide will help you understand the changes and how to migrate your project to the new v2.

Overall, this is what you will need to do:

  1. Bootstrap a new project: Create a new project using the Remix SaaS Boilerplate v2
  2. Update Schema: Update the Postgres schema foreign key references, and add your existing tables
  3. Move files from older app: Move your files to the new app structure
  4. Update imports to existing files: Update imports to the new file structure
  5. Update configuration: Update the configuration files to match the new schemas

1. Bootstrap a new project

The Remix SaaS Boilerplate is a complete rewrite of Makerkit v1. You will need to create a new project using the new boilerplate. You can follow the installation guide to create a new project.

2. Update Schema

The schema in the Remix SaaS Boilerplate has changed significantly from Makerkit v1. You will need to update your Postgres schema to match the new schema.

The main difference is that before, you'd have a foreign key set to the organization ID:

organization_id bigint not null references organizations(id) on delete cascade,

Now, you'll have a foreign key set to the account ID as a UUID:

account_id uuid not null references public.accounts(id) on delete cascade,

In fact, an account can be both a user or a organization. While in v1 you referenced the organization ID, in v2 you'll reference the account ID. It's the same if you were using the Lite kit and referencing a user ID: now you'll reference the account ID related to the user ID.

3. Move files from older app

In v2 you can choose to add these files to either the "user scope" (/home) or the "account scope" (/home/[account]).

If you choose to add the files to the "user scope", you can add them to the /home directory. If you choose to add the files to the "account scope", you can add them to the /home/[account] directory.

4. Update imports to existing files

You will need to update the imports to your existing files to match the new file structure.

This is the case for all the components and utilities that you imported from Makerkit.

For example, if you were importing a button from ~/core/ui/Button, you will now import this from @kit/ui/button - and so on.

5. Update configuration

You will need to update the configuration files to match the new schemas. The configuration is now split across various files at apps/web/config. Most notably, you will need to update the billing schema, which is now much more versatile (and a bit more complex).


Subscribe to our Newsletter
Get the latest updates about React, Remix, Next.js, Firebase, Supabase and Tailwind CSS