[Supabase] Become a Supabase Magician in WeWeb (With Examples of JOINS etc.)

Become a Supabase Magician in WeWeb (With Examples)

In the latest article on my Radar - a blog platform where I post no-code and especially WeWeb content, I explore the integration of Supabase with WeWeb. This comprehensive guide covers advanced usage of Supabase, helping you build scalable WeWeb applications efficiently.

Why Use Supabase in Your Low-Code Project

I discuss Supabase as an open-source alternative to Firebase, detailing its real-time capabilities, PostgreSQL database, and seamless integration with WeWeb. The flexibility and freedom offered by Supabase make it a top choice for low-code projects.

Fetching Data Effectively

Data fetching is crucial for any application. The article explains the different methods provided by WeWeb’s Supabase plugin, emphasizing the importance of understanding your data.

Using WeWeb Collections

The most common pattern for fetching data is through WeWeb’s Collections. This approach is highly effective for most cases, and I recommend a collection-first mindset.

The Static Pages Issue

Supabase collections don’t support Static Collections for Static Pages. I provide a workaround using Supabase’s REST API feature, enabling data fetching from REST endpoints in WeWeb.

Joining Data in WeWeb

Many users are unaware of efficient data fetching. The article explains the Advanced data embedding feature (JOINs) in WeWeb’s Supabase plugin, simplifying data integration.

Efficient Data Filtering with Joined Data

The updated plugin allows filtering by nested fields, enabling precise data filtering based on foreign key values. I provide examples of filtering products by brand name and ensuring non-null brands.

By following this guide, you can leverage the powerful capabilities of Supabase and WeWeb to create robust, scalable applications with ease. I gotta admit, by diving deep into this, even I learnt a lot of new things.

13 Likes

Wonderful post! I just swtiched from Xano to Supabase and find it very powerful and waaaay cost effective. :grinning:

2 Likes

I’m hoping this will help many of you guys, that’s the aim :pray:t2::smile:

very good Congratulations

Interesting to hear that. I am using XANO and always curious about supabase due to the pricing factor, How does the function stack add up in this case? I found the ability to do almost all functions in XANO, a very powerful tool. I did not test that with supabase, so curious on how you are finding the transition? Thanks.

In Supabase you’re not limited by the no-code UI, you have a direct, raw access to the Postgres DB (to a certain extent) so you can literally do any functionality you need.

1 Like

When I attempt to filter a collection from a spread section of data I get an effectively saying the Colom doesn’t exist on the top table.


your reply here seemed to suggest I can,

Could you clarify if I am missing something or if this is only possible in the workflow select.

1 Like

If you go and use a workflow instead of a Collection, you should be able to set a filter on a news.active column and it could work like this, as that is the “true reference” to that column.

1 Like

Does this mean that all collections that have a join I want to create a filter, will I have to put in a page workflow to load data and feed a variable that will be used, for example a data grid that shows my registered products?

1 Like

Yes, you’re right indeed, you need to switch to the Workflow Actions, because the Collections currently in WeWeb unfortunately don’t allow custom keys.

1 Like

Hey @Broberto, awesome work you do! I was looking at the WeWeb Academy’s Supabase training and lander here. I wanted to confirm that the JOIN queries are actual JOINs? They are not subsequent queries, using results/parameters from the previous query, performed on the front-end level?

1 Like

Hello, you can rest assured, JOINs as you see them in my guide are genuine JOINs. It’s thanks to how the WeWeb plugin utilizes the Supabase SDK under the hood. So to answer your question, yes. And thanks for the kind words :slight_smile: