
7 min read
From the studio
We build apps people actually keep.Tinkrd is a small indie studio making focused, high-quality apps for everyday life. See what we're working on.
View our appsFirebase is a Backend-as-a-Service platform from Google that lets a small team skip building a server from scratch and get to shipping faster. It handles auth, a real-time database, file storage, and hosting under one roof. If you have ever stared at an empty project and wondered where to even start, Firebase is one of the more sensible answers.
What Firebase BaaS Actually Does
Firebase BaaS provides a suite of backend infrastructure that developers access through client SDKs, without writing or managing server code. The core services most indie teams use are Firestore (a NoSQL document database), Firebase Authentication, Cloud Storage, and Firebase Hosting. You call these services directly from your app, and Google runs the infrastructure underneath.
The real draw is speed. A solo developer or two-person team can have auth, a working database, and a deployed front end running in an afternoon. The SDKs handle real-time data syncing, offline support, and session management without extra configuration.
Firebase also includes Cloud Functions, which are small server-side scripts that run in response to events. That covers the cases where you genuinely do need backend logic, like sending an email after a user signs up, without maintaining a full server.
Firebase Pricing: Free Tier and Where It Gets Expensive
Firebase runs on a Spark (free) plan and a Blaze (pay-as-you-go) plan. The Spark plan is generous enough to build and test real apps, but you will hit limits once you have real users.
| Service | Spark (Free) | Blaze (Paid) |
|---|---|---|
| Firestore reads | 50,000 / day | $0.06 per 100k |
| Firestore writes | 20,000 / day | $0.18 per 100k |
| Authentication | 10,000 / month | $0.0055 per MAU above 10k |
| Cloud Storage | 5 GB | $0.026 per GB |
| Cloud Functions | Not available | 2M invocations free, then $0.40 per 1M |
The main gotcha is Firestore read costs at scale. Apps with lots of list views or real-time listeners can rack up reads quickly if you are not careful with your data structure. Budget alerts inside the Firebase console are worth setting up from day one.
For a comparison of hosting costs on the front-end side, our breakdown of Vercel pricing for indie developers is worth reading alongside this.
How to Set Up Firebase in a New Project
Getting Firebase connected to a web or mobile project takes about ten minutes. The steps below assume a JavaScript web app, but the pattern is the same for iOS and Android.
Install the SDK
npm install firebase
Initialize Firebase in your app
import { initializeApp } from 'firebase/app';
import { getFirestore } from 'firebase/firestore';
import { getAuth } from 'firebase/auth';
const firebaseConfig = {
apiKey: 'YOUR_API_KEY',
authDomain: 'your-app.firebaseapp.com',
projectId: 'your-app-id',
storageBucket: 'your-app-id.appspot.com',
messagingSenderId: '123456789',
appId: 'YOUR_APP_ID'
};
const app = initializeApp(firebaseConfig);
export const db = getFirestore(app);
export const auth = getAuth(app);
Write and read a Firestore document
import { doc, setDoc, getDoc } from 'firebase/firestore';
import { db } from './firebase';
// Write
await setDoc(doc(db, 'users', userId), { name: 'Alice', plan: 'free' });
// Read
const snap = await getDoc(doc(db, 'users', userId));
console.log(snap.data());
The config object comes straight from the Firebase console under Project Settings. Keep it in an environment variable file, not committed to your repo, even though Firebase API keys are not truly secret by themselves.
Firebase vs Other BaaS Options
Firebase is not the only Backend-as-a-Service worth knowing. Supabase, Appwrite, and Pocketbase are the main alternatives indie developers actually use.
| Platform | Database | Auth | Self-host | Free tier |
|---|---|---|---|---|
| Firebase | Firestore (NoSQL) | Yes | No | Yes, generous |
| Supabase | PostgreSQL (SQL) | Yes | Yes | Yes, two projects |
| Appwrite | MariaDB (SQL) | Yes | Yes | Yes |
| Pocketbase | SQLite | Yes | Required | Open source |
Firebase wins on ecosystem maturity and Google’s reliability track record. Supabase is a strong pick if your team thinks in SQL and wants a Postgres database underneath. Pocketbase is interesting for teams that want to self-host a single binary, though that trades Google’s infrastructure for your own ops burden.
At Tinkrd, we evaluated a few of these before settling on our stack for Stepping Stones. The deciding factor was usually how much time we wanted to spend on infrastructure versus product. Firebase let us focus on the app.
When Firebase BaaS Is the Wrong Choice
Firebase is not the right tool for every project. There are real cases where it creates more problems than it solves.
- You need relational queries. Firestore is a document database. Complex joins or aggregations that are simple in SQL become awkward data modeling exercises in Firestore.
- You want vendor independence. Firebase is tightly coupled to Google Cloud. Migrating off it later is painful, especially your auth tokens and Firestore data.
- Your read pattern is heavy. Apps that query large lists frequently can burn through Firestore read quotas faster than expected. A read-heavy analytics dashboard, for example, is a bad fit.
- You need full control over your backend. Firebase Security Rules are powerful but not a replacement for server-side business logic when that logic is genuinely complex.
If you are building something more product-shaped than data-shaped, and want to avoid the overhead of a full backend, the guide on developing a SaaS application without overcomplicating it covers some of these trade-offs from a different angle.
Firebase Security Rules: The Part Most People Skip
Firebase Security Rules are the access control layer that sits between your users and your data. Without them, anyone with your config object can read and write your entire database. Setting them up correctly is not optional.
Rules live in a firestore.rules file and get deployed with the Firebase CLI. A basic rules setup for an authenticated-only app looks like this:
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /users/{userId} {
allow read, write: if request.auth != null
&& request.auth.uid == userId;
}
}
}
This says a user can only read or write their own document, and only if they are signed in. The official Firebase Security Rules documentation covers the full rule syntax including field-level validation, which matters when you are storing anything sensitive.
Test your rules in the Firebase console using the Rules Playground before deploying. Broken rules are one of the more embarrassing launch-day bugs a small team can ship.
Frequently asked questions
Is Firebase BaaS free for small apps?
Firebase’s Spark plan is free and covers most needs during development and early user growth. You get 50,000 Firestore reads per day, 10,000 monthly authenticated users, and 5 GB of storage. Once you need Cloud Functions or exceed those limits, you move to the Blaze pay-as-you-go plan, which still has a free tier built in.
Does Firebase scale well for production apps?
Firebase scales well for most consumer apps. Google’s infrastructure handles traffic spikes without configuration on your part. The scaling concern is usually cost, not capacity. As reads and writes grow, bills can climb if your data model is inefficient, so design your Firestore collections with query patterns in mind from the start.
Can I use Firebase with React, Next.js, or React Native?
Firebase works with all three. The JavaScript SDK runs in React and Next.js with no issues, though for server-side rendering in Next.js you will want to use the Firebase Admin SDK on the server side and the client SDK in the browser. React Native support is solid through the React Native Firebase library maintained by Invertase.
How does Firebase compare to building your own backend?
Firebase BaaS replaces the parts of a backend that are the most tedious to build, auth, database hosting, file storage, and basic API infrastructure. A custom backend gives you more control and avoids vendor lock-in, but it takes weeks to build well. For a small team moving fast, Firebase usually wins early on. The question is whether you are willing to deal with the migration cost later if your needs outgrow it.
What is the difference between Firebase Realtime Database and Firestore?
Firebase Realtime Database is the older product, a large JSON tree with real-time sync. Firestore is the newer, more structured document database with better querying and more predictable pricing. For new projects, Firestore is almost always the right choice. The Realtime Database still has niche uses for very high-frequency small data updates, like multiplayer game state.
Firebase BaaS is a genuinely good starting point for a small team that wants to ship a working product without getting buried in infrastructure. Know its limits, set your security rules from day one, and keep an eye on your read counts. The rest is just building.
We’re building in the open
Tinkrd is a small studio making thoughtful apps for families. Our first app is launching soon.