Firebase Firestore · Intermediate

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.

Units
4
Lessons
20
Practice questions
82
Minutes
~300

Start learning today

Try every course free for 7 days. After that, this course is in Learnix Pro (KES 699/month).

Create free account Log in

What you'll learn

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 the lessons work

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

  1. 1.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. 1.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. 1.3

    Collections, Documents & Subcollections

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

  4. 1.4

    Writing Data: add, set, update & delete

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

  5. 1.5

    Reading Data: getDoc & getDocs

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

  1. 2.1

    Queries, Ordering & Indexes

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

  2. 2.2

    Pagination with Cursors

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

  3. 2.3

    Real-Time Listeners

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

  4. 2.4

    Offline Support

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

  5. 2.5

    Modelling Data for Firestore

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

  1. 3.1

    Firebase Authentication

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

  2. 3.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. 3.3

    Validating Data in Rules

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

  4. 3.4

    Testing Rules with the Emulator

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

  5. 3.5

    Cloud Storage for Photos & Files

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

  1. 4.1

    Transactions & Batched Writes

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

  2. 4.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. 4.3

    Building a Web App with Firestore

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

  4. 4.4

    Costs, Limits & Performance

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

  5. 4.5

    Project: A Chama Contributions App

    Build a real-time, offline-ready app for savings groups with Firestore, Auth, rules, Cloud Functions and Hosting.

Earn a verifiable certificate

Finish every lesson and pass the 20-question final exam (70% to pass). Each certificate has a unique number anyone can check online.

Get started

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.