Supabase Wappler Connection

I am looking to create a web app in Wappler using Supabase as my backend. Has anyone managed to get a working connection? So far I am having trouble setting up a remote database connection to Supabase from my Wappler Web App.

You can easily connect directly to wappler, simply select direct connection and use their certificate and you're in!

If you're using localhost supabase instance, for database migrations, this can also be easily achievable by joining wappler and supabase to the same docker network and using kong(if im not mistaken) container name as the url.

I have multiple projects running Supabase as the database, authenticator, etc.

The only reason why I would recommend anyone else using supabase as a backend, is if you're thinking of using the same on mobile, due to easy out of box RLS integration in mobile devices.

However, evertyhing and MORE can be handled by wappler's backend.

We have switched to NEON instead. The database braching is something out of this world, even though they don't have automatic database migration yet, and it has to be done manually, or with git actions.

In either of the ways I am going to recommend you, you will require custom extensions. First one to take inputs like wappler does, through the grid, this will make working with database much easier, and then parse it as JSON body in supabase db endpoint. You can create conditions, and anything else that will make your experience passing values in server connect much easier!

Why do you need custom extension?

Authentication and RLS. If you're not planning on using RLS and authentication, Id stick to using traditional database.

To use their Authentication, you will have to refresh JWT every once in awhile, preferably at least every few hours. And then save it to session or http cookie. This will allow your users to use their authentication token for database functions (insrt, update, etc), otherwise, using direct connection, beats the purpose of RLS , since direct connection works like service key and bypasses security. Creating such flow in wappler is much easier and straight forward! RLS is great, if you're using react or framework that they provide components to right out of the box.

Realtime is...well.. good, if paired with RLS.

At the end of the day, if you're in the infant age of your project, I would choose managed database from digital ocean, or anywhere else, or NEON! It's great option if your application doesnt need 24/7 database uptime and third party extensions(most of the managed databases dont support them eitherway), if you asked for my optioning, I'd opt in for dedicated database with JWT signing and decoding within wappler, if connecting to flutterflow, or other mobile services!

Good luck!

4 Likes

Hi @Evaldas thanks for the reply and suggestions. Will try them and get back to you! :smiley:

Update: I have got a database connection setup in Wappler for my Supabase :slight_smile: thanks again!