Skip to main content

Supabase Integration

Supabase is an open-source Firebase alternative providing PostgreSQL database, authentication, storage, and edge functions. This guide covers how Supabase works with Natively.

How Supabase Works in Natively

In general, when creating a project in Natively, Liquid Backend is automatically enabled if your prompt covers anything that might need backend functionality.
Not sure which backend you’re using? If you don’t see a “Database” button on the top of the page when viewing your project, you’re using Supabase. See Backend Systems for details.
If you have good reasons for using supabase instead, such as; already having a website with Supabase and you want to use the same database for your app - then you can go to “More” and connect your Supabase account. After connecting, the AI automatically has access to update your database schema, add or modify edge functions, alter RLS policies and view edge function logs.

Connecting Supabase

Natively uses OAuth to securely connect to your Supabase project—no manual API keys required.
1

Open Supabase Settings

Click MoreSupabase in the project menu
2

Connect via OAuth

Click “Connect Supabase” and sign in to your Supabase account
3

Authorize Access

Grant Natively permission to access your Supabase projects
4

Select Project

Choose the Supabase project you want to connect
5

Connected

Your Supabase project is now linked to your Natively app
The OAuth connection handles all authentication automatically. You don’t need to manually copy API keys or configure environment variables for the Supabase connection.

Using Supabase in Your App

Once connected, tell the AI what you want to build:
Create a posts feature using my Supabase database.
Show a list of posts and let users create new ones.
The AI will generate the appropriate code to interact with your Supabase database.

What You Can Ask For

  • Database operations - Create, read, update, delete records
  • Authentication - Sign up, login, password reset using Supabase Auth
  • Storage - Upload and display images and files
  • Realtime - Subscribe to live database changes

Managing Your Database

There is no Database Viewer in Natively for Supabase projects. You must use the Supabase Dashboard. Use Liquid Backend if you must have a Database Viewer inside Natively

Supabase Dashboard

Manage your database at supabase.com/dashboard:
FeatureWhere to Find
View/Edit DataTable Editor
Run SQL QueriesSQL Editor
Create TablesDatabase → Tables
Manage AuthAuthentication
File StorageStorage
Edge FunctionsEdge Functions

Creating Tables

In Supabase Dashboard:
  1. Go to Table Editor
  2. Click New Table
  3. Define columns with types and constraints
  4. Enable Row Level Security (RLS)
Always enable Row Level Security (RLS) on your tables for security. Without RLS, anyone with your project URL could access your data.

Authentication with Supabase

Supabase Auth provides multiple authentication methods:
Add login and signup using Supabase authentication.
Support email/password.
Social login like Google OAuth require a Google OAuth key to be set up in Google Cloud for Supabase projects - Liquid Backend provides Google OAuth without any setup for development purposes.

Supported Auth Methods

MethodSetup Required
Email/PasswordReady to use
Magic LinksReady to use
Google OAuthConfigure in Supabase Dashboard
Apple OAuthConfigure in Supabase Dashboard
GitHub OAuthConfigure in Supabase Dashboard
Phone/SMSRequires Twilio setup

Viewing Supabase Logs

Access logs in the Supabase Dashboard:
  1. Go to supabase.com/dashboard
  2. Select your project
  3. Click Logs in the sidebar
Log TypeWhat It Shows
API LogsREST API requests, response codes
Postgres LogsDatabase queries, errors
Auth LogsLogin attempts, signups, OAuth flows
Edge Function LogsServerless function execution
Realtime LogsWebSocket subscription events

Frontend Logs in Natively

While Supabase logs aren’t directly available in Natively, you can still view frontend console logs:
  1. Click the Logs icon in the preview header
  2. View console.log output, errors, and warnings from your React Native code

Row Level Security (RLS)

RLS is crucial for Supabase security. Configure policies in the Supabase Dashboard under Authentication → Policies. Common patterns:
  • Users read own data - Only see records where user_id matches
  • Public read, authenticated write - Anyone can view, only logged-in users can create
  • Admin access - Full access for admin users
Without RLS enabled, your data is publicly accessible. Always configure appropriate policies before going to production.

Storage

For file uploads, tell the AI:
Let users upload profile pictures and display them on their profile.
Store the images in Supabase Storage.
Configure storage buckets and policies in the Supabase Dashboard under Storage.

Edge Functions

For server-side logic requiring secrets (like OpenAI API calls), use Supabase Edge Functions:
  1. Create functions in Supabase Dashboard → Edge Functions
  2. Deploy via Supabase CLI
  3. Tell the AI to call your edge function from the app
Edge Functions are useful when you need server-side processing that can’t be done safely in the frontend.

Migrating from Liquid Backend to Supabase

Migration from Supabase to Liquid Backend is not possible. However, you can migrate from Liquid Backend to Supabase if you have specific requirements that only Supabase can meet.

When to Consider Migration

In most cases, Liquid Backend will get you further. Consider Supabase only if you already have a website with Supabase or an existing Supabase database that you need to use.

Troubleshooting

  • Try disconnecting and reconnecting via MoreSupabase
  • Check your Supabase project isn’t paused (free tier pauses after inactivity)
  • Verify you authorized the correct Supabase account
  • Ask Natively AI about Row Level Security policies
  • Manually check Row Level Security policies in Supabase Dashboard
  • Verify the user is authenticated if your policies require it
  • Review policies under Authentication → Policies
Backend logs for Supabase are only available in the Supabase Dashboard, not in Natively. Go to supabase.com/dashboard → Logs.
  • Check the Table Editor in Supabase Dashboard to verify data exists
  • Check RLS policies aren’t blocking access
  • Look at API Logs in Supabase for errors

Resources

Supabase Docs

Official Supabase documentation

Supabase Dashboard

Manage your database

Backend Systems

Compare Supabase vs Liquid Backend

Liquid Backend

Liquid Backend documentation