Cloud Firestore + Angular — Serverless app on transactions and batched writes

CUD operations, transactions and batched writes deep dive

Jonny Fox
Factory Mind

--

In a previous article I have already talked about the boostrap of a serverless application using Cloud Firestore and Angular! 🎉 In this article we will start from a basic situation to deepen its interesting features (here the repo).

Let’s look at some basic concept:

  • Documents
    Information within Cloud Firestore is organized into documents. Each document is a set of key-value pairs that you can treat as lightweight JSON (actually it supports extra data types and is limited in size to 1 MB)
  • Collections
    All documents must be stored in them. Notice that a document can contain subcollections and nested objects, both of which can host primitive fields or complex objects (like lists).

Notice that Cloud Firestore is schemaless, so you have complete freedom over the shape of the data that you put in each document even if those documents live in the same collection (think about how this could be useful when you’re facing with historical data that evolves over…

--

--