Navigation

Google Cloud & Firebase Audit

Complete configuration checklist for push notifications

Firebase Cloud Messaging (FCM) Setup
1. Firebase Project Configuration

Firebase Project Exists

✅ Complete

Snappy English Firebase project is active

Blaze Plan Enabled

✅ Complete

Required for FCM and Cloud Functions

Web App Registered

🔍 Check

Register your web app in Firebase project settings

📋 Steps:

  1. Go to Firebase Console → Project Settings
  2. Scroll to "Your apps" section
  3. Click "Add app" → Web (</>) icon
  4. Register app: "Snappy English Web"
  5. Save the Firebase config (you'll need this later)
2. Google Cloud APIs

Firebase Cloud Messaging API

🚨 Critical

MUST be enabled for push notifications to work

📋 Steps:

  1. Go to Google Cloud Console
  2. Select your project: "Snappy English"
  3. Navigate to: APIs & Services → Library
  4. Search: "Firebase Cloud Messaging API"
  5. Click it → Click "ENABLE"
  6. Wait 1-2 minutes for activation

Cloud Messaging API (Legacy)

ℹ️ Optional

Legacy API - not required but can be enabled

Firebase Management API

ℹ️ Optional

Useful for automated project management

3. IAM & Service Accounts

Service Account Created

✅ Complete

fcm-notification-sender service account exists

Firebase Cloud Messaging Admin Role

✅ Complete

Service account has FCM Admin permissions

Service Account Key Downloaded

✅ Complete

JSON key stored as FIREBASE_ADMINSDK secret

Additional Recommended Roles

ℹ️ Optional

Optional roles for enhanced functionality

Roles:

  • • Firebase Admin SDK Administrator Service Agent
  • • Firebase Rules System (for security rules)
  • • Cloud Datastore User (if using Firestore)
4. Web Push Certificates (VAPID Keys)

Generate VAPID Key Pair

⏳ To Do

Required for browser push notifications

📋 Steps:

  1. Go to Firebase Console → Project Settings
  2. Click "Cloud Messaging" tab
  3. Scroll to "Web Push certificates"
  4. Click "Generate key pair"
  5. Copy the key (starts with "B...")
  6. Save this key - you'll need it in your frontend
// Add to NotificationManager.jsx
const vapidKey = 'YOUR_VAPID_KEY_HERE';

Add VAPID Key to Frontend

⏳ To Do

Update NotificationManager component with VAPID key

5. Authorized Domains

Add Base44 Domain

🔍 Check

Authorize your Base44 app domain

📋 Steps:

  1. Go to Firebase Console → Authentication
  2. Click "Settings" tab → "Authorized domains"
  3. Click "Add domain"
  4. Add: "your-app.base44.com" (replace with actual)
  5. Also add: "localhost" for local testing
6. Security & API Restrictions

API Key Restrictions

⭐ Recommended

Restrict Firebase API keys to specific domains

📋 Steps:

  1. Go to Google Cloud Console
  2. Navigate to: APIs & Services → Credentials
  3. Find your Firebase API keys
  4. Click each key → "Application restrictions"
  5. Select "HTTP referrers (web sites)"
  6. Add your Base44 domain
  7. Save restrictions

Service Account Key Security

🚨 Critical

Keep service account JSON secure

⚠️ Security:

  • ❌ NEVER commit to Git/GitHub
  • ❌ NEVER expose in frontend code
  • ✅ Store only in Base44 secrets
  • ✅ Use server-side functions only
  • ✅ Rotate keys every 90 days

Enable Security Alerts

⭐ Recommended

Get notified of suspicious activity

7. Monitoring & Logging

Firebase Cloud Messaging Logs

⭐ Recommended

Monitor FCM delivery and errors

Set Up Budget Alerts

⭐ Recommended

Get notified if costs exceed budget

Enable Cloud Monitoring

ℹ️ Optional

Advanced monitoring dashboards

8. Testing & Verification

Test Notification from Firebase Console

⏳ To Do

Send a test message to verify setup

📋 Steps:

  1. Go to Firebase Console → Cloud Messaging
  2. Click "Send your first message"
  3. Enter notification title and text
  4. Click "Send test message"
  5. Enter your FCM token from the app
  6. Click "Test" - notification should appear!

Test from Browser Console

⏳ To Do

Test programmatic notification sending

// Browser console:
const { base44 } = await import('@/api/base44Client');

await base44.functions.invoke('sendFirebaseNotification', {
  user_email: 'your@email.com',
  title: '🎉 Test Notification',
  body: 'FCM is working!',
  click_url: '/Home'
});

Test Background Notifications

⏳ To Do

Verify notifications work when app is closed

📋 Steps:

  1. Enable notifications on /Profile
  2. Close all app tabs completely
  3. Send a test notification
  4. Notification should appear!
  5. Click it - app should open
9. Quotas & Limits

Understand FCM Quotas

ℹ️ Info

Know your limits to avoid service disruptions

Message Rate
Unlimited (with Blaze plan)

No rate limit on message sends

Payload Size
4 KB maximum

Total notification + data payload

Token Registration
No limit

Unlimited device token registrations

Retention
4 weeks

Messages delivered within 4 weeks or dropped

10. Compliance & Privacy

Update Privacy Policy

⚠️ Required

Disclose use of push notifications

Required Disclosures:

  • • That you collect FCM tokens
  • • How notification data is used
  • • How users can opt-out
  • • Third-party data sharing (Firebase/Google)
  • • Data retention period

User Consent

✅ Complete

Browser prompts for notification permission

GDPR Compliance

🔍 Check

Ensure GDPR compliance for EU users

  • ✓ Obtain explicit consent
  • ✓ Allow users to withdraw consent
  • ✓ Provide data deletion on request
  • ✓ Document data processing
Next Steps

🎯 Critical Actions (Do First):

  1. Enable Firebase Cloud Messaging API in Google Cloud Console
  2. Generate VAPID key pair in Firebase Console
  3. Add VAPID key to NotificationManager component
  4. Test notification sending from browser console

⭐ Recommended Actions:

  • Set up API key restrictions for security
  • Configure budget alerts to monitor costs
  • Update privacy policy with FCM disclosures
  • Enable Cloud Monitoring for advanced insights