Is Supabase Legit? Firebase Alternative Breakdown

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments

I think this was an actual fair look from a self admitted Firebase lover.

👍︎︎ 1 👤︎︎ u/ZoWnX 📅︎︎ May 01 2021 🗫︎ replies
Captions
supabase the open source firebase alternative that's an extraordinary claim that will require some extraordinary evidence because firebase is not an easy thing to replace it's a whole suite of tools that include things like authentication a database you can listen to in real time file storage serverless functions and sdks that can easily tie this infrastructure together on ios android and the web in today's video we'll find out if supabase lives up to its marketing claims but first a quick disclaimer i've been called to james brown of firebase i'm a huge fan of the product and used it to build fireship io and have helped a ton of other people build their own products with firebase so i'm definitely biased but google has never paid me for any of this work which means i can say whatever the hell i want and i'm intimately familiar with its weaknesses it's great to see more competition because that motivates everybody to build better products which ultimately benefits us developers let's start by taking a look at feature parody which isn't at all a fair comparison because supabase is brand new and firebase has been around for a long time currently supabase offers a database user authentication and file storage with functions coming soon those are some of the most important infrastructure pieces in firebase but you'll notice a few things missing like static site hosting machine learning tools and things like crashlytics and test lab for mobile apps and push notifications as well as google analytics so firebase has way more features but supabase has one big advantage and that's the fact that it only uses open source technologies for its platform that means you could run superbase with docker and host your own firebase alternative on google cloud platform if you wanted to that's a big deal because it means you don't face the vendor lock-in issue when you use firebase you're locked in with google you're signing a contract with alphabet the corporation giving them the power to destroy your business if they decide that's what should happen now that's extremely unlikely if you do what you're told but now let's take a look at the services supabase offers to see how they stack up to firebase starting with user authentication now first i'll point out that supabase is not a one-to-one mapping of firebase it just provides tools that do approximately the same thing i built a little demo with supabase and i can tell you that the developer experience for user authentication is very similar to firebase you have a dashboard where you can view data for all your users and then an area where you can modify email templates being sent to those users they have sign in methods for email password all the major oauth providers and also passwordless auth with a magic email link the only big one that's missing that you'll find in firebase is phone authentication now when it comes to the actual code you'll be able to get a user logged in with one or two lines of code just like firebase i actually really like how it returns an error as an object here because in firebase you have to wrap it in a try catch block to catch errors that's a small thing but a nice touch to improve the developer experience in javascript now one thing that supabase does that's very cool that firebase doesn't is that it automatically creates a database record for the user if we go to the database tab you'll notice a user's table there under the auth schema it contains metadata about the user but most importantly it's there to facilitate backend security if we go back to authentication you'll notice a tab for policies which we can use to create database rules using sql as opposed to firestore where we write rules in common expression language which tends to be pretty difficult code to maintain as your app grows in complexity now i haven't built a complex apple superbase but the idea of writing security rules in sql is pretty appealing but we haven't even talked about databases yet in firebase we have two different database options but i'll be focusing on firestore which is very similar to mongodb and is a nosql document database it's really easy to work with scales automatically and handles relational data fairly well however it does have some limitations and scaling certain types of data relationships can be extremely difficult if you need anything resembling full-text search firestore actually just recommends you use a third-party service like algolia and to be honest that's kind of disappointing for a company that's built on top of a search engine supabase uses postgres as its database a relational sql database that's been around forever but sql databases are expensive hard to use and difficult to scale allegedly superbase addresses those concerns by first handling the scaling for you automatically and also by providing a dashboard and sdk to make working with the database much easier now under the hood the platform has already created a database for us and if we go to the tables page we can start adding new tables to it once we have a table we can then add new columns to it one by one superbase will automatically update the schema and handle the migrations for us in the background once we have a few columns we can then start adding data to it by inserting new rows that makes it really easy to visualize and administer your database but how do we use it in an actual frontend application like a web app check this out if we go over to the api tab it automatically generates code samples for us based on the structure of our database instead of writing raw sql code you can use the sdk to access your data in a dsl that makes a little more sense like you can use graphql in the select method to grab data from a different table instead of having to write out a full sql join overall this feels kind of similar to hasura which is also an awesome product that i'll make a video on soon the next thing i want to talk about though is real time if you're building a real-time app you can do so with one line of code with very little configuration and firebase the client-side sdks are very sophisticated and do things like optimistic updates where it updates the ui before the actual change is committed to the back end making everything feel instantaneous for your end user it also supports offline mode which is a big deal for pwas and mobile apps in supabase you can subscribe to real-time updates but that's pretty much it and to do so you need to go to the replication tab in the database and enable it for the tables that you want to listen to another issue is that apparently the security policies will not work with real-time data although i think they have plans to address that in the future the bottom line is that if you're looking to build a robust real-time feature you'll have a lot more work to do in supabase than you would in firebase but now let's shift gears to pricing because firebase is really difficult to beat on price so both products have a base free tier that's really only useful for experimentation if you're building something serious on firebase you'll use the pay-as-you-go plan every individual service has a free tier and you only pay for what you use beyond the free threshold on supabase you pay 25 a month for up to 8 gigabytes of database space and 100 000 users compared to firestore which would cost about a dollar fifty for eight gigabytes of data that may sound expensive but in firestore you also pay for the number of reads and writes to the database which tends to make up the bulk of your monthly cost but in supabase it looks like you have unlimited api calls and network traffic to your database which is an amazing deal because normally you have to pay for cpus to handle the traffic going into your database which gets extremely expensive at scale even for a relatively small database on google cloud with four cpus you're looking at almost 300 bucks a month now if you need more than eight gigabytes on supabase you can go up to the pay-as-you-go plan which will cost an additional 12 cents per month per gigabyte which is also an incredible deal and far below anything offered by any of the major cloud providers supabase originally had their infrastructure on digitalocean but recently migrated over to aws they have at least 6 million in funding currently but you have to wonder how long they can sustain this pricing startups don't need business models that make money but you would be taking a bigger risk as a developer because if supabase fails to raise more money in the future i doubt their current pricing model would even cover their aws bill whereas google can lose as much money on firebase as it wants not to mention it owns all the underlying data centers so it's very unlikely that google will ever drop the platform or change the pricing dramatically because we all know google definitely doesn't have a reputation for killing off products and that brings us to the question is supabase legit first of all i wouldn't really look at this product and call it a firebase alternative that's really just a marketing hack to get people's attention and get videos like this made but it does have the potential to get there someday if you happen to be a firebase product manager please add an sql database to the platform i would definitely consider using supabase for the database alone it's really the only feature that stands out to me as offering some potentially major advantages over firebase the option to self-host is also a nice safety net in case the tech overlords ever turn on you but in reality the reason people use a backend as a service is so they don't have to self-host their own backend one other issue with superbase right now is that it only has a javascript sdk firebase is really popular with mobile game developers and you can't really call superbase a firebase alternative until sdks exist for ios and android overall i think it's definitely a promising product but let me know what you guys think in the comments thanks for watching and i will see you in the next one
Info
Channel: Fireship
Views: 149,239
Rating: 4.9811177 out of 5
Keywords: webdev, app development, lesson, tutorial, firebase, supabase, comparison, supabase review, firebase review
Id: WiwfiVdfRIc
Channel Id: undefined
Length: 8min 16sec (496 seconds)
Published: Thu Apr 29 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.