Commit Graph

4 Commits

Author SHA1 Message Date
Daniel O'Connor
2b6de6d2ba Update app/assets/javascripts/push_notifications.js 2025-09-01 22:37:28 +09:30
Daniel O'Connor
5d133b0f58 Update app/assets/javascripts/push_notifications.js 2025-09-01 22:36:03 +09:30
Daniel O'Connor
6b8d7686d6 Update app/assets/javascripts/push_notifications.js 2025-09-01 22:35:22 +09:30
google-labs-jules[bot]
d828fd5c35 feat: Add web push notifications
This commit introduces web push notifications to the application.

Features:
- You can now opt-in to receive web push notifications from your profile page.
- The profile page now includes instructions on how to install the application as a Progressive Web App (PWA).
- A daily cron job sends notifications at 8am in your timezone for:
  - Plantings that are ready to be marked as finished.
  - Activities that are due on the current day.

Implementation details:
- Adds `web-push` and `serviceworker-rails` gems.
- Adds a `timezone` column to the `members` table.
- Adds a `PushSubscription` model to store user subscriptions.
- Adds a service worker to handle push events.
- Adds a `PushSubscriptionsController` to manage subscriptions.
- Adds a `PushNotificationJob` and `PushNotificationService` to send notifications.

NOTE: I was unable to run any tests due to technical difficulties. The code is therefore untested and may contain errors.
2025-08-10 00:56:40 +00:00