๐Ÿ”ฅ

Cloud Firestore

Cloud Firestore is Google Firebase's NoSQL document database, built for apps that need data to sync live to every connected device. It holds around #13 in real-world database usage (roughly 5.7% share), and it's the default database for most new Firebase mobile and web apps thanks to its tight integration with Firebase auth, hosting, and cloud functions.

๐Ÿ“Œ Quick facts
Type: Document database (NoSQL)
Made by: Google Firebase
License: Proprietary, managed-cloud (free tier + pay-as-you-go)
Hosting: Fully managed
Primary use case: Mobile and web apps that need realtime data sync across devices
Jump to: Example queryGetting startedBest for

Example query

Firestore stores JSON-like documents in collections, and clients can subscribe to live updates instead of polling:

import { getFirestore, collection, addDoc, onSnapshot, query, where } from 'firebase/firestore'

const db = getFirestore();

// add a new document
await addDoc(collection(db, 'messages'), {
  text: 'hello world',
  createdAt: new Date()
});

// listen for live changes matching a query
const q = query(collection(db, 'messages'), where('read', '==', false));
onSnapshot(q, (snapshot) => {
  snapshot.forEach(doc => console.log(doc.data()));
});

Getting started

Firestore is enabled from the Firebase console on a new or existing project, then wired up with the Firebase SDK:

# install the Firebase SDK in your project
npm install firebase

# then initialize it with the config copied from the Firebase console
๐ŸŽฏ Best for
Mobile and web apps โ€” chat, collaborative tools, live dashboards โ€” that need data to update instantly across every connected client without writing custom websocket infrastructure.