Firebase bundles a NoSQL database (Firestore), authentication, file storage, cloud functions, hosting, remote config, and analytics into one platform. For mobile-first apps and prototypes, the speed of going from nothing to a working backend is hard to match. Google's infrastructure handles scale, and the free tier is generous.
The tradeoffs accumulate. Firestore is NoSQL, which means restructuring your data if your use case is relational. Vendor lock-in is high because Firestore's query language and data model are proprietary. Pricing can spike unpredictably with reads, writes, and function invocations. And once your backend needs custom server-side logic beyond what Cloud Functions easily supports, you're working around the platform instead of with it.
This guide covers alternatives that address those limitations, from relational database platforms to self-hosted options and the approach that gives you full infrastructure control.
| Feature | Encore | Supabase | Appwrite | Convex | PocketBase |
|---|---|---|---|---|---|
| Type | Framework + Cloud Platform | BaaS (Postgres) | Open-source BaaS | Reactive backend | Self-hosted backend |
| Database | Your own RDS / Cloud SQL | PostgreSQL | MariaDB | Custom document store | SQLite |
| Deploy target | Your AWS/GCP account | Supabase Cloud | Self-hosted or Cloud | Convex Cloud or self-hosted | Any server |
| Infrastructure ownership | Full (your account) | None | Full (if self-hosted) | Full (if self-hosted) | Full (single server) |
| Auth | Built-in, or bring your own | Built-in (GoTrue) | Built-in | Clerk integration | Built-in |
| Storage | S3 / GCS (auto-provisioned) | Built-in | Built-in | Built-in | Built-in |
| Real-time | Pub/Sub (SNS+SQS / GCP Pub/Sub) | Realtime subscriptions | Realtime API | Reactive by default | SSE |
| Server-side logic | TypeScript/Go API endpoints | Edge Functions (Deno) | Appwrite Functions | Convex functions | None |
| Vendor lock-in | Low (Docker export, standard cloud) | Moderate (Postgres portable) | Low (self-hosted) | Moderate (custom runtime) | None |
Encore takes a different approach from Firebase and the other BaaS platforms on this list. Instead of using a client SDK to interact with managed services, you write server-side code in TypeScript or Go that declares its infrastructure needs. Databases, Pub/Sub, cron jobs, and storage are declared as objects in your application code, and Encore provisions the corresponding AWS or GCP services in your own cloud account.
For teams leaving Firebase because they've outgrown the BaaS model, Encore gives you the server-side control that Firebase doesn't, plus infrastructure automation that prevents you from spending weeks setting up Terraform and CI/CD.
import { api } from "encore.dev/api";
import { SQLDatabase } from "encore.dev/storage/sqldb";
import { Bucket } from "encore.dev/storage/objects";
import { Topic } from "encore.dev/pubsub";
// Provisions RDS on AWS or Cloud SQL on GCP with sensible defaults (uses Docker Postgres locally).
const db = new SQLDatabase("app", { migrations: "./migrations" });
// Provisions S3 on AWS, GCS on GCP, or any S3-compatible (DigitalOcean Spaces, etc.)
const uploads = new Bucket("uploads", { versioned: false });
// Provisions SNS+SQS on AWS or GCP Pub/Sub on GCP with sensible defaults (in-memory locally).
const events = new Topic<AppEvent>("app-events", {
deliveryGuarantee: "at-least-once",
});
export const createItem = api(
{ method: "POST", path: "/items", expose: true, auth: true },
async (req: CreateItemRequest): Promise<Item> => {
const item = await db.queryRow`
INSERT INTO items (name, owner_id) VALUES (${req.name}, ${req.ownerId})
RETURNING *`;
await events.publish({ type: "item.created", itemId: item!.id });
return item!;
}
);
encore build docker for standard Docker imagesMoving from Firebase's client SDK pattern to writing server-side code is a meaningful shift. Instead of calling firebase.firestore().collection("items").add(...) from your frontend, you write API endpoints that handle the logic on the server. This gives you full control over authorization, validation, and business logic. It's the same development model every backend framework uses, and it's what most teams adopt once their application grows past prototyping. If you want to leave, encore build docker generates standard containers and your cloud resources stay in your account.
Want to jump straight to a running app? Clone this starter and deploy it to your own cloud.
Supabase is the most popular Firebase alternative and the closest in development model. It replaces Firestore with PostgreSQL, GoTrue for auth, S3-compatible storage, and Deno-based edge functions. The client SDK pattern is similar to Firebase, so the migration path is the shortest.
The biggest advantage over Firebase is PostgreSQL. Your data model can be relational with proper joins, foreign keys, and transactions. The pgvector extension adds vector search for AI features without a separate database.
Supabase is a managed platform where you don't control the underlying infrastructure. Pricing scales with database size, bandwidth, and function invocations. VPC peering isn't available (PrivateLink exists on the $599/month Team plan for database connections only). If your reason for leaving Firebase is infrastructure control or compliance requirements, Supabase has similar limitations. For a deeper comparison, see our Supabase Alternatives guide.
Appwrite is an open-source BaaS that you can self-host or use as a managed cloud service. The feature set is similar to Firebase: database, auth, storage, functions, and real-time. The key difference is that self-hosting gives you full control over your infrastructure.
Appwrite uses MariaDB under the hood instead of a NoSQL store, so the data model is more structured than Firestore. The client SDK pattern is similar to Firebase.
Self-hosting gives you infrastructure ownership but you take on updates, backups, monitoring, scaling, and security patching. If you don't want to self-host, Appwrite Cloud has the same shared-infrastructure tradeoffs as Firebase and Supabase.
Convex is a reactive backend platform. Instead of a traditional database with queries, you write TypeScript functions that Convex runs on its infrastructure. The database is a document store with automatic real-time subscriptions: when data changes, connected clients update immediately.
If real-time reactivity is central to your application, Convex's model is more natural than adding real-time on top of a traditional backend.
Convex's database uses a custom document model and doesn't support SQL. Migrating away means rewriting your data access layer. The self-hosted option stores data in SQLite or Postgres, though the deployment tooling is newer than the managed cloud. If you need Postgres compatibility or standard cloud services, Convex isn't the right direction.
PocketBase is an open-source backend packaged as a single Go binary. Download it, run it, and you get a SQLite database, authentication, file storage, and a real-time API. For solo developers and small projects, the simplicity is unmatched.
PocketBase runs on a single server with SQLite. There's no horizontal scaling, no managed cloud option, and no support for Postgres. If your application outgrew Firebase, moving to another single-server architecture with a simpler database engine may not solve the underlying scaling problem. PocketBase is excellent for personal projects and prototypes, less so for production workloads at scale.
Teams leaving Firebase are usually motivated by one of three things: they need a relational database, they want infrastructure control, or they've outgrown the BaaS model.
Supabase is the most direct Firebase alternative. PostgreSQL replaces Firestore, and the client SDK pattern is familiar. If your main frustration with Firebase is the NoSQL data model, Supabase fixes that while keeping the BaaS development experience. The shared-infrastructure and pricing tradeoffs are similar.
Appwrite gives you the BaaS model with the option to self-host. If you want infrastructure ownership and are willing to manage the hosting, Appwrite is a practical path. Appwrite Cloud has the same shared-infrastructure model as Firebase and Supabase.
Convex is the right choice if real-time reactivity is the core requirement. It solves that problem more naturally than any other platform on this list. The tradeoff is a proprietary data model and no SQL support.
PocketBase works for small projects that need a simple, self-contained backend. If your application outgrew Firebase, PocketBase's single-server SQLite model likely isn't the answer.
Encore is for teams that have outgrown the BaaS model entirely and want server-side control with infrastructure automation. Your backend deploys to standard AWS or GCP services in your own cloud account, with a relational PostgreSQL database, Pub/Sub, cron jobs, object storage, and built-in observability. For teams moving from Firebase to a production backend they own and control, Encore is the most complete option.
Want to jump straight to a running app? Clone this starter and deploy it to your own cloud.