I am heading in that direction and adopting web components for a framework free client experience and a Phoenix backend to handle events and ship delta state updates without API ceremony and complexity using live_state and Phoenix channels so the backend is basically the same as LiveView responding to events over a websocket which interfaces with my phoenix contexts to fetch and update data but without html rendering, only state delta rendering.
The next step is to add some simple client side routing like vannila router, and then beyond that is both routing and local state caching strategies so the client doesn’t degrade to useless when disconnected using Google workbox..
Been hoping to see push notifications on Safari for a long time, but we’ve seen quite a few articles like this on DT recently:
Will Safari push notifications be independent of Apple or will they have to go through Apple’s servers?
Edit: Looks like they’ll go through APNs as well:
The delivery of remote notifications involves several key components:
Your company’s server, known as the provider server
Apple Push Notification service (APNs)
The user’s device
Your app running on the user’s device
Remote notifications begin with your company’s server. You decide which notifications you want to send to your users, and when to send them. When it’s time to send a notification, you generate a request that contains the notification data and a unique identifier for the user’s device. You then forward your request to APNs, which handles the delivery of the notification to the user’s device. Upon receipt of the notification, the operating system on the user’s device handles any user interactions and delivers the notification to your app.
Its a pain that Apple don’t support the ‘beforeinstallprompt’ event, so you have to guide Apple users on how to install the PWA through ‘Share / Add to Home Screen’ with UI you will design yourself that will probably look different on every PWA.
I am amazed at how easy it now is to do push notifications. No firebase, no pigeon, no apple certs. The only bit of complexity is persisting the “subscriptions” from the service worker on server so they can be associated with the user and used later. Seems like they are still using, e.g. FCM servers, to make this happen but the complexity is now all “under-the-hood”.
This is probably finally enough motivation for me to finish adding auth to my hobby PWA this weekend. Thanks for sharing your experience and some resources!