Developers September 16, 2020

Firebase Open Source Alternative

Nikola Stojković @stojkovic

Hey there :)

I'm about to ditch Firebase in favor to some (preferably open source) alternative.

The only thing I use from Firebase is the Authenticate feature.

Do you have anything to recommend and why?

Cheers!

  1. 5

    I'd recommend Parse Server as its completely open source and gives you most of the same functionality out-the-box with full control due to its very open-source nature

    1. 1

      We have been using Parse Server, it's documentation is pretty good and switching from firebase to parse was quite easy.

  2. 3

    Check out supabase.io - have heard good things

    1. 1

      Was about to suggest the same thing!

    2. 1

      You still have to pay for a Postgres intance though.

      1. 1

        If you join the Alpha, it sets up everything for you. https://app.supabase.io/

        1. 1

          They run Postgres for free?

          1. 2
  3. 3

    Never used firebase.

    MySQL = One Love!

    1. 4

      I can say that for Postgres

  4. 2

    If you're only using firebase for auth, what are you using for your backend?

  5. 2

    Not OSS, but Auth0 will take care of authentication, if that's all you need to replace.

  6. 1

    www.kintohub.com should be helpful, but does not come with the bells and whistles of pre-made services. We're looking to host supabase.io's next version with auth on Kinto in a one-click fashion. And looking for more flavors to help make it easy to deploy services longside OSS firebase goodies. Do advise!

  7. 1

    For a self hosted version, I've been really impressed with KeyCloak. Setup is a little bit tricky but once you have it running you can forget about it. It handles the OAuth flow properly i.e. issues access tokens (and expires sessions), and also handles Single Sign On from Google and other services. It has a default login page which you can configure with things like a 'Forgot my Password' link and you can configure it to ask the user for email verification (although you need to have a mail server for it to connect to) and also it gives you an admin panel to view all your registrations. As a bonus there is a library called Keycloak-connect that gives it a nice integration with Express so you can manage API access. Learning curve can be a bit steep if you are unfamiliar with OAuth concepts but the benefits are that you can scale to thousands of users without costing anything.

  8. 1

    There is no reason to use Firebase, in fact all "cloud" databases will cost you time and money without helping you ship any faster.

    Imo use MongoDB Atlas.

    For authentication, don't do anything fancy. Use JsonWebTokens. (Firebase auth is basically just built on the same thing and they've found a great way to make something simple, complicated)

    1. 1

      It's just much easier to use Firebase/Amplify with other Auth Services like Google, GitHub, etc.

      1. 1

        Not true. Without going into the boring details, trust me; I've tried both approaches.

    2. 1

      100 times this! Use a tried and tested DB

      1. 3

        MongoDB consistently misrepresents the correctness of their database and their database frequently fails heavy testing. I would not suggest using something built on MongoDB

        https://www.infoq.com/news/2020/05/Jepsen-MongoDB-4-2-6/

        If one wants to store JSON, PostgreSQL is probably sufficient.

        1. 1

          Don't believe the hate about MongoDB .. most of that is due to them changing their open-source license a few years ago..

          MDB is a GREAT product and has been able to handle anything I've thrown at it.

          Of course, Postgre is the most popular option, I just don't like working with SQL that much unless there is a clear need.

          Whatever the case, avoid Firebase~

          1. 1

            The technical critiques of MongoDB are not fabricated based on disliking the licence. They are legitimate. They may not impact your workloads (but it's hard to tell unless you're looking out for them), but they do exist.

            1. 1

              If you have a specialized use case, I agree. The real limitation of MongoDB is doing joins and aggregations; it's possible but a bit verbose compared to SQL.

              For Darwin (darwin.dev), we are using several different types of big data DBs along with Mongo

              1. 1

                The limitation of MongoDB is that concurrent writes to the same object can be lost, I don't think that is a particularly specialized use case.

        2. 1

          Exactly.

          I would go with Dynamo, Fauna, or Cosmos instead of Postgres though. Those are much easier/cheaper to host and can be used from serverless environments with no limits on concurrent connections.

          OTOH the big advantage of Postgres is no vendor lock-in.

    3. 1

      Isn't Atlas just MongoDB's version of Firebase?

      1. 2

        Not really, Atlas is just a database as a service. There’s a lot more in Firebase than just storing data (like functions, auth, etc). Atlas is probably closest to Firestore minus syncing.

        Mongo Org does offer some other things like Mongo Stitch and they purchased a Realm recently. So some of those bits point towards the real-time database and serverless platform, but I don’t know if it’s as cohesive as Firebase at this point.

      2. 1

        The problem with Firebase is Firebase. It's a very abstracted, limited, and difficult to use product...

        I'm sure they'd fix it if they could, but these decisions were made years ago.