Delivering real-time food order updates with RxJS push notifications
Push notifications have become an important aspect of how users interact with our web and mobile applications. With push notifications, we can get timely updates and important reminders and alerts, drive user interaction, and increase conversions.
How to do it…
In order to deliver timely food order push notifications to our clients, we will combine RxJS power both in the Angular client app and in the NestJS backend app. In this recipe, we need a backend app as well because we need to deliver push notifications in a secure, authenticated way. The common practice in the industry to achieve a web server identifying itself to the push service is by leveraging Voluntary Application Server Identification (VAPID) keys.
Step 1 – Generating VAPID keys
Since VAPID keys act as a digital signature for push notifications, first, we need to generate a pair of public and private VAPID keys. The way...