I’m DUMPING Firebase: 7 Reasons Why Supabase Is BETTER For Your Next App

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
when it comes to building a new core app you have tons of options when it comes to your storage backend but if you're using flutter flow which is my no code tool of choice the easiest backends to get started with are super bass and Firebase these two back ends are supported natively by Florida flow now while I have used firebase's firestore extensively in the past ever since I built a couple of complex apps with Super Bass I realized that it is not only more powerful than Firebase but is also much much easier to get started and build the app of your dreams and so in today's video I will tell you why I plan to build all my complex apps in the future using Super Bass only now make sure you watch this video until the very end because I'm going to be saving the very best for less but before we get started as always all the apps and all the resources that I discuss on channel are available for you to view and or clone from my patreon page and you can learn more about our amazing patreon Community via the link below the video now the first thing that you need to know about Super Bass is that it's 100 free and open source and so the source to all the code is out there on the internet you can view it you can analyze it you can even contribute to it you can add some new features but most importantly it is fully transparent unlike a proprietary product such as Firebase now in terms of actually using Super Bass you can head over to superbass.com you can sign up for a free account and you can use their hosted service to host your own private instance of Super Bass but because this is a 100 free open source product you can host it yourself so you can simply head on over to superbass.com search for sell hosting and you're gonna have step-by-step instructions that will tell you exactly how you can sell host your very own private instance of Super Bass and so whether you're going to be using Super Bass on superbass.com or you're going to be self-hosting on your own Hardware really depends on your specific use case and whether you want to take full responsibility for hosting this complex system as well as dealing with any issues that may arise in the future personally I am 100 comfortable with using Super Bass via superbass.com but maybe your needs are going to be different now one of the biggest differences between Super Bass and Firebase is that super bass is a relational database so everything revolves around tables and so the first step is to create tables for specific entities in your apps so here I am logged into one of my projects here and all I need to do is click on a new table and I can create a new table so let's say I want to create a new table for my customers I'm just going to call it something like this and here I need to create columns that are going to be associated with different fields for each of the records that I'm going to be storing so here I can create a new column have a new column so let's say this is customer name this is customer location and followed by customer notes next I need to specify the type of field that I'm defining so for customer name this is going to be text customer location is going to be text and customer nodes is going to be text as well next if I click on Save it's going to go ahead and create this new table for me and here we are looking at my newly created disable that currently has no records now here I can create records manually but I also have a built-in option to import data via CSV so if I click here I can upload the CSV or I can paste text this is something that's not possible to do out of the box with Firebase and as a result you need to rely on third-party apps to do just that and so here I have some initial data in my Google Sheets spreadsheet that I want to import into my super based table and so what I can do here is I can go into file I can say download as comma separated values right here that file has been created and downloaded and then I can go back here and I can upload this file into my super based table and here I can configure import data so I can take a look at which columns to import I want to import all the columns and here I have a nice pre view of the records that are going to be imported into this table so if I like what I see I can just click on import data and it's successfully imported five of these records into my new customers table now I can also control what kind of data goes into my table what kind of data goes into my records here per Fields so let's say I'm looking at this table we have customer name customer location and customer notes now I want to make sure that customer knows is always filled in and it has at least 5 or 10 characters so in this case I can just click here and I can say edit column then I can scroll down and I can do a constraint okay so what I can do here is I can say well I want to make sure that the lamp of customer notes Here is at least five characters I want that field to have something and I wanted to be at least 5 characters I mean typically for this field you might want to have it in a longer at least 20 characters but let's just make it at least five click save and that's gonna create a constraint on this column here so now if I create the new record here and let's say I put a customer as Tristan location as Austin Texas and here for customer notes I just put something hey okay which is in value and if I click save I'm gonna get an error fail to run SQL query new row violates check constraint okay and so whether you're adding a new record here uh from the UI as I'm doing it now or if you're doing it from your apps it's just water flow or you're using an API which we're going to cover in just a minute you are going to get an error if you fail this constraint and you can set these constraints everywhere right so let's say I have a new field uh let's say I want to create a new column and and this column is going to be called net worth so we are tracking the customer's net worth and I go here and I select numeric and then I can create a constraint to make sure that the net worth of the customers at least you know ten thousand dollars or at least a million dollars so I can just take this paste it here and it's at least ten thousand okay so I can just click save and that's gonna create a constraint so let's say we are a big business we have a B2B and we don't want to deal with small businesses in this instance and so now if I try to add a record and the customer's net worth is less than ten thousand dollars in this example we're gonna get an error and so if I add a row here and I say customer name is Jake location is Houston Texas and nodes is awesome customer and great to work with and then net worth I put a hundred I should get an error okay it's not going to let me save it violates check constraint for customers cost net worth check okay and so this is very very powerful because you are setting these policies on your database level you're not doing it in uh your no code app you're not doing your checks there those checks can fail or you may forget to do those checks it's a lot better to do them at a database level and that way you can just do everything here in your table per field and then regardless of how you're actually adding this data whether you're doing it manually you're using an app you're using an API if the data that you're entering fails the constraint check your app or the API or whatever you're using to to put this data in there it's gonna spit back an error message telling you that hey this operation namely insert or update or something failed and this is why it failed because the data that you entered failed the constraint check and this allows you to create specific rules that are always is going to be enforced regardless of how you're actually interfacing with this database and this is something that you really can do in Firebase another thing that you can do is you can enforce uniqueness on a specific column for all the rows so let's say we have a customer location and we are only interested in having customers with a unique location so we don't want another customer from New York we don't want another customer from Los Angeles or Atlanta or San Diego or Seattle we want this column to be unique well in that case you can just comment here edit columns scroll down and you can just click on this is unique and that's going to enforce the values in this column to be unique across rows okay hit save and we've created another constraint and so now let's add a new customer here new role customer's name is William location is Atlanta notes we have all the nodes and that word is also good enough uprise so they're very very wealthy we're gonna click on Save and guess what failed to run SQL query duplicate key value violates unique constraint okay and you can also create a unique constraint across a multiple rows so maybe you are looking to have a unique combination of various rows so let's say you only want James from New York to be unique you don't care if there's another person from New York but you only want you know James New York to be unique now in this case it doesn't really make a lot of sense but there's going to be a lot of situations where it makes a ton of sense and this is a lot more powerful than you think because you can essentially have your app create multiple and multiple records without checking whether those records or at least part of that record various Fields already exist in the database you can just add these new records and the system is going to tell you hey you know this record already exists because you have a unique constraint on this and this is done all that time and this saves you so much time and so much aggravation because now you don't have to check in Florida flow you don't have to select all the records check if they exist and only then add a new record the system is going to check for that for you automatically awesome awesome feature with a ton of real world use cases now if I click here I'm gonna be shown and easy to understand API interface so this is actually JavaScript interface but if I click on bash I can see all the API requests for a specific column here right so I can say well I want this ID I want this created ad it just tells me select created that and if you scroll down you can do filtering Super Bass provides a wide range of filter and I actually use this powerful filtering feature when I was building a complex Super Bass app that you can see right there you can also do insert rows you can do a ton of things using an API and and so for whatever reason you need to have easy API access into your super based database it's only a click away while that's simply not the case with firebases fires or they do have an API but you have to go through a lot of documentation you have to read a lot of things in order to kind of make it work while here it's just one click you just click on bash and here you can also choose your API key and it's going to show you right here and so as a result you have an API request that's ready to go ready for you to leverage it within your app or somewhere else and this is simply not so easy with firebases firestore it's a lot more complex you have to go through a ton of documentation and so when it comes to accessing your data via apis there's nothing like super basis API interface out there if you click this you can set up real time access to your database so if you select this you can enable real time and then using super basses real-time API you can essentially create listeners on this data and get notified if your data changes in any way and so let's say I want to know if somebody adds a new record or somebody updates a record or if somebody deletes a record well with this real-time API my system will be notified and I can take a certain action based on that event so if I have some you know data being updated I'm going to get my old data and my new data and then I can decide well is this something that I want to you know display to the user do I need to do something with it do I want to send someone an email there's many many things that I can do and all of that is thanks to this super easy to use and very very powerful real-time subsystem another thing that I really like about Super Bass and I honestly feel this is a very much and on the rated feature are the extensions so if you click here on database you can look at your tables you also have a schema visualizer which is very very useful I use this all the time actually but if you scroll down you can see that you have extensions right here so if you click on extensions you have various enabled extensions that I have enabled right now but we also have a ton of available extensions okay so we have this address standardizer so this is used to parse an address into consistent elements generally used to support geocoding address normalization but there's tons of other ones right you have HTTP this is an HTTP client for postgres allows web page retrieval inside the database so I can enable it right here what I'm going to do is I'm going to click on enable extension and now with this extension enabled I can do the following I can come by here and what I can do is I can create a new query that gets some external data so I'm using this Json Place folder so if I load this data you can see it gives them back a random record and when I execute this query it shows me this record from this URL and so this way you can easily pull in external data that's available somewhere on the internet into your database without needing to go out and to do API calls or separate HTTP arrest requests it's all done inside of your database very very powerful and that is just one extension there are tons and tons of extensions that do all kinds of very very interesting things that you definitely will be putting to use in your apps as you will see now all these features are awesome and they definitely help you when it comes to working with your data but I definitely wouldn't call them ground breaking I mean these features are nice but they definitely wouldn't force me to move away from another database just for them the biggest advantage to using Super Bass is its relational aspect okay and what exactly does this mean and why should you care well let me explain it to you right now and trust me after you watch this section you will probably think twice about using Super Bass for your next app now let's say we're building an app similar to upwork now an app like upwork revolves around jobs there are people that are offering to do jobs and there are other people that are looking for jobs to be done for them okay and so the first thing that you need to do is you need to create the table to store all those jobs and so I created the table called upwork jobs and this is a very simple table we have the ID of the worker and this is the personal responsible for completing the job we have the job name the job price and the job category now a common scenario that you definitely want to build into your up is you probably want to have a page that gives you more information about the job but also gives you some statistics about the person who is selling this job the person who is looking to get higher maybe you want to see how many reviews they have or the average of the reviews well you won't be able to do any of this in Firebase you will have to do it in your no code tools and so I've done this many times before in my flutter flow apps and I always end up building a custom function using some filtering some mapping and a bunch of other things but did you know that you can easily do all of this right inside of Super Bass using views but before I show you how easy it is to do all of this complex stuff right inside of Super Bass let me show you a proof of concept flutter Flow app that I built that demonstrates exactly what we need to do and so here's a quick app that I built at first list the jobs and also list the reviews and so let's go ahead and run this apps that I can show you exactly what it does we're going to create a new session here all right so here's our app and here we have two lists to use from two different tables so we have the jobs table we have the name of the job the price and we also have reviews and so you have the a review here and you have a rating and this is great and all but typically when you're going to be building your apps you need to combine this data in some way shape or form if you're building a detailed page so if I click on this job and I'm looking to learn more information about it more specifically who is the person that's offering to do this job for me you know I want to see information related to that person namely I want to see how many reviews they have average rating things like that and so here we have a bunch of user emails but only one user has three reviews okay and that is this user right here James james.com and the average of all of the reviews is nine right here and here I have another page here that just shows us some information about the job so here we have category count and price range and so this is the categories that represent the various jobs in the system so we have design jobs translation jobs and software here we have the number of jobs for each category so we have two jobs uh for design one job in the translation category and two jobs on the software and here we have a price range of all the jobs in that particular category 125 dollars to 250 150 to 150 100 to 200 and you probably wouldn't believe me when I tell you but the data here and the data here was all done in Super Bass I'm not doing any logic in my no code tool of choice and I did all of this using a very very powerful feature of relational databases called views so if you head back here we have our tables that represent specific entities so here I have jobs here I have user reviews these are specific entities and they all go into Separate Tables but anytime I need to display data that's combined there's some logic being done maybe I'm counting the number of categories uh you know for specific jobs or accounts or I'm averaging the reviews in other words I need to do some aggregation of the data and display it and maybe a detail page or on some report I can create a view to do that so here we have a view called upwork user reviews view so if I click here this view pulls all the data from various tables and displays it right so as you can see this is the exact data that you saw on the Florida Flow app and that is because that's all the flutter Flow app is doing it's not doing any logic at all it's basically pulling this data and displaying it for the users to see and if you go into the different condition you can see that we're basically pulling this information from two tables the users table and the upwork user reviews and we're doing the counting and the averaging right inside of Super Bass now let me show you the second view this is that second view that you saw on the app and as you can see this is exactly what you're seeing in the app and that is because in this view we're doing all the heavy lifting we don't need to do any processing in flutter flow we don't need to create custom functions or create filtering or mapping or anything we just do it here and then we just display it in Florida flow right so as you can see we have job category number of jobs for this category in the price range right if I go into definition you can see that we have here a SQL statement okay it's it looks kind of complex but it's actually very very easy to do right all you need to do is go to SQL editor and here you have super based AI that helps you build a query and you can essentially sell it what kind of data you need in order to display it in your app view so here's an example of a prompt that I use to create this exact view here I just wrote create a view that shows count of job category shows job category and the range of prices from lowest to highest as one field in the jobs table and so I executed it and gave me the SQL statement to create the view then I executed the SQL statement and I have a view that gives me the exact data that I want and this feature here is an absolute Game Changer because now all you need to do is go to your table editor here create the right tables for different entities do not worry about how you're going to be you know combining this data and how you're going to be displaying and just create your tables for each entity and then you can go to the SQL editor and add super base AI to build you a query to get you the exact fields and the exact data from the tables that you have using English language that you need in order to display in one of your views and so as a result we just have two tables for completely different entities jobs reviews you're going to have a user stable etc etc and then once you need some kind of a detailed view or you need some kind of a rapport job report or what have you you can just go into Super Bass Ai and sell it what kind of data you need and this is absolutely amazing this is truly a game changer because this is one of the hardest things when it comes to designing your data scheme and doing data modeling in firebases firestore and so if you don't believe this game changing feature is going to nudge you to start using Super Bass more for your complex app projects then I don't really know what feature will and that is why in the future you're probably going to be seeing me use super bass a lot more especially when it comes to apps with complex data schemas lots of tables very complex views as opposed to 5 Firebase now if at this point you're thinking to yourself hey you got some really really good points and I can definitely see myself designing the Super Bass way me and creating tables creating views things like that and I really like your approach of explaining all of this because now it makes sense and now I don't have to you know struggle with getting that perfect uh schema in firebase's firestore and all of that because a lot of people having trouble with that if that is you and you're looking to create more apps you're looking to create complex apps you're looking to create apps that have lots of views that provide a lot of value to your users then you definitely need to check out our amazing patreon Community remember all the apps and all the resources that I you know Showcase in my videos and all my videos when I show you a new concept or a new technique or a new tool or when I build a new app such as this one you will be able to view and or close own all of these things on my patreon page and remember when you join our amazing patreon Community you're also going to get access to a lot of extra content such as q and A's live streams behind the scenes serious as well as our patreon supported Mass request a series where I do a deep dive on topics that the community evolves on and in fact I'm going to be doing another Master Class very very soon I'm probably gonna have a poll if that's what I should do or maybe do a q a you guys decide but regardless there's a lot of valuable content coming to our amazing amazing supporters and above all when you join our amazing patreon Community you're going to be supporting this Channel and supporting my work and that is highly highly appreciated and so if all of that sounds like something that might interest you then you definitely need to check out our amazing patreon community and consider becoming a subscriber
Info
Channel: James NoCode
Views: 11,310
Rating: undefined out of 5
Keywords: firebase vs supabase, supabase tutorial, supabase nocode apps, flutterflow supabase
Id: gJKOHZ851Sw
Channel Id: undefined
Length: 25min 57sec (1557 seconds)
Published: Fri Sep 22 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.