The main Firebase alternatives for Flutter are Supabase (supabase_flutter), Appwrite and WoWSQL (wowsql on pub.dev), and the first two plus WoWSQL give you Postgres instead of Firestore documents. WoWSQL is a Postgres backend-as-a-service with a Flutter/Dart SDK for auth, tables, storage and realtime, Row Level Security in the database, and a free plan. You don't have to move everything at once: keep Firebase Cloud Messaging for push and move auth and data first, using the method-by-method map below. Facts were checked on 30 November 2026.
Key facts
- Package:
wowsql3.10.0 (published 18 Oct 2026; Android, iOS, web, macOS, Windows, Linux). Classes:ProjectAuthClient,WOWSQLClient(tables and realtime) andWOWSQLStorage.- FlutterFire today (pub.dev, 30 Nov 2026):
firebase_auth7.1.0,cloud_firestore7.2.0,firebase_storage14.1.0. Supabase's package issupabase_flutter2.18.3.- Auth (docs): email and password, magic links, email or phone OTP, OAuth with 19 working providers, TOTP two-factor, optional Cloudflare Turnstile CAPTCHA.
- Plans (pricing, USD): Free $0 (1 project, 256 MB database, 512 MB files, 10,000 MAU, read-only over a limit); Pro $25/month (dedicated Postgres, 10 GB database, 100 GB files, 100,000 MAU, daily backups kept 7 days); Scale $99/month (2,000,000 MAU, custom domains). Extra MAU $0.00325.
- Regions: Mumbai (
ap-south-1), US East (us-east-1), Frankfurt (eu-central-1). No UK region; UK apps usually pick Frankfurt, which is a data-location choice, not UK residency.- Not included: an offline cache like Firestore's, and push notifications. Keep FCM for push.
Should you leave Firebase at all?
Firebase is very good at some things Flutter developers rely on. Stay, or keep those pieces, if:
- Offline-first matters. Firestore's offline persistence is on by default on Android and Apple platforms (Firebase docs, read 30 Nov 2026). The
wowsqlpackage has no offline cache; we read its source. You would add your own (for example a local SQLite or Hive cache). - You use the Google extras. FCM, Crashlytics, Analytics, Remote Config and App Check have no WoWSQL equivalent. They can keep running next to a different database.
Move to Postgres when the data is relational (orders, line items, members, bookings), when you want SQL and joins instead of denormalised documents, when read-count billing makes costs hard to predict, or when you want rules enforced by the database rather than a separate rules language.
Flutter backends compared
| Firebase | Supabase | Appwrite | WoWSQL | |
|---|---|---|---|---|
| Flutter package | FlutterFire (firebase_auth, cloud_firestore, firebase_storage) |
supabase_flutter |
Appwrite Flutter SDK | wowsql |
| Data model | Firestore documents (NoSQL) | Postgres | Tables and documents | Postgres |
| Access rules | Security Rules | Row Level Security | Permissions | Row Level Security |
| Push | FCM | Use FCM or similar; triggers from Edge Functions | Appwrite Messaging (push) | Use FCM |
| APIs | SDKs | REST and GraphQL | REST, GraphQL, realtime | REST (PostgREST), realtime; no GraphQL |
| Self-host | No | Yes | Yes | Yes (self-hosted edition) |
Sources (read 30 Nov 2026): Supabase: best mobile app backend providers (updated 23 Nov 2026), Firebase pricing, Appwrite docs on permissions, messaging and GraphQL, pub.dev package pages. Firestore's offline cache is documented by Firebase; the wowsql package has none, and we did not check Supabase's or Appwrite's offline support.
Where others are ahead. Supabase has the larger Flutter community and more tutorials, a bigger free tier (2 projects, 500 MB, 50,000 MAU per Supabase pricing) and GraphQL. Firebase's offline sync and FCM integration are hard to beat for chat-style mobile apps. WoWSQL's case is plain Postgres with auth, storage and realtime in one SDK, regions in Mumbai, US East and Frankfurt, and simple published pricing.
The FlutterFire to WoWSQL map
Every WoWSQL call below compiles against wowsql 3.10.0 (checked with dart analyze).
| FlutterFire | WoWSQL (wowsql 3.10.0) |
Notes |
|---|---|---|
FirebaseAuth.instance.createUserWithEmailAndPassword(...) |
auth.signUp(email:, password:, fullName:) |
auth is a ProjectAuthClient |
signInWithEmailAndPassword(...) |
auth.signIn(email:, password:) |
If requires2fa is true, call verifyTwoFactorLogin(pendingToken, code: ...) |
sendPasswordResetEmail(email:) |
auth.forgotPassword(email:) |
Then resetPassword(token:, newPassword:) |
signInWithProvider(GoogleAuthProvider()) |
auth.getOAuthAuthorizationUrl(provider: 'google', redirectUri: ...) |
Open the returned authorization_url in a browser |
verifyPhoneNumber(...) |
auth.sendOtp(phone:, purpose: 'login') then verifyOtp(...) |
Phone numbers in E.164 |
signOut() |
auth.logout() then auth.clearSession() |
See the sign-out note below |
authStateChanges() |
await auth.getSession() at start-up, then your own ValueNotifier |
There is no auth stream |
collection('posts').where(...).orderBy(...).limit(20).get() |
db.table('posts').select([...]).eq(...).order('created_at', SortDirection.desc).limit(20).get() |
Runs with the anon key (see RLS below) |
collection('posts').add({...}) |
db.table('posts').insert({...}) or REST POST /rest/v1/posts |
|
doc(id).update({...}) / doc(id).delete() |
db.table('posts').update(id, {...}) / .delete(id) |
By primary key |
snapshots() |
db.realtime.subscribe(table:, callback:) or a broadcast channel |
Row events only for tables without RLS |
FirebaseStorage.instance.ref(path).putData(bytes) |
storage.upload('bucket', bytes, path:, fileName:, contentType:) |
storage is a WOWSQLStorage |
getDownloadURL() |
storage.getPublicUrl('bucket', 'folder/file.png') |
Public buckets only; no signed URLs |
| Cloud Functions | Compute Functions (Node.js or Python HTTP handlers) | |
| FCM, Crashlytics, Analytics | Keep Firebase for these |
Migrate one feature at a time
Order matters. Move auth first (every later request needs the user's token), then one collection, then files, then live updates. Leave push for last, or leave it on FCM.
Step 1: add the packages
name: wowsql_notes
publish_to: none
environment:
sdk: ^3.5.0
dependencies:
wowsql: ^3.10.0
http: ^1.6.0
In a Flutter app, add flutter: sdk: flutter as usual. The http package is for the RLS-aware requests in step 4.
Step 2: keep users signed in across restarts
ProjectAuthClient stores tokens in memory by default, so a restart signs the user out. It accepts any TokenStorage, which is four methods. Back it with flutter_secure_storage or shared_preferences:
import 'package:wowsql/wowsql.dart';
/// Minimal key-value contract; in Flutter, back it with flutter_secure_storage
/// or shared_preferences so sessions survive an app restart.
abstract class KeyValueStore {
Future<String?> read(String key);
Future<void> write(String key, String value);
Future<void> delete(String key);
}
class PersistentTokenStorage implements TokenStorage {
PersistentTokenStorage(this.store);
final KeyValueStore store;
@override
Future<String?> getAccessToken() => store.read('wowsql_access');
@override
Future<String?> getRefreshToken() => store.read('wowsql_refresh');
@override
Future<void> setTokens({required String accessToken, String? refreshToken}) async {
await store.write('wowsql_access', accessToken);
if (refreshToken != null) await store.write('wowsql_refresh', refreshToken);
}
@override
Future<void> clear() async {
await store.delete('wowsql_access');
await store.delete('wowsql_refresh');
}
}
Step 3: turn a collection into a table
A Firestore notes collection where each user sees only their own documents becomes one table and one policy:
create table public.notes (
id bigint generated always as identity primary key,
user_id uuid not null default auth.uid(),
body text not null,
pinned boolean not null default false,
created_at timestamptz not null default now()
);
alter table public.notes enable row level security;
create policy "own notes" on public.notes for all to authenticated
using (user_id = auth.uid()) with check (user_id = auth.uid());
grant select, insert, update, delete on public.notes to authenticated;
user_id defaults to auth.uid(), so the app never sends it, and the policy blocks reads and writes of anyone else's rows. In the dashboard, switch on the Data API (new projects start with it off) and expose the table.
Step 4: query as the signed-in user
This is the one place where a straight swap of cloud_firestore calls for db.table() calls goes wrong. In wowsql 3.10.0, WOWSQLClient sends the API key you give it as both apikey and the bearer token, so its table queries run as the anon role and per-user policies return nothing. Send the user's access token yourself with the http package:
import 'dart:convert';
import 'package:http/http.dart' as http;
import 'package:wowsql/wowsql.dart';
/// Replaces FirebaseAuth + a Firestore "notes" collection.
class NotesRepository {
NotesRepository({
required this.projectUrl, // https://myapp.wowsqlconnect.com
required this.anonKey, // wowsql_anon_...
TokenStorage? tokenStorage,
http.Client? httpClient,
}) : _http = httpClient ?? http.Client(),
auth = ProjectAuthClient(
projectUrl: projectUrl,
apiKey: anonKey,
tokenStorage: tokenStorage,
);
final String projectUrl;
final String anonKey;
final ProjectAuthClient auth;
final http.Client _http;
// FirebaseAuth.createUserWithEmailAndPassword / signInWithEmailAndPassword
Future<void> signUp(String email, String password) =>
auth.signUp(email: email, password: password);
Future<bool> signIn(String email, String password) async {
final res = await auth.signIn(email: email, password: password);
return !res.requires2fa; // TOTP users finish with auth.verifyTwoFactorLogin()
}
// FirebaseAuth.signOut
Future<void> signOut() async {
try {
await auth.logout(); // revokes the session on the server
} finally {
await auth.clearSession(); // always forget local tokens
}
}
// Requests run as the signed-in user, so Row Level Security applies.
Future<Map<String, String>> _headers() async {
final session = await auth.getSession();
if (session == null) throw StateError('Not signed in');
return {
'apikey': anonKey,
'Authorization': 'Bearer ${session.accessToken}',
'Content-Type': 'application/json',
};
}
Uri _rest(String pathAndQuery) => Uri.parse('$projectUrl/rest/v1/$pathAndQuery');
dynamic _decode(http.Response r) {
if (r.statusCode >= 300) {
throw Exception('${r.statusCode} ${r.body}');
}
return r.body.isEmpty ? null : jsonDecode(r.body);
}
// collection('notes').where('pinned', isEqualTo: true)
// .orderBy('created_at', descending: true).limit(20).get()
Future<List<Map<String, dynamic>>> pinnedNotes() async {
final r = await _http.get(
_rest('notes?pinned=eq.true&order=created_at.desc&limit=20'
'&select=id,body,pinned,created_at'),
headers: await _headers(),
);
return (_decode(r) as List).cast<Map<String, dynamic>>();
}
// collection('notes').add({...})
Future<Map<String, dynamic>> addNote(String body, {bool pinned = false}) async {
final r = await _http.post(
_rest('notes'),
headers: {...await _headers(), 'Prefer': 'return=representation'},
body: jsonEncode({'body': body, 'pinned': pinned}),
);
return ((_decode(r) as List).first as Map).cast<String, dynamic>();
}
// doc(id).update({...})
Future<void> updateNote(int id, Map<String, dynamic> changes) async {
final r = await _http.patch(_rest('notes?id=eq.$id'),
headers: await _headers(), body: jsonEncode(changes));
_decode(r);
}
// doc(id).delete()
Future<void> deleteNote(int id) async {
final r = await _http.delete(_rest('notes?id=eq.$id'), headers: await _headers());
_decode(r);
}
}
Each method carries the Firestore call it replaces as a comment. A user who tries to update someone else's note gets no error and no change: RLS filters the row out, the same way a Firestore rule denial would leave the document alone.
The sign-out note. In 3.10.0, logout() sends only the bearer token (no apikey header), and if that request fails the local tokens stay. The try/finally above always clears them. In our test against a gateway that requires apikey on every request, logout() failed and clearSession() still signed the user out locally.
Step 5: replace snapshots()
db.realtime.subscribe(table: 'posts', callback: ...) streams inserts, updates and deletes, but WoWSQL's realtime service only sends row events to anon or signed-in clients for tables without RLS, because the stream can't filter rows per user. For a public feed that's fine. For per-user data like notes, use a channel as a "something changed" signal and refetch through RLS:
final channel = db.realtime.channel('user-notes');
channel.on('broadcast', {'event': 'changed'}, (_) => refresh()).subscribe();
// after a write:
await channel.send(event: 'changed', payload: {'table': 'notes'});
Channel names are not private, so never put the data itself in the payload. Payloads are capped at 64 KiB.
Moving existing users and documents
- Data. Export Firestore, reshape documents into rows, then bulk insert. Firestore to Postgres: model documents as tables covers subcollections, arrays and maps; Migrate Firebase to WoWSQL covers the export and import.
- Users. WoWSQL's docs don't describe importing Firebase password hashes. The usual routes are a forced password reset email, or a lazy migration: on first sign-in, check the password against Firebase once, then create the WoWSQL user.
- Files. Download from Cloud Storage and upload with
storage.upload. WoWSQL storage gives public URLs for public buckets; there are no presigned URLs, so serve private files through your own server or a Compute Function.
Related guides
- Flutter Postgres backend with the wowsql Dart SDK: the full SDK tour (tables, storage, realtime, Flutter web).
- Best Firebase alternatives 2026: 7 backends compared
- Firebase authentication alternatives for 2026
- Mobile app backend for India: latency, OTP, cost
- Best backend for hackathons: auth and DB in 10 minutes
- Backend for app development agencies in India, if you build Flutter apps for clients.
FAQ
What is the best Firebase alternative for Flutter?
Supabase is the most widely used, with the supabase_flutter package, a bigger free tier and GraphQL. WoWSQL is a Postgres alternative with the wowsql Dart package covering auth, tables, storage and realtime, plus regions in Mumbai, US East and Frankfurt. Appwrite suits teams that want to self-host. Keep Firebase if you depend on offline sync.
Supabase vs Firebase for Flutter: which should I use?
Firebase if your data is document-shaped and offline sync is essential. Supabase or WoWSQL if your data is relational and you want SQL, joins and Row Level Security. Many teams move data to Postgres and keep FCM for push notifications.
Can I use Postgres directly from a Flutter app?
Not safely with a raw database driver, because the credentials would ship in the app. Use a backend that exposes Postgres over an HTTP API with per-user rules, such as WoWSQL's PostgREST API with Row Level Security, and send the signed-in user's token with each request.
How do I do Postgres auth in Flutter?
With WoWSQL, create a ProjectAuthClient with your project URL and anon key, call signUp and signIn, store the session with a TokenStorage backed by secure storage, and send the access token as Authorization: Bearer on REST calls so RLS policies can use auth.uid().
Does the wowsql Flutter package work offline?
No. Version 3.10.0 has no offline cache or sync. If your app must work offline, add a local cache and sync it yourself, or keep Firestore for the offline parts.
Can I keep Firebase Cloud Messaging after moving to WoWSQL?
Yes. FCM doesn't depend on Firestore or Firebase Auth. Store each device's FCM token in a WoWSQL table and send notifications from a server or Compute Function.