How to implement Push notifications with Supabase ?
What is the best approach, strategy or best practise to implement a push notifications feature (e.g. user can receive notifications if PWA is closed) with Supabase?
So far I build a notification table and a table to store the Push Subscription Object.
So far I build a notification table and a table to store the Push Subscription Object.
- Shall I use an edge function to react/trigger on the new insert to the notifications table or a different functionality? What is the best supabase solution here?
- Do I need an external library like WebPush (https://github.com/web-push-libs/web-push ), OneSignal or Firebase Cloud Messaging?
- In case I need an external library: Do I have to develop implementations for each browser/client or is there one for all browsers supporting WebPushAPI?
GitHub
Web Push library for Node.js. Contribute to web-push-libs/web-push development by creating an account on GitHub.