Random dev thoughts: Would it be a good idea to do an open source web push notification server for Nostr?

It could have fine-grained options for what notifications you want, from whom and how often.

It could be used automatically in the background by a client, or through its own web UI. Clicking the notifications would redirect you to the client of your choice.

It would be a lot like a relay in that it needs to match incoming events to a potentially large amount of subscriptions. Subscriptions would be persisted in a database and maybe managed over a REST API.

In addition to the stuff typically sent over Nostr, you need to send the subscription object and other things like notification frequency, maximum social graph distance or score, minimum zap amount to notify etc.

It would connect to other relays and maybe also have a websocket endpoint for receiving events over Nostr protocol.

Extending strfry into this direction crossed my mind, but maybe something like Django (or whatever web framework you're familiar with) would be better, as we need to persist the subscriptions.

Reply to this note

Please Login to reply.

Discussion

Yep, it would be super easy to make a push notification mini client that simply receives a push event and redirects to installed clients based on NIP-89 and a simple URI intent.

Many push clients could use different stacks: Google/Apple/Samsung/UnifiedPush/Foreground service that keeps connection to the user's favorite relays etc.

I was thinking the same thing the other day. Notifications are hard in multiple ways. A dedicated client would be a huge benefit.

I’m using Drupal as a infra for handling events which will trigger sending push notifications https://www.drupal.org/project/pf_notifications

Powered by this lib https://github.com/web-push-libs/web-push-php

For those who don't do push notifications, it could send email, sms or fax

Yes

Would this be the software I am missing to selfhost unifiedpush notifications for Amethyst?