Supabase Integration
Supabase is an open-source Firebase alternative providing PostgreSQL database, authentication, storage, and edge functions. This guide covers how Supabase works with Newly.How Supabase Works in Newly
In general, when creating a project in Newly, Liquid Backend is automatically enabled if your prompt covers anything that might need backend functionality.Not sure which backend you’re using? If the tab labeled “Database” instead shows “Supabase”, your project is connected to Supabase. See Backend Systems for details.
Connecting Supabase
Newly uses OAuth to securely connect to your Supabase project—no manual API keys required.1
Open Supabase Settings
Click More → Supabase in the project menu
2
Connect via OAuth
Click “Connect Supabase” and sign in to your Supabase account
3
Authorize Access
Grant Newly 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 Newly app
Using Supabase in Your App
Once connected, tell the AI what you want to build: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
When your project is connected to Supabase, the Database tab shows your Supabase project details, secrets, and a link to open the Supabase Dashboard instead of Newly’s built-in table browser. Full data management — browsing rows, running SQL, editing schema — still happens in the Supabase Dashboard.Supabase Dashboard
Manage your database at supabase.com/dashboard:Creating Tables
In Supabase Dashboard:- Go to Table Editor
- Click New Table
- Define columns with types and constraints
- Enable Row Level Security (RLS)
Authentication with Supabase
Supabase Auth provides multiple authentication methods:Apple & Google Login with Supabase
Step-by-step walkthrough for adding Sign in with Apple and Sign in with Google to a Supabase-backed app.
Supported Auth Methods
Viewing Supabase Logs
Access logs in the Supabase Dashboard:- Go to supabase.com/dashboard
- Select your project
- Click Logs in the sidebar
Frontend Logs in Newly
While Supabase logs aren’t directly available in Newly, you can still view frontend console logs:- Click the Logs icon in the preview header
- 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
Storage
For file uploads, tell the AI:Edge Functions
For server-side logic requiring secrets (like OpenAI API calls), use Supabase Edge Functions:- Create functions in Supabase Dashboard → Edge Functions
- Deploy via Supabase CLI
- 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
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
Connection failed
Connection failed
- Try disconnecting and reconnecting via More → Supabase
- Check your Supabase project isn’t paused (free tier pauses after inactivity)
- Verify you authorized the correct Supabase account
Permission denied / 403errors when using the app
Permission denied / 403errors when using the app
- Ask Newly 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
Can't see backend logs
Can't see backend logs
Backend logs for Supabase are only available in the Supabase Dashboard, not in Newly. Go to supabase.com/dashboard → Logs.
Data not showing in app
Data not showing in app
- 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