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. Below is a complete table-by-table outline of this topic, spanning foundational concepts through advanced details.
Table 1: Project Setup and Configuration
| 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. |