Notify icon indicating copy to clipboard operation
Notify copied to clipboard

A small deno deploy / self hosted solution to send web push notifications with webhooks

Notify

Language grade: JavaScript

A Simple way to send (offline) push messages (via a webhook) to every device that supports web push. Hosted inside a cloudflare worker or selfhost (using miniflare). You can even receive notifications if the app is closed or your offline(and back online again). It comes with a offline installable pwa for all time access to your latest notifications.

DEMO

There is a demo instance hosted on cloudflare workers. You can send a notification to all your devices using this command (note you should unsubscribe from the demo instance to avoid spamming):

curl -X POST -H "Content-Type: application/json" -d '{"title":"Hello", "message":"World"}' https://notify_app-demo.thisk0in.workers.dev/api/notify

example of the app using on android using on windows

Install

See installation documentation

How to send a notification

curl -X POST -H "Content-Type: application/json" -d '{"title":"Hello", "message":"World"}' https://yourendpoint/api/notify

optional with a icon:

curl -X POST -H "Content-Type: application/json" -d '{"title":"Hello", "message":"World", "icon": "https://via.placeholder.com/150"}' https://yourendpoint/api/notify

optional with some tags:

curl -X POST -H "Content-Type: application/json" -d '{"message": "test", "title": "1231234", "tags": ["test", "server"]}' https://yourendpoint/api/notify

if you have a server password defined you will also need to set the Authorization header to: bearer <server_password>

for more info see the documentation

Credits

most of the webpush code is a port of simple-push-demo by gauntface and icons from google icon font.