Services / Firebase Development
Firebase Development & Architecture
Scalable Firebase solutions for mobile and web, designed for production from day one. I work with startups and growing businesses who need a reliable, real-time backend without the overhead of managing servers, databases, or infrastructure.
Firebase Services I Work With
Firestore Database Design
Document-collection architecture that supports your query patterns, scales with your data volume, and stays cost-predictable as you grow.
Firebase Authentication
Email/password, Google Sign-In, and anonymous auth flows. Security rules that enforce data access at the database level.
Cloud Functions
Server-side logic without managing servers, triggered by Firestore events, HTTP calls, Auth events, or scheduled jobs.
Real-Time Data Sync
Live Firestore listeners that keep your app's UI up to date without polling, with offline support that queues writes until connectivity returns.
Firebase Analytics & Crashlytics
Event tracking, funnel analysis, user properties, and crash reporting, wired up properly so you can actually make decisions from the data.
Remote Config
Feature flags, A/B test configurations, and dynamic app behaviour that updates without requiring a new app release.
Offline-First Architecture
The most robust mobile apps don't depend on a constant connection. An offline-first architecture means the app works fully when there's no network. Data is stored locally, operations are queued, and everything syncs automatically when connectivity returns.
For South African apps in particular, this is not optional. Variable connectivity, load-shedding, and data costs mean users will regularly be offline. Apps that fail without a connection lose users. Apps that work offline keep them.
The Pattern
Room (local SQLite) holds the canonical data. The UI always reads from local storage, never directly from Firestore.
A sync layer fetches from Firestore in the background and writes results to Room. The UI updates automatically via Flow observers.
User actions write to Room immediately (instant UI feedback), then sync to Firestore when connectivity is available.
Sync timestamps and upsert patterns handle conflicting writes deterministically, with no silent data loss.
Firestore Database Architecture
Firestore's document-collection model is powerful but easy to get wrong. Poor structure leads to expensive reads, query limitations, and data that can't scale. Good structure makes queries fast, costs predictable, and the schema extensible.
Design for your queries, not your data shape
Firestore queries are limited compared to SQL. The right schema is one that makes your most important queries simple and cheap, even if it means denormalising data.
Flat is usually better than nested
Deeply nested sub-collections are hard to query across. Flat top-level collections with references are easier to maintain and scale.
Plan for read cost, not storage cost
Firestore charges per document read. Schemas that require reading 50 documents to render one screen will cost you. Structure data so common operations are cheap.
Security rules are your access control layer
Never rely on client-side logic to protect data. Firebase security rules enforce access at the database level; users can only read and write what you explicitly allow.
AMPM: A Production Firebase Architecture
AMPM's backend is built entirely on Firebase: Firestore, Firebase Auth, Cloud Functions, Remote Config, and Crashlytics. The data architecture was designed to support hundreds of thousands of users, multiple subjects and grade levels, and a subscription system with offline content delivery.
When Firebase Is the Right Choice
Real-time or collaborative apps
Firestore's live listeners make real-time features trivial. Chat, live dashboards, collaborative editing, all without polling.
Mobile-first products
Firebase SDKs for Android and iOS are mature, well-maintained, and handle offline sync, auth, and analytics out of the box.
Small to medium scale without DevOps overhead
No servers to manage, no databases to provision, no infrastructure to maintain. Firebase handles scaling automatically up to significant load.
Startups and MVPs
Firebase lets you build fast. Auth, database, file storage, hosting, and functions in one platform with generous free tiers while you're finding product-market fit.
Need a Scalable Firebase Architecture?
Whether you're starting from scratch, scaling an existing Firebase project, or rethinking a Firestore structure that's becoming a problem, let's talk.
Get in Touch