firebase-js-sdk

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

SDK
npm
v12.19.0
5,147 stars
Apache License 2.0

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
96 /100 Excellent
Development Activity 96
Maintenance 96
Community 92
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
88 /100 Excellent
Architecture 88
Code Quality 92
Innovation 85
Learning Curve 85

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 9 apps in this directory

TypeScript
98%
Apache 2.0

Cline

AI Code Assistants

69,455

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
90
Repo Health
74
Technical
65
Dependency
Built with
TypeScript 98%
Updated 4 days ago
JavaScript
65%
Other

GDevelop

Design Tools · Developer Tools · Game Development

26,937

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
JavaScript 65%
C++ 23%
TypeScript 11%
Updated 4 days ago
JavaScript
88%
GPL 3.0

Glass by Pickle

AI Assistants

7,604

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
68
Dependency
Built with
JavaScript 88%
TypeScript 12%
Updated 11 months ago
TypeScript
71%
Other

highlight.io

Analytics · Developer Tools · Monitoring

9,378

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
67
Repo Health
78
Technical
65
Dependency
Built with
TypeScript 71%
Go 16%
Updated 1 months ago
Python
74%
GPL 3.0

Frappe HR

Human Resources

8,831

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
78
Dependency
Built with
Python 74%
JavaScript 15%
Updated 5 days ago
TypeScript
62%
MIT

Jitsu

Data Engineering

5,094

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
TypeScript 62%
Go 36%
Updated 1 weeks ago
TypeScript
82%
MIT

LibreChat

AI Assistants · Developer Tools

45,009

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
TypeScript 82%
JavaScript 17%
Updated 4 days ago
TypeScript
99%
Other

Rowy

Databases · Low Code Platforms

6,843

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
TypeScript 99%
Updated 1 years ago
TypeScript
68%
Other

TaskView

Productivity · Project Management

1,081

Self-hosted project and task management platform for software teams, with Kanban boards, sprints, time tracking, GitHub/GitLab integrations, and an MCP server for AI assistants.

View details
78
Repo Health
77
Technical
71
Dependency
Built with
TypeScript 68%
Vue 21%
Updated 5 days 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