Backend Options for Pronunciation Coach – Home Screen
By Kevin J. Lara Rodríguez (@kevinlara1)
1) Introduction & Scope
Three backend approaches have been evaluated for a small, student-run, Flutter app:
Firebase, Supabase, and a custom Dart backend. Criteria: setup speed, scalability, cost (free
tier), auth, and Flutter/Dart fit. The focus is on fast learning and iteration now, while keeping a
path to grow later.
2) Summary Table (At-a-Glance)
Criteria
Firebase (Google)
Supabase (Open-source,
Postgres)
Integration
FlutterFire plugins;
drop-in SDKs.
First-party Flutter SDK
(supabase_flutter).
Custom Dart Backend
Build & host your own API
(e.g., Shelf); manual HTTP
wiring from Flutter.
Fully managed;
Postgres with joins/indices; Depends on where/how you
Firestore autoScalability
Realtime via replication;
deploy (e.g., Cloud Run
scales; offline
upgrade plan or self-host.
autoscaling).
cache.
Firestore Spark: 1
Free tier: 50k MAUs, 500 Potentially $0 while
GiB storage, 50k
MB DB, 1 GB storage, 5 developing (local or small
Cost (Free)
reads/day, 20k
GB egress; free projects
Cloud Run); you own any
writes/day, 10 GiB
sleep after 1 week inactive. infra cost as you grow.
egress/mo.
Firebase Auth incl. Supabase Auth incl.
Must implement/integrate
Anonymous;
Anonymous; enforced by auth (e.g., verify Firebase
Authentication
integrates with
Postgres RLS (e.g.,
ID tokens or use JWT
Security Rules.
auth.uid()).
library).
Mature FlutterFire Solid Flutter SDK; SQL
Single-language (Dart)
Flutter/Dart
ecosystem; real-time power; add your own offline stack; share models; more
fit
listeners; offline.
caching if needed.
DIY plumbing.
3) Option A — Firebase (Firestore)
Why it’s strong now
1.
2.
3.
4.
Fastest path in Flutter via FlutterFire; minimal backend code.
Auto-scaling & offline reads/writes built-in (great for “continue” data).
Free tier easily covers a class MVP (1 GiB, 50k reads/day, 20k writes/day).
Anonymous Auth lets users start immediately; they can link to real accounts later.
Trade-offs
•
NoSQL model means joins need multiple queries/denormalization; usage-based pricing
needs monitoring as you scale. (General Firestore guidance & quotas).
4) Option B — Supabase (PostgreSQL)
Why it’s compelling
1. Relational data (joins, transactions), if the complexity grows. Realtime is built on
Postgres changes.
2. Clear free tier (500 MB DB, 1 GB storage, 50k MAUs, 5 GB egress); projects pause
after 1 week of inactivity.
3. Anonymous Auth exists; RLS policies (e.g., auth.uid() = user_id) enforce per-row
privacy.
4. Flutter SDK is straightforward to use in a Flutter app.
Trade-offs
•
Requires up-front schema design and RLS policies (great learning, slightly more setup
than Firebase).
5) Option C — Custom Dart Backend
Why/when to consider
•
Single-language stack (Dart front & back), potential code sharing, and total control over
APIs. Use Shelf (minimal web-server middleware) or a framework; deploy on Cloud
Run for autoscaling.
Trade-offs
•
You must own routing, auth, DB, security, monitoring, and infra. For MVPs, this
usually slows delivery versus a BaaS.
Auth notes
•
If you still want instant-use flows, you can have the app obtain a Firebase ID token
(anonymous or otherwise) and your Dart server verifies it on each request, or you
issue/verify JWTs yourself.
6) Implementation Plan (Recommended path now:
Firebase)
1.
2.
3.
4.
5.
Add Firebase to Flutter (firebase_core, then Firestore & Auth).
Enable Anonymous Auth in console; app signs in on first launch.
Create collections: users, sessions (optional progress).
Write Security Rules (per-user access) and test with Rules Simulator.
(Nice-to-have) Offline: Firestore caches and syncs when online.
7) Recommendation
Start with Firebase: quickest integration, built-in anonymous auth, real-time listeners, and
offline support. Re-evaluate Supabase if/when relational needs or predictable fixed pricing
become priorities; consider a custom Dart backend only if you later need capabilities beyond
BaaS.
8) References (primary docs)
•
•
•
•
•
•
•
•
•
Firebase + Flutter: Setup / FlutterFire overview.
Firestore pricing & quotas (Spark): Free daily limits & storage.
Firestore offline: Enable and behavior.
Firebase Auth (Anonymous) and Rules basics/simulator.
Supabase Flutter quickstart & SDK reference.
Supabase pricing (Free): MAUs, DB/storage, egress, sleep.
Supabase Anonymous sign-ins & RLS.
Realtime (Postgres changes).
Dart Shelf and Dart server docs; Cloud Run autoscaling.