Introduction
Atelerix delivers web push using the standard Web Push protocol (VAPID) — the same open standard Chrome, Firefox, Edge, and modern Safari all implement natively. No Firebase project, no OneSignal account — Atelerix generates and manages the key pair for you.This is a separate package from the Flutter SDK —
lerix_web_notification
is a small, framework-agnostic JS/TS library for non-Flutter web apps
(React, Vue, plain HTML, etc.). If your app is built with Flutter —
including Flutter Web — don’t use this package; the atelerix Flutter
package supports iOS, Android, and Web natively from one package with one
API. See Flutter — Push Notifications
instead.1. Install
2. Copy the service worker
Web Push requires a service worker file served from your site’s own origin — a plain<script> import can’t register one for you. Copy
node_modules/lerix_web_notification/sw/atelerix-sw.js to your site’s public
root so it’s reachable at https://yoursite.com/atelerix-sw.js (any path
works, as long as you pass it to subscribe() if it’s not at that default).
3. Generate a Web Push key
From the dashboard: Notifications → Settings → Web Push → Generate keys. This is a one-click step — Atelerix generates and stores the VAPID key pair for the project; there’s nothing to copy into your code.4. Use it
API
The notification payload
Both callbacks receive anAtelerixNotificationPayload — the same shape the
Flutter SDK’s model uses:
Sending an image
SetimageUrl when sending — from the dashboard’s Send notification
tab, or the REST API’s imageUrl parameter.
Unlike iOS, this works automatically on the web with no extra setup: the
service worker renders it directly as the notification’s icon/image.
Sending metadata
Setmetadata when sending — delivered back to the page inside
payload.metadata, for routing a tap to a specific in-app view, for example.
See Sending metadata
for the full parameter details (identical across every platform).
Custom sound is not supported for web push. The Web Notifications API
doesn’t expose a way to set a custom notification sound across browsers,
so the dashboard/API’s
sound parameter is ignored for web recipients —
it only applies to iOS and Android.Browser support
Chrome, Firefox, and Edge support Web Push fully. Safari requires macOS 13+ or iOS 16.4+ — older Safari doesn’t support the standard at all.Flutter Web
Don’t use this JS SDK for a Flutter app, even a Flutter Web build — theatelerix Flutter package supports iOS, Android, and Web natively from a
single package, calling the browser’s Push API directly with no separate JS
dependency at all. Same Atelerix.notifications.* calls, same
AtelerixNotificationPayload shape, on every platform: