First, we need to generate a Schema for storing the encrypted data of user in our rails backend.
rails g migration CreateNotifications endpoint:string p256h:string auth:string
This will generate a schema file.
class CreateNotifications < ActiveRecord::Migration[5.1]
Push Notification with Rails Part 2 Front End
This method works on both Multipage Application or Any Single Page Applications, not necessary just with rails. But in this blog, I am focus more on rails part.
In modern Progressive Web Apps, it used a lot of features in servic