Supabase is an open source Firebase alternative, based on PostgreSQL.
Plasmic currently integrates with Supabase by directly connecting to the Supabase-managed PostgreSQL database. Therefore, in addition to this page, you can also refer to the PostgreSQL page for support.
To connect to Supabase, Plasmic needs a connection string to your database.
- Go to Plasmic Studio and add a new integration. You can add a new integration from a project or from a workspace, like My Playground.
- Choose “Supabase” or “Postgres” as the source, add a name, and click “Import from connection string”.
- In another tab, log in to your Supabase dashboard and select your project.
- Click the “Project Settings” icon on the left nav.
- Click “Database” on the left panel.
- Have your database password ready (hopefully you securely stored it somewhere). If you have it, move to the next step. If you don’t have it, you’ll need to reset it in the “Database password” section. Be careful, if you have other clients using the old password, they’ll stop working!
- Scroll down to the “Connection string” section, click “URI”, and click “Copy”.
- Go back to your Plasmic Studio tab, and paste the connection string in.
[YOUR-PASSWORD]with your database password.
- Click “Import” and “Confirm”, and you can start querying data from your Supabase database!
Supabase allows you to set Row Level Security (RLS) policies on tables, and it defaults to on. However, since Plasmic currently connects to Supabase with a direct connection, Plasmic is unable to use auth features and most RLS features. To query a table, you’ll need to make sure the table has RLS turned off or has a permissive RLS policy that enables read access for all users.
- Check that your table has rows.
- Check that your query’s filters make sense.
- Check your table’s RLS policies. See Plasmic and RLS for more.