Local Development
Supabase

Supabase

ShipAIFast prioritizes getting you started fast. That's why we choose Supabase as our database as it excels in rapid prototyping. Supabase also offers robust security features, a wide range of library support, and a fantastic developer experience (DX) to keep your project running smoothly.

Setup Supabase Local

Supabase offers tools for local development, allowing you to run the database and services on your machine. This is helpful for testing and development without relying on the remote server.

Install Docker

Ensure Docker is running on your system.

Several resources are available to download Docker depending on your operating system:

Install Supabase CLI

brew install supabase/tap/supabase

For other methods to use Supabase CLI, visit Supabase website (opens in a new tab).

Run Supabase Local

Start Supabase to set up the configuration for developing your project locally:

# Download many docker files and might take some time
supabase start

Update .env.local

Once all of the Supabase Local is running, you'll see output containing your Supabase Local credentials. It should look like this, with urls and keys that you'll use in your project:

Started supabase local development setup.
 
         API URL: http://localhost:54321
          DB URL: postgresql://postgres:postgres@localhost:54322/postgres
      Studio URL: http://localhost:54323
    Inbucket URL: http://localhost:54324
        anon key: eyJh......
service_role key: eyJh......

Copy API URL and paste it to NEXT_PUBLIC_SUPABASE_URL in your .env.local file.

Copy anon key and paste it to NEXT_PUBLIC_SUPABASE_ANON_KEY in your .env.local file.

Copy service_role key and paste it to SUPABASE_SERVICE_ROLE_KEY in your .env.local file.

You can check your local database by going to Studio URL

Migrate local database

Normally supabase start should applied all pending migrations, otherwise run the following up command to ensure your local database is updated:

supabase migration up