Go to the Firebase Console
Head over to https://console.firebase.google.com.
If you’re not already logged in, sign in using your Google account.
(Add screenshot: Firebase Console homepage with “Go to console” button)
Create project
- Click the “Add project” or “Create a project” button.
- Enter a Project name — for example,
my-firebase-app. - (Optional) Edit your Project ID if you want something custom.
- Click Continue.
(Add screenshot: Create project screen with project name field)
Add an App to Your Project
Now that your project is ready, let’s connect an app to it.
In your Firebase dashboard:
- Click the platform icon for the type of app you want to add:
- ** Web App
- 🤖 Android
- 🍎 iOS
- Let’s use the Web App example for now.
(Add screenshot: Firebase dashboard showing Web, iOS, and Android app icons)
Add Firebase SDK to Your App
Once your app is registered, Firebase will show you a snippet of configuration code like this:
// Import and configure Firebase
const firebaseConfig = {
apiKey: "YOUR_API_KEY",
authDomain: "your-app.firebaseapp.com",
projectId: "your-app",
storageBucket: "your-app.appspot.com",
messagingSenderId: "123456789",
appId: "1:123456789:web:abcdef123456"
};
=> Fill in firebase env vars values in .env.local
Generating the Private Key
The private key is fundamental to running your app with Admin permissions on the server side.
- Go to https://console.cloud.google.com/
- Select yout project
- Search/go to Service Accounts:
- Open service account. (Name = firebase admin sdk)
- Copy admin client email to env var
- Go to Keys tab.
- Generate a new JSON key and download it.
Once you open the generated JSON file, copy the private_key property and place it in your environment file .env.local as long as you do not commit the environment file.