Why Next.js and Firebase Still Work for Fast Business Apps
Auth, realtime data and hosting for near-zero effort gets a business app live in weeks. The two real costs are lock-in and queries.
3 min read
There is a version of the stack debate that never ends, and it is mostly about identity. For business applications specifically, the question is narrower than it looks: can this choice get a working product in front of real users in weeks, and will it still be the right choice in two years?
Next.js and Firebase answer the first well. The second depends on your queries.
Where it wins
Two things in that stack are undervalued by people who have not shipped with it.
Speed to launch. Auth that works, including password resets and provider linking, is a week saved on its own. Multiply by five layers and the difference between a stack like this and hand-rolling is measured in months, not days.
Realtime for free. For a business app, realtime is usually a “would be nice” that turns out to matter, a dashboard two people watch, a status that must be current. On Firestore it is a subscription, not an architecture.
Where it costs you
The lock-in point is not that Firebase is bad. It is that the cost is concentrated at exactly the moment it is most expensive to pay, when the application has grown enough to need relational queries.
When to choose Supabase instead
Supabase is the same pitch with SQL underneath, and it changes the exit cost.
- You need relational queries or reporting. Joins, aggregates and window functions are the reason to be on Postgres, and no amount of document modelling removes the need.
- You need row-level security. A permission model of the kind described in designing role-based access control is native in Postgres and awkward on Firestore, where rules are per-request rather than per-row.
- You are multi-tenant and care about isolation. Enforcing tenancy in the database, as in building a multi-tenant CRM, is a policy in Postgres and a client-side discipline on Firestore.
- You want to leave. Supabase is Postgres, so the data layer is portable. That is worth more than it sounds.
The rule I actually use
Realtime-first, document-shaped, small and internal: Firebase, and ship this month. Relational, multi-tenant, reporting-heavy, or anything where you might eventually want to leave: Supabase, and pay the slightly slower start.
Neither answer is a philosophy. Both are bets about how much of your product is shape and how much is relationships, and the second one is right more often as a business grows. For the truly small version of “get it in front of users today”, there is an even lower floor: a single HTML file.
The migration you are deferring
Nobody chooses a stack planning to leave it. The question is what leaving would cost, and the honest answer for a document store is that the cost is not the data, exporting JSON is trivial, but the queries.
Every read path in the application encodes an assumption about how documents are
shaped. Moving to SQL means rewriting each one as a join or a view, and the ones
that are expensive are the ones you wrote early and never revisited. A count that
was a get().size on a collection becomes an aggregate somebody has to be
trusted to run. A lookup that followed two document references becomes a join
that the original author never had to think about.
That is why the deciding question is not “how much data” but “how relational will the questions get”. A product whose reports are lists of records is fine either way. A product whose users will eventually ask for “all clients whose advisor changed in the same quarter as a missed payment” is a SQL application, and the sooner it is one, the cheaper the answer is.
The pragmatic version: if you can describe your product’s hardest query in one sentence, ask whether a document store can express it. If it cannot, that is your answer, and it will not change by launching first.
On this page
Related reading
PHP Vulnerabilities in the Crosshairs Lessons from CISA KEV
When widely deployed software like PHP hits the CISA Known Exploited Vulnerabilities catalog, the lesson is not about patching speed alone.
1 min read
The Case for Single-File HTML Apps
A dashboard and a chart generator that ship as one file each: zero-install sharing, real offline use, and the lines you should not cross.
3 min read
Building a multi-tenant CRM: scope and integrations
A travel agency CRM that grew from a spreadsheet replacement into Facebook lead capture, email automation, quote acceptance and integrations.
6 min read