Web Push: goal, kickoff and full-time alerts for a followed team

Fully progressive: without VAPID keys in the environment the API says
404, the bell never renders, and the service worker addition (a push
handler via workbox importScripts — no SW strategy change) is inert.
With keys: a bell on each team page requests permission, subscribes
(one team per device) and the server diffs fixture states on every
broadcast to push Kickoff / Goal / Full time to that team's followers.
Dead endpoints (404/410) self-clean. Round-trip verified locally with
dev VAPID keys; disabled mode verified too.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-06-12 08:21:55 +02:00
parent ce83d4dbc4
commit 03b0fa734e
13 changed files with 331 additions and 6 deletions
+2
View File
@@ -24,6 +24,7 @@
},
"dependencies": {
"@tanstack/react-router": "^1.95.0",
"@types/web-push": "^3.6.4",
"clsx": "^2.1.1",
"d3-scale": "^4.0.2",
"lucide-react": "^1.17.0",
@@ -31,6 +32,7 @@
"react-dom": "^19.0.0",
"recharts": "^2.15.0",
"tailwind-merge": "^2.6.0",
"web-push": "^3.6.7",
"zod": "^3.24.1",
"zustand": "^5.0.2"
},