What is Firebase Cloud Functions?

Answer

Firebase Cloud Functions is a serverless framework that lets you run Node.js (or Python, in 2nd gen) backend code in response to Firebase events and HTTPS requests. Functions run in Google Cloud's managed environment — no server provisioning required. Trigger types: (1) HTTPS — function exposed as an HTTP endpoint; (2) Firestore triggers — run on document create, update, delete, or write; (3) Authentication triggers — run when a user creates or deletes an account; (4) Storage triggers — run when a file is uploaded, updated, or deleted; (5) Pub/Sub — run on message publication; (6) Scheduled — run on a CRON schedule; (7) Realtime Database triggers — run on data write. Firebase Cloud Functions extend Firebase's client-first architecture with server-side logic: sending emails after user creation, generating thumbnails after image upload, running business logic that shouldn't run on clients.