Skip to main content

Firebase Setup

Create a Firebase project, enable authentication, set up Firestore, deploy security rules, and configure Firebase Storage.

๐Ÿ’ก
Free tier: Firebase Spark plan includes 50,000 reads/day, 20,000 writes/day, and 1 GB of storage โ€” enough for solo freelancers and small teams. No credit card required.

Step-by-Step Guide

Follow this interactive walkthrough to set up your Firebase project:

โ„น๏ธ
Authorized domains: If you are using a custom domain with Vercel, add it to the Authorized domainslist in Authentication > Settings. Firebase needs this to allow sign-in redirects from your domain.

Configuration Values

After setup, collect these values for your environment variables:

VariableSource
NEXT_PUBLIC_FIREBASE_API_KEYProject Settings โ†’ Web API Key
NEXT_PUBLIC_FIREBASE_AUTH_DOMAINProject Settings โ†’ Auth domain
NEXT_PUBLIC_FIREBASE_PROJECT_IDProject Settings โ†’ Project ID
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKETProject Settings โ†’ Storage bucket
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_IDProject Settings โ†’ Sender ID
NEXT_PUBLIC_FIREBASE_APP_IDProject Settings โ†’ App ID
FIREBASE_ADMIN_CLIENT_EMAILService Accounts โ†’ Private key โ†’ client_email
FIREBASE_ADMIN_PRIVATE_KEYService Accounts โ†’ Private key โ†’ private_key
โš ๏ธ
Secure the private key: The Admin SDK private key grants full access to your Firebase project. Never commit it to version control. Add it as a Vercel environment variable or GitHub Actions secret.

Verification

After configuration, confirm these work:

  • Authentication โ€” sign up and sign in work
  • Firestore โ€” reads and writes succeed
  • Security rules โ€” workspace isolation enforced
  • Storage โ€” file uploads work (fallback)

Next, configure Cloudinary for file storage.