# Supabase vs Neon vs Cloudflare D1 vs Firestore

> Picking a database for an AI-built app. I've used all four in real projects: what each is good at, free plan behavior, lock-in, and which to choose.

By Tommy Pham · 2026-11-14 · https://tommydev.web.app/blog/supabase-vs-neon-vs-d1-vs-firestore

**Short answer:** **Supabase** if you want Postgres plus auth, storage and an admin UI in one place (and Lovable and Bolt can both connect to it). **Neon** if you want just serverless Postgres that scales to zero, with your own auth. **Cloudflare D1** if your app already runs on Cloudflare Workers and the data is modest. **Firestore** for mobile-first apps with realtime sync and Firebase Auth.

I've used each one in a real project: Supabase in [PainBase](/work/painbase), Neon with Drizzle in a lead-generation dashboard, D1 in [StayFlow](/work/stayflow-pms), and Firebase in [Pocket Party](/work/pocket-party).

## Side-by-side (checked November 2026)

| | Supabase | Neon | Cloudflare D1 | Firestore |
|---|---|---|---|---|
| Database type | Postgres | Postgres | SQLite | Document (NoSQL) |
| Comes with | Auth, storage, realtime, edge functions | Branching, scale to zero | Workers, KV, R2 on the same platform | Auth, realtime sync, offline cache |
| Free plan when idle | Projects pause after 7 days of low activity | Compute sleeps after 5 minutes idle and wakes on the next query | Always available | Always available |
| Free plan size | 2 active projects | Many projects | 500 MB per database, 5 GB per account | Daily read/write/storage quotas |
| Access rules | Row Level Security in Postgres | Your app code (or Postgres RLS) | Your Worker code | Firebase Security Rules |
| Querying | SQL, plus the supabase-js client | SQL, any Postgres driver or ORM | SQL from Workers | SDK queries, limited joins |
| Lock-in | Low (it's Postgres) | Low (it's Postgres) | Medium (SQLite, Workers-bound) | High (proprietary model) |

## Supabase

**Best for:** apps that need a backend in a box. You get Postgres, auth, file storage and realtime in one dashboard, and AI builders know it well.

**Watch out for:** free projects **pause after 7 days of low activity**. Fine for a prototype, bad for a launched app with quiet weeks. Paid projects don't pause. And because the browser talks to the database directly, [RLS policies](/blog/supabase-rls-vibe-coding) are your security.

## Neon

**Best for:** when you want serverless Postgres and already have auth (Clerk, Better Auth, Auth.js). It pairs well with Drizzle or Prisma in a Next.js app. **Branching** gives you a copy of production data for testing a migration, which is very useful.

**Watch out for:** compute scales to zero after idle time on the free plan, so the first query after a quiet period is a bit slower. Neon only gives you the database. Auth, storage and access rules are up to you.

## Cloudflare D1

**Best for:** apps on Cloudflare Workers. The database sits next to your code with no connection strings and no pool to manage. In StayFlow, bookings, housekeeping tasks and revenue data live in D1, queried from a Hono API on Workers.

**Watch out for:** it's SQLite, so some Postgres features (certain types, extensions) aren't available. The free plan caps a database at 500 MB (10 GB on paid). It's only reachable from Workers or Cloudflare's HTTP API, so it's less portable.

## Firestore

**Best for:** mobile apps that need realtime updates and offline support, with Firebase Auth. Pocket Party ran on Firebase.

**Watch out for:** document databases make reporting and relations harder. Questions like "revenue by customer by month" need extra modeling or an export to BigQuery. Pricing is per read and write, so a chatty screen can cost more than you expect. And [Security Rules](/blog/firebase-auth-vs-supabase-auth) must check ownership, not just login.

## Which should you pick?

- **Built with Lovable or Bolt and you want to own the backend:** Supabase. Both builders can connect to it, and it's the documented way out of Lovable Cloud.
- **Next.js app with your own auth:** Neon (or Supabase without its auth).
- **Already on Cloudflare Workers:** D1, as long as the data fits.
- **React Native or Expo app with realtime and offline needs:** Firestore.
- **Not sure:** Postgres (Supabase or Neon). It's the easiest to move later.

## FAQ

### How do I stop my Supabase free project from pausing?

Upgrade to a paid plan, which never pauses. Some people ping the database on a schedule to keep it active, but that's working around the policy. Once real users depend on the app, pay for it.

### Can I move from Supabase to Neon?

Yes, with `pg_dump` and restore, since both are Postgres. Auth users and storage files need separate handling.

### Is SQLite (D1) good enough for production?

For many internal tools and small SaaS apps, yes. StayFlow runs on it. If you expect heavy concurrent writes or need Postgres extensions, choose Postgres.

---

Choosing a database or migrating off one? I can help. See [my work](/#work) or get in touch below.

## Sources

- Supabase docs: [Free project pausing](https://supabase.com/docs/guides/platform/free-project-pausing)
- Neon: [Neon vs Supabase free plan](https://neon.com/guides/neon-vs-supabase-free-plan)
- Cloudflare docs: [D1 limits](https://developers.cloudflare.com/d1/platform/limits/)
- [Firebase pricing](https://firebase.google.com/pricing)
- All checked November 2026