Firebase REST Firestore is a lightweight Firestore REST API client optimized for Edge runtime environments such as Cloudflare Workers and Vercel Edge Functions, where the Firebase Admin SDK cannot run. Version 1.6.0 offers full CRUD operations, TypeScript support, token caching, and an intuitive API with explicit configuration. It differentiates itself by avoiding hidden environment variable dependencies and supporting FieldValue sentinels like serverTimestamp. Released under MIT license, it requires Node.js >=20.8.1.
npm install firebase-rest-firestoreNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows creating a client, adding a document with server timestamp, retrieving by ID, and querying with a filter.
Use .replace(/\\n/g, '\n') on the private key string from the environment.
Upgrade Node.js to v20.8.1 or later.
Document data is returned from add(); no need to call .get() on a reference.
Use set() with merge option or implement manual read-modify-write.
Always chain .get() after building query constraints.
Replace escaped newlines with actual newlines: privateKey: process.env.PRIVATE_KEY?.replace(/\\n/g, '\n')
Change to ESM import: import { createFirestoreClient } from 'firebase-rest-firestore'Verify Firebase service account credentials and that the private key is correctly formatted.
No dependency data recorded yet.