Firebase Firestore: Real-Time App Databases
Build real-time, offline-ready apps without managing servers. Learn Cloud Firestore's document model, queries and listeners, data modelling for NoSQL, Firebase Authentication, security rules and testing with the emulator, transactions, Cloud Functions, and how to keep costs low.
4
units
20
lessons
82
practice questions
~300
minutes
Start learning today
Create a free account, then unlock this and every other Pro course with Learnix Pro for KES 999/month.
Create free account I already have an accountOutcomes
What you'll be able to do
Create a Firebase project and use the Firestore console
Model data as collections, documents and subcollections
Write, read, query and paginate data
Build real-time and offline-capable screens
Authenticate users and protect data with security rules
Use transactions, batches and Cloud Functions
Keep reads (and the bill) low and build a complete app
How it works
Read it, see it, practise it
Each lesson explains one topic clearly, shows worked examples, checks your understanding with quick questions and ends with a practical task you complete yourself.
Clear explanations
Step-by-step lessons in plain language
20 in this course
Worked examples
Real code and examples you can copy and run
19 in this course
Quick checks
Test your understanding as you go
60 in this course
Fill the blank
Recall the key commands and syntax
20 in this course
Hands-on workspace
A practical task at the end of every lesson
20 in this course
Syllabus
Everything you'll encounter
What Is Cloud Firestore?
A serverless, real-time document database from Google: how it differs from SQL and MongoDB, and when to choose it.
Setup: Firebase Project, Console & Emulator
Create a Firebase project, add a web app, initialise Firestore in the SDK, and run the local Emulator Suite.
Collections, Documents & Subcollections
How Firestore organises data: paths, document ids, field types and subcollections.
Writing Data: add, set, update & delete
Create documents with auto or custom ids, merge updates, increment counters, and use server timestamps.
Reading Data: getDoc & getDocs
Read a single document or a whole collection, handle missing documents, and convert timestamps.
Queries, Ordering & Indexes
Filter with where, sort with orderBy, limit results, combine conditions, and create composite indexes.
Pagination with Cursors
Load lists page by page with startAfter cursors, for infinite scroll that stays fast and cheap.
Real-Time Listeners
Subscribe to documents and queries with onSnapshot, react to added/modified/removed changes, and unsubscribe properly.
Offline Support
Let apps keep working without a connection: local cache, pending writes and the hasPendingWrites flag.
Modelling Data for Firestore
Design for your screens: denormalise, store counters, use subcollections, and avoid hot spots.
Firebase Authentication
Add email, Google and phone sign-in, react to auth state, and link users to their Firestore profile.
Security Rules: Who Can Read and Write
Write Firestore security rules that check authentication, ownership and roles, the real backend of a Firebase app.
Validating Data in Rules
Use rules to enforce required fields, types, sizes and allowed values, and to stop users changing protected fields.
Testing Rules with the Emulator
Prove your security rules work with automated tests using the Emulator Suite and @firebase/rules-unit-testing.
Cloud Storage for Photos & Files
Upload photos with Firebase Storage, save the download URL in Firestore, and protect files with storage rules.
Transactions & Batched Writes
Make multiple writes atomic with batches, and read-then-write safely with transactions.
Cloud Functions: Server Code When You Need It
Run trusted server code on Firestore triggers, HTTP requests and schedules: counters, notifications and payment webhooks.
Building a Web App with Firestore
Structure a Firestore web app: a data layer, reusable listeners, loading and error states, and hosting.
Costs, Limits & Performance
Understand Firestore billing, stay inside the free tier, avoid expensive patterns and set budget alerts.
Project: A Chama Contributions App
Build a real-time, offline-ready app for savings groups with Firestore, Auth, rules, Cloud Functions and Hosting.
Finish the course, earn a verifiable certificate
Complete every lesson, then pass the 20-question final exam (70% to pass, unlimited retakes), to receive a Learnix certificate with a unique number anyone can verify online.