Skip to main content
Vibe Code Forum

Article: Supabase and Firebase: a database without your own server

As soon as your app needs to remember things for more than one person, or let people sign in, you need a back end. Supabase and Firebase give you one as a service: a database, user accounts, file storage and more, without running a server yourself. AI app builders often connect to one of them for you.

Supabase

  • Built on Postgres, a widely used database with tables, rows and SQL.
  • Includes sign-in (email, magic links, Google and others), file storage, and server-side functions.
  • Your app talks to it directly from the browser using a public (anon) key, which is safe to expose only because Row Level Security decides what each user may read or change.
  • There is also a secret service role key that bypasses all security. It must never go in front-end code.

Firebase

  • Google's platform. Its main database, Firestore, stores documents (like JSON files) rather than tables.
  • Includes sign-in, storage, hosting and server functions.
  • Security is controlled by Security Rules, which play the same part as Supabase's Row Level Security.

Which one?

Both are good. Supabase suits apps with related data (users, orders, products) and people who want standard SQL. Firebase suits apps that sync data live across devices and people already in Google's ecosystem. If your AI tool or app builder already integrates one, use that.

The security step beginners miss

Out of the box, or after an AI writes quick rules "to make it work", your database may let anyone read or change everything. Before real users arrive:

  1. Ask your AI tool: "List every table (or collection) and the security rule on each, in plain English."
  2. Make sure each user can only read and write their own data, and admin actions are restricted.
  3. Test it: sign in as one user and try to load another user's data. It should fail.
  4. In Supabase, check the dashboard's security advisor for warnings.

Free tiers

Both have free tiers that are enough to learn and launch small projects. Free projects may pause when unused or have limits on size and traffic; check the current terms, and set billing alerts before upgrading.

See also: Databases for beginners, Sign-in and accounts.

More in Tools explained