๐Ÿ“ฑ PWA Notifications Demo

Test push notifications on your mobile device

๐Ÿ”” Notification Status

Checking permissions...

๐Ÿ“ฒ Installation Status

Checking installation...

๐Ÿงช Test Notifications

Use these buttons to test different types of notifications:

โ„น๏ธ How to Use

  1. Enable notifications when prompted
  2. Install the app to your home screen
  3. Test local notifications first
  4. Subscribe to push notifications
  5. Use the API to send push notifications

๐Ÿ”— API Information

Send POST request to /api/notify with:

Basic Notification:

{
  "title": "Notification Title",
  "body": "Notification message",
  "icon": "/icons/icon-192x192.png"
}

Notification with Callback Data:

{
  "title": "Order Ready!",
  "body": "Your order #12345 is ready for pickup",
  "icon": "/icons/icon-192x192.png",
  "data": {
    "url": "/",
    "callback": {
      "showAlert": "Order #12345 is ready!",
      "showContent": "Your pizza order is ready at location A.",
      "scrollTo": "test-section",
      "action": "highlight",
      "data": {"elementId": "test-push"}
    }
  }
}

๐Ÿงช Test Callback Examples