Technology

I tried 5 Firebase alternatives


If you follow my channel you know I’m all about that bass about that bass about that Firebase no sequel because honestly I’m just too lazy to build a back end that won’t get hacked to Pieces as soon as it goes live I find it much easier to sell my soul to Google in

Exchange for a real-time app with one line of JavaScript I’m no Apex Alpha Giga Chad building my own back end and rust just to serve five monthly active users a back end as a service is an extremely complicated product for a company to offer you need to take a

Bunch of disparate Cloud infrastructure pieces like databases and servers then write sdks for multiple Platforms in multiple languages then secure and document everything for the lowest common developer it’s not easy and for many years the only game in town was Firebase but that’s not the case in 2023

I tried out five different Firebase alternatives to find out which bass is best including amplify mongodb realm Super Bass and host and apprite will compare popularity pricing features and potential drawbacks of each one of these platforms but first I want to take a look at Firebase to give you a baseline

For comparison its web SDK gets over a million downloads per week but is even more popular on mobile and is used by many popular game studios Firebase has a ton of features like analytics crashlytics performance monitoring and so on but the three most critical for app developers are user authentication

Database and server-side functions these infrastructure pieces are hosted by Google Cloud platform and what Firebase does is provide sdks for front-end applications like JavaScript iOS Android flutter Unity Etc so developers can access them without having to architect deploy and maintain their own server-side code which either requires a

Ton of manual labor or trillions of dollars to hire Engineers to do it for you when it comes to pricing Firebase has a generous free tier then authentication is always free with the exception of phone and multi-factoroth but the firestore database and Cloud function scale up based on usage in some

Cases it can be expensive at scale but it really depends on the application and you should carefully calculate pricing based on your anticipated growth most of my projects grow by a factor of zero which makes Firebase very affordable now one of the biggest drawbacks when using Firebase is that you’re locked in most

Notably firestore is a proprietary database which means if you ever want to use a different database you’d have the big undertaking of migrating that data somewhere else Firebase is Just Like Cocaine it feels great to get things done quickly but trying to come off of

It is not very fun cocaine is a hell of a drug on Firebase we can flip a switch for Google authentication then Implement basic oauth with a single line of code we can then listen to the auth state in real time then take the user ID to make

Queries to the database not only is the code incredibly simple but when data on the server changes it magically updates the UI basically you get real-time apps for free and that brings us to AWS amplify which is Amazon’s answer to Firebase it has a very impressive list of features that include things like

Analytics predictions and notifications that aren’t found on many of the other options on this list its primary database is dynamodb which I found to be pretty painful to work with in the past however amplify automatically creates a graphql API for your data it even has a no code tool to Define relationships for

Your data and it is possible to also connect a relational database to your API in addition you can make your data searchable with elasticsearch which is a big missing feature in Firebase user authentication is handled by AWS Cognito which feels a bit more mature than what Firebase offers most importantly you can

Create user groups then control what those user groups have access to in your project like Firebase pricing as pay as you go so you’ll need to carefully calculate usage to figure out how quickly your money will evaporate and you can also expect vendor lock-in here if you use proprietary AWS products it

Has sdks for all the major web and mobile platforms and is really the only one on this list that challenges the popularity of Firebase with about 400 000 weekly downloads now if we jump into some code you’ll notice a much different developer experience amplify relies heavily on code generation to create the

Back end API for your data this dumps a bunch of code into your project that you’ll have to constantly sync with AWS but it creates a great developer experience for data fetching because you have a graphql schema that provides intellisense but at the same time you don’t need to manually write graphql

Queries you get nice simple one-liners just like the Firebase SDK and that brings us to our next platform Superbass it’s been around since Y combinator season 20 and has the core features you would expect like auth file storage and serverless functions but its main distinguishing feature is the database

It uses the open source postgres a relational database this provides several advantages for one it provides a more flexible and Industry standard way to model data and two you don’t have to worry as much about vendor lock-in because you can host a postgres database anywhere one drawback though is that

There are some missing features like website hosting which means you’ll likely also need something like versel and netlify and its sdks are really only focused on the web with the exception of tools like react native flutter and ionic they don’t seem to be too focused

On the iOS Android side of things it has gotten pretty popular on the web with over 40 000 weekly downloads currently when it comes to pricing there is a free tier but you’re limited to only two projects and they’ll sleep after inactivity for a serious project pricing

Starts at 25 dollars per month but it contains enough usage to take you up to a hundred thousand monthly active users then turns into pay as you go after that overall it’s a great deal when you compare it to pricing for relational databases elsewhere the real magic of

Super Bass though is that it makes relational databases easy to work with it gives us a browser-based tool to manage our data and integrates nicely with user authentication where we can Implement row level security policies to control who has access to our data and I found its JavaScript SDK very enjoyable

