Pushpad

website·Indexed 34 days ago

https://pushpad.xyz

A service for sending web push notifications. Documentation and guides cover the Web Push API, VAPID keys, service worker management, targeting users, and UI/UX best practices for user subscriptions.

Tokens
72.5K
Snippets
232
Records
517
Agent score
69%

What's inside Pushpad

  1. Understand the Browser Push Service architecture

    According to the W3C Push API, a push service acts as an intermediary (like a mailman) between an application server and the user's browser.

    Workflow:

    1. The website calls PushManager.subscribe() in JavaScript, triggering a permission prompt.
    2. The browser requests a push subscription from its own push service.
    3. The push service returns a subscription containing a secret URL (endpoint).
    4. The website stores this endpoint and uses it to send notification requests to the browser push service.
    5. The browser push service delivers the notification to the user's browser, which maintains a constant connection to the service to detect new messages.
  2. Understand Pushpad data privacy and GDPR compliance

    Pushpad and its service providers are GDPR compliant. The company is based in Italy and hosts data primarily in Europe. Pushpad does not share or resell any user data (neither account holder data nor end-user data). For account holders, Pushpad acts as the data controller; for end-users of those accounts, Pushpad acts as the data processor.
  3. Understand the Web Push Notification architecture

    Web Push Notifications are not a single standard but a combination of several technologies:

    • Push API: Handles client-side permissions and the subscription process to receive push messages.
    • Service Workers: Background JavaScript scripts that listen for push messages and trigger the display of notifications even when the website is closed.
    • Web Notifications: The UI standard for displaying the actual notification (title, message, icons) to the user.
    • WEBPUSH Protocol (RFC 8030): The server-to-server protocol used by an application backend to send messages to the browser's push service.
    • VAPID (RFC 8292): A security layer that identifies the application server using public/private key pairs to ensure only authorized servers can send notifications to a subscription.
  4. Understand the Web Push Notification architecture

    Web Push Notifications are not a single standard but a combination of several technologies:

    • Push API: Handles the client-side process of requesting permission and creating a subscription to receive push messages.
    • Service Workers: Background scripts that listen for push messages and trigger the display of notifications even when the website is closed.
    • Web Notifications: The UI standard that defines how the actual notification (title, body, icon, buttons) is displayed to the user.
    • WEBPUSH Protocol (RFC 8030): The server-to-server protocol used by an application backend to send encrypted messages to the browser's push service.
    • VAPID (RFC 8292): A security layer that identifies the application server and ensures only the authorized server can send notifications to a specific subscription.
  5. Understand browser push service limitations and architecture

    A browser push service is a cloud-based service that receives messages from an application backend and delivers them to the user's browser. The browser maintains a constant connection to this service; upon receiving a message, the browser triggers a push event in the service worker to display a notification.

    Key constraints include:

    • Non-configurable: The push service is defined by the browser manufacturer and cannot be changed by developers or end-users. For example, Chrome uses FCM, Firefox uses Autopush, Edge uses WNS, and Safari uses APNs.
    • Security: Messages are encrypted end-to-end, meaning the push service provider cannot read the content.
    • Potential Failures: Notifications may fail in environments with strict firewalls or in countries where the specific browser push service is banned/censored.

    Third-party push services (like Pushpad) do not replace the browser's native push service; instead, they act as an abstraction layer on top of the native services using the Push API standard to simplify development and management.

  6. Configure Pushpad senders for unrelated websites

    When managing multiple unrelated websites (e.g., a site about cars and another about apples), create a separate sender for each website. This ensures better separation and security between the different sites. You can manage multiple senders within a single Pushpad account or use separate accounts.
  7. Prevent sender spoofing in Web Push notifications

    Unlike email, the Web Push protocol prevents spoofing. It is technically impossible for a website to pretend to be another website because the browser generates a unique endpoint for each domain. The browser knows exactly which domain sent the message, ensuring the sender domain displayed in the notification is always correct.
  8. Choose a method for sending web push notifications

    Pushpad provides several ways to send web push notifications depending on the required level of automation and technical integration:

    1. Manual Sending: Use the Pushpad dashboard for the simplest manual notification delivery.
    2. Programmatic Sending: Integrate the Pushpad REST API or official libraries directly into your web application for custom logic.
    3. Automated Sending: Use the Zapier app (ideal for RSS feed integrations) or the WordPress plugin to automate notifications for blogs and websites.
  9. Use the Pushpad MCP Server for Web Push Notifications

    Pushpad provides an official Model Context Protocol (MCP) server that allows developers to send web push notifications and manage Pushpad resources via the Pushpad API. The server supports CRUD (Create, Read, Update, Delete) operations on the following entities: notifications, subscriptions, projects, and senders.
  10. Choose a Pushpad integration method

    Pushpad provides different tools depending on the task:

    • Sending Notifications: Use the REST API or one of the server-side libraries (API wrappers).
    • Subscribing Users: Use the JavaScript SDK to handle user subscriptions on the frontend.