🔔 Firebase Push Notification Test Client

⚙️ Firebase Configuration

Important: Replace the config below with your Firebase project configuration.


Ready to initialize Firebase...

📨 Notification Log

Waiting for notifications...

⚠️ Important Setup Requirements

This must be served from a web server, not opened as a file!
Service workers don't work with file:// URLs.

Quick Setup Options:

Option 1 - Python (if installed):

python -m http.server 8000
Then visit: http://localhost:8000

Option 2 - Node.js (if installed):

npx serve .
Then visit the provided URL

Option 3 - VS Code:

Install "Live Server" extension, right-click HTML file → "Open with Live Server"

📖 Instructions:

  1. Serve this file from a web server (see options above)
  2. Get your Firebase config from Firebase Console → Project Settings → General → Your apps
  3. Get your VAPID key from Firebase Console → Project Settings → Cloud Messaging → Web Push certificates
  4. Paste both into the fields above
  5. Click "Initialize Firebase"
  6. Click "Request Permission" to allow notifications
  7. Click "Get FCM Token" to generate your device token
  8. Use the token to send test notifications from Firebase Console or your backend