Firebase is Google's comprehensive backend-as-a-service (BaaS) platform that provides cloud infrastructure, databases, authentication, hosting, serverless functions, AI capabilities, and analytics for mobile and web applications. Firebase eliminates the need to build and manage backend infrastructure from scratch, offering real-time synchronization, automatic scaling, and deep integration with Google Cloud. In 2026, the platform has significantly expanded with Firebase App Hosting for full-stack web apps, Firebase AI Logic for client-side Gemini API access, Firebase SQL Connect (formerly Data Connect) for PostgreSQL integration, and Firestore pipeline queries with full-text and geospatial search β making it a comprehensive platform for both traditional and AI-powered applications.
What This Cheat Sheet Covers
This topic spans 26 focused tables and 237 indexed concepts, 121 flashcards. Below is a complete table-by-table outline of this topic, spanning foundational concepts through advanced details.
A jump-to index of every table row in this cheat sheet.
An interactive map of every table and concept in this topic.
Table 1: Project Setup and Configuration
Before any Firebase feature works, you have to wire up a project β and that means two distinct setups. The client SDK (initializeApp(config)) runs in browsers and apps under security rules, while the Admin SDK runs on your server with elevated privileges that bypass those rules. The CLI commands and local emulators here are what you use day to day to deploy, switch between dev and production, and develop offline without touching live data.
| Method | Example | Description | |
|---|---|---|---|
firebase init | β’ Sets up a new Firebase project in the current directory β’ prompts to select services (Hosting, App Hosting, Functions, Firestore, etc.) and links to a Firebase project. | ||
firebase deploy | β’ Deploys all configured services to production β’ supports partial deployment with --only flag (e.g., --only hosting,functions). | ||
import { initializeApp } from 'firebase/app';const app = initializeApp(config); | β’ Initializes Firebase SDK with project configuration (API key, project ID, app ID) β’ must be called before using any Firebase services. | ||
const admin = require('firebase-admin');admin.initializeApp(); | β’ Initializes Firebase Admin SDK for server-side operations β’ bypasses security rules and provides elevated privileges for backend tasks. | ||
admin.initializeApp({ credential: admin.credential.cert(key),}); | β’ Authenticates Admin SDK using a service account JSON key β’ required for server environments without default Application Default Credentials. | ||
firebase emulators:start | β’ Starts local emulators for Auth, Firestore, Functions, Storage, Hosting, and App Hosting β’ enables offline development without touching production data. | ||
firebase use production | Switches between project aliases (dev, staging, production) to prevent accidental deployment to wrong environment. | ||
initializeApp() | β’ App Hosting auto-injects Firebase config, no arguments needed β’ prevents staging apps from accidentally accessing production data. | ||
import 'package:dart_firebase_admin/dart_firebase_admin.dart'; | β’ Server-side Firebase operations in Dart for Flutter full-stack apps β’ supports Auth, Firestore, Messaging, Storage, and Security Rules. |