Add push notifications for scheduled expenses#675
Open
maraf wants to merge 1 commit into
Open
Conversation
Implement Web Push notification infrastructure to alert users when scheduled expense templates are due today. API changes: - Add NotificationsController with REST endpoints for managing notification settings and push subscriptions - Add PushNotificationSender using WebPush/VAPID for delivery - Add ExpenseTemplateNotificationBackgroundService that periodically checks for due templates based on user timezone and preferred hour - Add EF entities: PushSubscription, UserNotificationSettings, UserNotificationExpenseTemplateSettings, ExpenseTemplateNotificationDispatch - Add deduplication to prevent re-sending for same template/day Blazor client changes: - Add push/notificationclick handlers to service workers - Add JS Push API interop (subscribe, unsubscribe, permission check) - Add PushNotificationInterop C# wrapper - Add /user/notifications settings page with global toggle, expense template toggle, preferred hour selector, and browser subscription management - Add navigation entry in user menu Closes #617 Closes #672 Closes #673 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements Web Push notifications to alert users when scheduled expense templates are due today. Based on the notification pattern from neptuo/Recollections#395.
API Changes
GET /api/notifications— Get current settingsPUT /api/notifications— Toggle global notificationsPUT /api/notifications/expense-templates— Configure expense template notifications (enable, preferred hour, timezone)POST /api/notifications/subscriptions— Register browser push subscriptionDELETE /api/notifications/subscriptions— Revoke subscriptionBlazor Client Changes
Money.Notificationsmodule (subscribe, unsubscribe, permission check, timezone detection)/user/notifications) — Settings UI with global toggle, expense template toggle, preferred hour selector, browser subscription managementArchitecture
Maintains separation between:
Setup
To enable push notifications, generate VAPID keys and configure in
appsettings.json:Then set
Notifications:PublicKeyandNotifications:PrivateKey.TODO (follow-up)
Closes #617
Closes #672
Closes #673