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.
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.
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.
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.
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?
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.
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?
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