DEV Community

Sarah P
Sarah P

Posted on

Passing on Firebase

I'm building an app to make communication with different neurotypes easier. So far, the stack is NextJS for Frontend and Backend, Clerk, Prisma, and CockroachDB. My earlier decision to focus on using Firebase as the DB and authentication to my NextJS and OpenAI app has flipped to a no.

Originally I chose firebase for it's all in one options, authentication, easy use storage, and the need to not have to handle all of my queries via code. My thinking, this is a prototype get it out there first and see what happens.

Then a separate tutorial I was working on broke. And as I fell down a rabbit hole of how best to use Prisma with databases that are not PlanetScale, who stopped their hobby offering. I came across an article about GraphQL and Firebase by Prisma that changed my goal from easyish for ME to set up ---> to scalable for future sustainability.

Prisma is a tool that interfaces with the database, so you don't have to write SQL. It used to be GraphQL, but it needed a little more customization. At least that's based on my observations; there could be other reasons, too.

What stuck out to me about Prisma's argument was the specifics of how Firebase works as an unstructured database, how you can't query more than one level deep at a time. Immediately, I began to see how this could be an issue when writing an app to manage communication nuances between different personalities, neurotypes, and style preferences.

What if I wanted to see how many people over 40 were choosing the "demand avoidance" option when messaging people under 18? Getting this level of data would be very difficult with Firebase. However, with a combination of Prisma and Cockroach, I can write queries like that from the start and build a more robust dashboard for my users to see their own data more easily.

The other thing that stood out was more philosophy and having over a decade of experience building web apps. Google owns Firebase. It doesn't have an open-source mentality; it is the opposite. And when Google tires of something, it has a habit of switching gears rather rapidly. Putting all my apps in the Google basket is not the smartest business choice, even if it is just a prototype.

So, that was the end of Firebase for me. Authentication is coming from Clerk now, with Prisma and Cockroach. Although it has issues I may have to work around or switch out from, that's for another post.

Top comments (0)