Native notifications for web apps

A web app ends when the tab closes. This example is the bridge to the other side: one HTTP call from a route handler becomes a native notification on a phone — with a tap target, a priority, and the option to ask a question and get the answer back. No native app to ship, no push certificate, no SDK.

Try it on your own phone

Install Lauther (free), mint a token in the app under Apps → + → New token, and paste it here. The token is used for this one request and is not stored. Leave it empty and the server uses its own LAUTHER_TOKEN.

What crosses the bridge

/api/notify — POST /v1/push. A title, a message, an optional url so the tap lands on your own page, and a priority for the ones that should cross quiet hours.

/api/refund — POST /v1/approve. The same notification with Approve and Deny on it; the route blocks up to 25 s for the tap. approve proceeds, deny returns 403, no answer returns 202 and does nothing. Add requireBiometric and the answer records a fingerprint.

The same API also does passwordless sign-in (a QR code instead of a password field) and topics for broadcasting to many phones at once — see the docs.

One Vercel detail: the Hobby plan caps a function at 10 s by default, so the refund route sets export const maxDuration = 30.