Firebase Firestore · Intermediate READ & PRACTISE

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 account

Outcomes

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

1

What Is Cloud Firestore?

A serverless, real-time document database from Google: how it differs from SQL and MongoDB, and when to choose it.

2

Setup: Firebase Project, Console & Emulator

Create a Firebase project, add a web app, initialise Firestore in the SDK, and run the local Emulator Suite.

3

Collections, Documents & Subcollections

How Firestore organises data: paths, document ids, field types and subcollections.

4

Writing Data: add, set, update & delete

Create documents with auto or custom ids, merge updates, increment counters, and use server timestamps.

5

Reading Data: getDoc & getDocs

Read a single document or a whole collection, handle missing documents, and convert timestamps.

1

Queries, Ordering & Indexes

Filter with where, sort with orderBy, limit results, combine conditions, and create composite indexes.

2

Pagination with Cursors

Load lists page by page with startAfter cursors, for infinite scroll that stays fast and cheap.

3

Real-Time Listeners

Subscribe to documents and queries with onSnapshot, react to added/modified/removed changes, and unsubscribe properly.

4

Offline Support

Let apps keep working without a connection: local cache, pending writes and the hasPendingWrites flag.

5

Modelling Data for Firestore

Design for your screens: denormalise, store counters, use subcollections, and avoid hot spots.

1

Firebase Authentication

Add email, Google and phone sign-in, react to auth state, and link users to their Firestore profile.

2

Security Rules: Who Can Read and Write

Write Firestore security rules that check authentication, ownership and roles, the real backend of a Firebase app.

3

Validating Data in Rules

Use rules to enforce required fields, types, sizes and allowed values, and to stop users changing protected fields.

4

Testing Rules with the Emulator

Prove your security rules work with automated tests using the Emulator Suite and @firebase/rules-unit-testing.

5

Cloud Storage for Photos & Files

Upload photos with Firebase Storage, save the download URL in Firestore, and protect files with storage rules.

1

Transactions & Batched Writes

Make multiple writes atomic with batches, and read-then-write safely with transactions.

2

Cloud Functions: Server Code When You Need It

Run trusted server code on Firestore triggers, HTTP requests and schedules: counters, notifications and payment webhooks.

3

Building a Web App with Firestore

Structure a Firestore web app: a data layer, reusable listeners, loading and error states, and hosting.

4

Costs, Limits & Performance

Understand Firestore billing, stay inside the free tier, avoid expensive patterns and set budget alerts.

5

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.

Helping with:

🍪 We use essential cookies to keep you signed in, protect your account and remember your settings. We don't use advertising or tracking cookies. Read our Privacy Policy.