Skip to content

About

Personal Cloud Firestore study notes with JavaScript examples, data modeling, queries, Security Rules, offline behavior, and production guidance.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

20 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Cloud Firestore Study Notes

These are my personal study notes from learning and working with Cloud Firestore. They collect the core concepts, JavaScript examples, security decisions, and practical checks I want to keep in one dependable reference.

The notes use the Firebase modular JavaScript SDK and focus on Firestore for web applications. They begin with documents and collections, then build through writes, queries, data modeling, Security Rules, offline behavior, testing, and production operations.

About these notes

This repository records what I study and practice while working with Firestore. Each chapter explains a core idea in plain language, then connects it to practical JavaScript examples and common decisions made in an application.

The examples use fictional records and project names. Firebase web configuration identifies a project but does not protect data. Client access must be controlled by Security Rules, and privileged server work must be protected with server-side authorization and IAM.

Core topics

  • Firestore projects, databases, locations, and the JavaScript SDK
  • Collections, documents, paths, field types, and references
  • Creating, updating, deleting, and batching writes
  • Reading documents, filtering, ordering, and query limits
  • Indexes, cursors, pagination, and real-time listeners
  • Transactions, atomic batches, and concurrent changes
  • Security Rules, authentication, and field validation
  • Data modeling, subcollections, denormalization, and cleanup
  • Offline cache, synchronization, aggregation, and summaries
  • Emulator testing, performance, cost, operations, and release checks

Chapters

  1. Firestore fundamentals and database setup Understand what Firestore is, how databases and projects relate, and what to decide before creating a database.

  2. JavaScript SDK and project configuration Install the modular SDK, initialize Firestore once, and select the right Firebase project for each environment.

  3. Documents, collections, fields, and paths Read Firestore paths and learn how documents, collections, fields, and subcollections fit together.

  4. Data types, field values, and references Choose suitable field types for dates, arrays, maps, references, and server-generated values.

  5. Create, update, delete, and write patterns Add and change data with document references, merge options, field transforms, and safe delete flows.

  6. Reading data and building queries Fetch one document or a query result and build clear filters, ordering, and bounded reads.

  7. Query indexes, pagination, and listeners Understand index requirements, cursor pagination, live snapshots, and listener cleanup.

  8. Transactions, batches, and concurrency Choose between a transaction and a batch, handle concurrent updates, and keep atomic work reliable.

  9. Security Rules, authentication, and validation Restrict client reads and writes with ownership checks, field validation, and emulator tests.

  10. Data modeling, relationships, and cleanup Model related records with subcollections or references and plan duplication and deletion behavior.

  11. Offline data, cache, and conflicts Understand local reads, cached queries, pending writes, synchronization, and web persistence choices.

  12. Aggregation and summary data Count and summarize matching records while balancing current values, query cost, and maintained counters.

  13. Import, export, backups, and retention Plan data movement, managed backups, retention, and safe restore checks.

  14. Emulator, Rules testing, and debugging Run the Firestore emulator, test allowed and denied access, and investigate rule and query failures.

  15. Performance, cost, and scalability Reduce unnecessary reads, design for indexes and contention, and monitor usage as data grows.

  16. Production operations and release checklist Review environments, access, monitoring, recovery, and the checks that protect a production release.

Reference chapters

How to use these notes

Read the chapters in order when learning Firestore, or open the section that answers a question from your current project. Try examples with fictional data and use the Firestore emulator to check Security Rules before applying them to a live database.

Main references

Links

Support

About

Personal Cloud Firestore study notes with JavaScript examples, data modeling, queries, Security Rules, offline behavior, and production guidance.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors