Skip to content

Feat/62 web push notifications#162

Open
elcabasa wants to merge 4 commits into
Dgetsylver:mainfrom
elcabasa:feat/62-web-push-notifications
Open

Feat/62 web push notifications#162
elcabasa wants to merge 4 commits into
Dgetsylver:mainfrom
elcabasa:feat/62-web-push-notifications

Conversation

@elcabasa
Copy link
Copy Markdown

@elcabasa elcabasa commented May 29, 2026

Summary

Closes #62 — Progressive web-push APY alerts for connected wallets (no native app).
Issues #62

  • Service worker (/sw.js) registered on app load
  • Push subscriptions stored in D1 (push_subscriptions)
  • Cron sends push for negative net APY with the same 24h throttle as email
  • Email flow unchanged; push uses browser permission instead of verify email

Deploy notes (maintainer)

After merge: cd alerts && npx wrangler login && npm run setup:remote
(Set RESEND_API_KEY / VAPID_PRIVATE_KEY secrets; remote D1 migration.)

Test plan

  • cd alerts && npm run build
  • cd frontend && npm install --ignore-scripts && npm run build
  • Local: wrangler dev + enable push in alert modal
  • Confirm /vapid-public-key returns public key

elcabasa and others added 4 commits May 29, 2026 14:51
…e config to set envPrefix, and enhance alerts package.json with new build and migration scripts
…vements

- Added new routes for web-push subscription management, including `/vapid-public-key` and `/push/subscribe`.
- Implemented validation for alert targets to ensure correct pool IDs, asset symbols, and leverage brackets.
- Updated email subscription handling to utilize the new validation function.
- Modified frontend to support push notifications, including service worker registration and user permission requests.
- Updated `wrangler.toml` to include VAPID keys for push notifications.
…ation

- Enhanced web-push notification management with new routes for subscription.
- Implemented validation for alert targets, ensuring accurate pool IDs and asset symbols.
- Updated email subscription logic to incorporate new validation.
- Modified frontend to support push notifications, including service worker registration.
- Adjusted `wrangler.toml` to include necessary VAPID keys for push notifications.
Add setup:remote script, dev vars example, and gitignore for local secrets so web-push can be deployed after wrangler login.

Co-authored-by: Cursor <cursoragent@cursor.com>
@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 29, 2026

@elcabasa Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

E5: Web-push notifications

1 participant