@@ -71,19 +71,34 @@ per-channel switches later if we want.
7171
7272- app/models/notification.rb: the notification record. Has the type, message,
7373 link, and whether it has been read.
74+
7475- app/services/notification_service.rb: the one entry point. Checks the setting,
7576 saves the record, and queues the email and push channel jobs.
77+
7678- app/sidekiq/notification_email_job.rb: reloads a notification by id and sends
7779 its email on the ` mailers ` queue.
80+
7881- app/sidekiq/push_notification_delivery_job.rb: reloads a notification by id
7982 and hands it to the Web Push delivery channel on the ` notifications ` queue.
83+
8084- app/services/push_notification_service.rb: the Web Push delivery channel. It
8185 remains a safe no-op until both VAPID keys are configured.
86+
87+ - app/models/push_subscription.rb: stores each user's Web Push subscription details.
88+
89+ - app/api/push_subscriptions_api.rb: provides the API endpoints for listing,
90+ registering, updating, and removing browser push subscriptions.
91+
8292- app/mailers/notifications_mailer.rb: the email. New method single_notification
8393 with templates in app/views/notifications_mailer.
94+
8495- app/api/notifications_api.rb: the endpoints the web app calls.
96+
8597- app/api/entities/notification_entity.rb: the shape of the data sent back.
8698
99+ For VAPID key configuration and Web Push setup, see
100+ ` docs/notifications/push-setup.md ` .
101+
87102## The endpoints
88103
89104 GET /api/notifications list my notifications
0 commit comments