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:
| Variable | Source |
|---|---|
NEXT_PUBLIC_FIREBASE_API_KEY | Project Settings โ Web API Key |
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN | Project Settings โ Auth domain |
NEXT_PUBLIC_FIREBASE_PROJECT_ID | Project Settings โ Project ID |
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET | Project Settings โ Storage bucket |
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID | Project Settings โ Sender ID |
NEXT_PUBLIC_FIREBASE_APP_ID | Project Settings โ App ID |
FIREBASE_ADMIN_CLIENT_EMAIL | Service Accounts โ Private key โ client_email |
FIREBASE_ADMIN_PRIVATE_KEY | Service 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.