# Clone your project
git clone https://github.com/your-username/your-repo.git
cd your-repo
# Initialize Git (if new project)
git init
git add .
git commit -m "Initial commit"
# Install dependencies
npm install# Install Firebase CLI
npm install -g firebase-tools
# Login and initialize
firebase login
firebase init
? Select features:
◯ Authentication
◯ Firestore
◯ Hosting
◯ Functions (space to select)
? Select project: Choose existing or create new
? Configure Firestore rules? Yes
? Configure Hosting? Yes (set public dir to "public" or "dist")Go to Firebase Console Enable providers: Authentication → Sign-in method → Email/Password & Google
localhost
127.0.0.1
your-site.netlify.app
// Copy from Firebase Console → Project Settings → Web App
const firebaseConfig = {
apiKey: "AIzaSyA...",
authDomain: "your-project.firebaseapp.com",
projectId: "your-project",
storageBucket: "your-project.appspot.com",
messagingSenderId: "123456789",
appId: "1:123456789:web:abc123def456"
};
# Start development server
npm run dev
# Or with Firebase emulator
firebase emulators:start
# Build project (if using framework)
npm run build
# Commit changes
git add .
git commit -m "Ready for deployment"
# Deploy to Firebase
firebase deploy --only hosting,firestore
# Push to GitHub
git push origin main
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read, write: if request.auth != null;
}
}
}
# If Firebase files are ignored:
git add -f firebase.json .firebaserc
# Reset local changes:
git stash
git pull origin main
✅ Verification Checklist Firebase CLI installed (firebase --version)
API keys added to frontend code
Tested login flow locally
Firestore rules deployed
Domain authorized in Firebase Console



