firebase-js-sdk

Google's official client SDK for building web and Node.js apps on Firebase's backend services.

SDK
npm
v12.18.0
5,139stars
Apache License 2.0

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
96/100Excellent
Development Activity96
Maintenance96
Community92
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
88/100Excellent
Architecture88
Code Quality92
Innovation85
Learning Curve85

Firebase is Google’s official JavaScript SDK for building apps on top of Firebase’s managed backend services. Published from the firebase-js-sdk monorepo, the firebase npm package bundles modular client libraries for Authentication, Cloud Firestore, the Realtime Database, Cloud Storage, Cloud Functions, Cloud Messaging, Performance Monitoring, Remote Config, App Check, and Google Analytics behind a single install.

Since version 9, the SDK exposes a fully modular, tree-shakeable API - each service is imported as named functions operating on an app or service instance rather than through chained namespaced objects, so bundlers can eliminate unused code. It targets browsers, mobile web (Ionic, Cordova, React Native), and server-side Node.js, with a legacy compat layer retained for apps still migrating off the pre-v9 namespaced API.

What You Get

  • Modular imports for Authentication, Firestore, Realtime Database, Storage, Functions, Messaging, Performance, Remote Config, App Check, and Analytics under one package
  • A shared FirebaseApp / component-container runtime that lazily wires each service to your project’s config
  • Tree-shakeable ESM builds alongside CommonJS builds for Node.js, plus a compat layer for pre-v9 namespaced code
  • TypeScript types generated via API Extractor for every public surface
  • Cross-environment support: browser, mobile web (Cordova, web-extension), and privileged Node.js contexts via FirebaseServerApp

Common Use Cases

  • Adding email/password, phone, or OAuth authentication to a web or mobile-web app
  • Storing and querying app data in real time with Cloud Firestore or the Realtime Database
  • Uploading and serving user-generated files through Cloud Storage
  • Triggering backend logic with Cloud Functions and tracking usage with Analytics or Performance Monitoring

Under The Hood

Architecture The SDK is a yarn/lerna/nx-managed monorepo of ~50 independently versioned @firebase/* packages (auth, firestore, storage, functions, messaging, performance, remote-config, app-check, analytics, ai, data-connect), unified by the packages/firebase umbrella package that re-exports each one behind its own exports map entry (e.g. firebase/auth, firebase/firestore). Each service registers itself as a Component into a ComponentContainer owned by a FirebaseAppImpl instance (see packages/app/src/firebaseApp.ts and registerCoreComponents.ts) - services are resolved lazily through this container rather than imported and wired directly, which is what lets unrelated services stay decoupled while sharing one app instance. A parallel FirebaseServerApp type in the same package supports privileged Node.js contexts that need to act on behalf of an authenticated user, distinct from the client-only FirebaseApp.

Tech Stack Everything is TypeScript, compiled and bundled per-package with Rollup into ESM, CJS, and browser-ESM variants declared through package.json exports conditions. The monorepo itself is orchestrated with Yarn workspaces, Lerna, and Nx; api-extractor generates and enforces public .d.ts surfaces per package (api-report script), and patch-package applies local dependency patches on install. The umbrella firebase package has no runtime logic of its own - it is purely a re-export/build surface over the individual @firebase/* packages, which in turn depend on shared internal packages like @firebase/component, @firebase/util, and @firebase/logger.

Code Quality Testing is extensive and dual-target: each package runs a Karma-driven browser suite (test:browser) and a Mocha/ts-node/nyc Node suite (test:node) against files matched by *.test.ts, with coverage collected via nyc/lcov and merged across packages in CI. ESLint (via a shared .eslintrc.js) and Prettier enforce style, and a large .github/workflows set (test-all, lint, format, check-changeset, per-service changed-file test workflows, e2e-test) gates every change. Errors are handled through a typed ErrorFactory/ErrorMap pattern (see packages/app/src/errors.ts) rather than ad-hoc throws, giving consumers stable, parameterized error codes.

API Design The public API is deliberately function-first and tree-shakeable: initializeApp() returns an app, and each service is obtained via a getX(app) call before invoking further functions on it, replacing the pre-v9 namespaced firebase.auth()-style chains (still available via the compat sub-path for migrating apps). This keeps per-service boilerplate low and lets bundlers eliminate unused services, though the up-front firebaseConfig object and per-service getX(app) call are still required scaffolding for every project.

Used by 8 apps in this directory

TypeScript
98%
Apache 2.0

Cline

AI Code Assistants

67,585

An open-source AI coding agent that lives in your editor and terminal — reads and edits your codebase, runs commands, browses the web, and requires human approval for every action by default.

View details
89
Repo Health
74
Technical
65
Dependency
Built with
TypeScript98%
Updated 2 days ago
JavaScript
64%
Other

GDevelop

Developer Tools · Game Development · Design Tools

26,276

No-code, open-source game engine for building 2D, 3D and multiplayer games — publish to iOS, Android, Steam and the web.

View details
93
Repo Health
82
Technical
61
Dependency
Built with
JavaScript64%
C++23%
TypeScript12%
Updated yesterday
JavaScript
88%
GPL 3.0

Glass by Pickle

AI Assistants

7,598

A privacy-first desktop AI assistant that sees your screen, hears your meetings, and turns live context into structured summaries—without sending a single byte to the cloud.

View details
43
Repo Health
76
Technical
67
Dependency
Built with
JavaScript88%
TypeScript12%
Updated 10 months ago
TypeScript
71%
Other

highlight.io

Developer Tools · Analytics · Monitoring

9,372

Open-source full-stack monitoring that unifies session replay, error tracking, logging, and distributed tracing so you can stop context-switching between tools.

View details
69
Repo Health
78
Technical
65
Dependency
Built with
TypeScript71%
Go16%
Updated 2 weeks ago
Python
73%
GPL 3.0

Frappe HR

Human Resources

8,746

Complete open-source HRMS for employee lifecycle, attendance, payroll, and performance — built on Frappe Framework with a mobile PWA.

View details
93
Repo Health
70
Technical
79
Dependency
Built with
Python73%
JavaScript15%
Updated yesterday
TypeScript
57%
MIT

Jitsu

Data Engineering

5,063

Open-source, fully-scriptable data ingestion engine that streams events from web, apps, and APIs to any data warehouse in real time.

View details
88
Repo Health
79
Technical
66
Dependency
Built with
TypeScript57%
Go41%
Updated 3 days ago
TypeScript
81%
MIT

LibreChat

Developer Tools · AI Assistants

42,871

Unite every major AI model in one self-hosted chat platform with agents, code execution, MCP tools, and enterprise authentication.

View details
93
Repo Health
81
Technical
65
Dependency
Built with
TypeScript81%
JavaScript18%
Updated today
TypeScript
99%
Other

Rowy

Low Code Platforms · Databases

6,840

Manage Firestore data in an Airtable-like spreadsheet UI and build Cloud Functions workflows directly in your browser—on your own GCP project.

View details
45
Repo Health
71
Technical
65
Dependency
Built with
TypeScript99%
Updated 1 years ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search