Demo · native web push (VAPID)
Lunar Notes
A pretend note-taking service, built to show one thing: how a real site signs a user in and binds their browser's push subscription to their account in Moonsender.
What happens when you sign up
-
PUT /api/v1/audience/customers/{email}a Moonsender customer is upserted for you — this must happen first, because binding a token resolves an existing customer and will not create one -
MoonsenderPush.getToken()the SDK registers a service worker, subscribes the browser, and returns a token -
POST /api/v1/push/subscriptions/bindthis site's backend attaches that token to your customer, using its API key — the browser never sees the key, and never names the customer -
POST /api/v1/send/push/customa test notification, addressed to the customer rather than the device
Create an account
Already registered
Accounts live in memory and vanish when the container restarts. Use a throwaway password — this is a demo, not a service.