To work with it’s a lot like the original Firebase SDK where you use dot notation to grab the data you want and then perform operations on it what’s cool though is that it also supports graphql so you have that option as an alternative postgres also supports things like full text search and can

Return the count of a table which annoyingly is not possible in Firebase when it comes to real-time access to data you’ll have to opt in manually it doesn’t just work out of the box but once you do that you can easily subscribe to it from your front end code

With the SDK next on the list we have in host the open source Firebase alternative with graphql this project is built on top of hasura a very cool platform I’ve broken down in the past that can take a relational database and turn it into a graphql API pricing is

Very similar to Superbass free to play around with and 25 bucks a month to get serious if we look look at npm downloads it doesn’t have a ton of traffic but hasura is extremely popular so that metric doesn’t really paint the full picture in this case the UI is nice and

Intuitive and allows you to visualize all your database records here in the browser what’s special about n-host though is that your postgres database is also a graphql API that means you can play around with queries and mutations right here in the browser as well it’s important to point out though that you

Can’t do everything from the N host dashboard in some cases you’ll need to access hasura to do things like update your database permissions and security rules that might feel somewhat awkward but they do a good job of documenting everything now let’s take a look at some code and host has first class support

For react and provides hooks to perform authentication with a single line of code when it comes to database queries things will get a little more complicated because at that point you’ll be working with graphql and Apollo client these are awesome Technologies but there is a learning curve and the

Code tends to be a bit more verbose than what you would expect with Firebase for example to fetch items from a database we first need to go to hasura and add the table and columns to the schema then to find permissions to allow access to that data and we probably also want to

Go to the graphql Explorer to test out the query before we add it to our code we can then run it with the use Query hook provided by Apollo client on one hand this code feels a bit more robust than Firebase but there’s also more friction if you’re just prototyping

Something quickly ultimately n host feels like a very close competitor to supabass but if you’re into graphql you’ll likely have a preference for the way nose does things next up we have apprite which is another open source backend for web and mobile developers it has the same infrastructure pieces as n

Host and Superbass but has sdks for both the web and mobile as of today it’s not a commercial product yet which means you need to self-host it which can be done with a one-click install on digitalocean but they are coming out with a fully managed service called apprite cloud in

The near future it’s free and open source so you don’t have to worry about vendor lock-in but paradoxically free and open source can actually be more expensive because you don’t have a cash burning startup willing to lose money on YouTube had its growth numbers to raise

More money in the future in terms of popularity the JavaScript SDK doesn’t have a ton of downloads but but the docker image has over 5 million pools go ahead and pull it to spin up the apprite dashboard in your browser it has an impressive list of authentication methods but the most interesting thing

To me is the database it’s a no SQL document database kind of like mongodb or firestore and I found it very easy to use but it also felt kind of mysterious to me I did some research and found that it’s based on mariadb which is actually a relational database and a fork of

MySQL basically what they’re doing is giving you a no SQL API to work with a traditional SQL database this is not unheard of and was inspired by previous work from Wix if we jump into the code we’ll find a lot of easy one-liners for authentication and database management

Like you’d expect from a platform like this one thing it doesn’t support though at this point is graphql in any case apprite does feel like a tool with a lot of potential and that brings us to the final product on this list mongodb realm as you may know mongodb is the most

Popular document oriented database out there and realm was a startup that was acquired a few years ago that focused on providing tools for mobile developers today it can sync data from mongodb Atlas to any web or mobile platform the JavaScript SDK doesn’t have a ton of downloads but it’s highly focused on

Mobile platforms so that doesn’t paint the whole picture pricing will primarily depend on how you use mongodb through Atlas which can either be serverless or dedicated then you have additional pay-as-you-go pricing for compute time on things like serverless functions if we go to the dashboard we’ll find features like authentication although it

Does feel a bit limited compared to other options the real power is in the database and the ability to sync it with front-end applications it’s also capable of generating a graphql API from your database when it comes to accessing data things feel a little more complex than Firebase because you’ll also need to

Think about a schema to Define realm objects which translate mongodb data into something you can actually use in your application once you have it set up it does make real-time subscriptions very easy to manage and you can also use graphql in Apollo if you prefer overall

I think realm is a great option but may feel a little more advanced compared to some of the other options we’ve looked at and it’s a no-brainer if you’re already using mongodb before we wrap up there’s one other platform that I want want to mention called parse it’s been

Around since 2013 and was acquired by Facebook and subsequently shut down a few years later it’s now open source and still actively maintained today but I just haven’t tried it myself ultimately nothing is perfect and it all comes down to trade-offs the only thing that matters is that you get your app shipped

Just to marry the best looking one and hope it all works out in the end but don’t ever get divorced because then you’ll be paying alimony and child support to your legacy apps and finally if you want to see more advanced tutorials about these platforms subscribe to my brand new channel Beyond

Fireship thanks for watching and I will see you in the next one

#Firebase #alternatives
For More Interesting Article Visit : https://mycyberbase.com/

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *