Skip to main content
Firebase Express SDK is an npm library that connects your Express.js application to Firebase Firestore. Define your collections once and get fully functional, Firestore-backed API endpoints — without writing repetitive boilerplate. It’s built for Express.js developers who want to expose Firestore data through a REST API quickly, without hand-writing route handlers, validation logic, or Firestore query code for every endpoint.

Key capabilities

  • Full CRUD support — add GET, POST, PUT, PATCH, and DELETE endpoints with a single configuration object
  • Declarative collections — define your Firestore collections and their document attributes once; the SDK handles the rest
  • Built-in request body validation — the SDK rejects requests that include fields not declared in your collection’s documentAttributes
  • Query filtering and sorting — pass query parameters to filter and sort results on GET requests without extra code

Prerequisites

Before you start, make sure you have the following:
  • Node.js installed (v14 or later recommended)
  • An Express.js application (or the ability to create one)
  • A Firebase project with Cloud Firestore enabled
  • A Firebase service account key (JSON file) from your project settings

Get started

Quick start

Install the SDK and have your first Firestore endpoint running in under 5 minutes.

Collections

Learn how to declare Firestore collections and document attributes.

Actions

Understand how actions map HTTP methods and endpoints to your collections.

GET requests

Walk through fetching documents from Firestore with filtering and sorting.