feat: Web Push notifications

- VAPID-based push via web-push package
- push_subscriptions table: endpoint + keys per user (upsert on conflict)
- GET /api/push/vapid-key — public key for subscribe flow
- POST/DELETE /api/push/subscribe — store/remove subscription
- POST /api/push/test — manual test notification
- Hourly scheduler: notifies users day before homework due + countdown expires
- SW: push event handler shows notification; notificationclick opens /app
- Settings: Push section with enable/disable/test buttons, auto-detects
  browser support and VAPID availability
This commit is contained in:
Simon
2026-04-23 11:44:28 +02:00
parent a765d2d088
commit 7d464c21eb
8 changed files with 344 additions and 7 deletions
+10 -2
View File
@@ -5,7 +5,14 @@
"scripts": {
"start": "node index.js"
},
"keywords": ["dashboard", "education", "class", "self-hosted", "express", "sqlite"],
"keywords": [
"dashboard",
"education",
"class",
"self-hosted",
"express",
"sqlite"
],
"author": "lulinretrograde",
"license": "MIT",
"repository": {
@@ -25,6 +32,7 @@
"multer": "^2.1.1",
"otplib": "^13.4.0",
"qrcode": "^1.5.4",
"resend": "^6.12.0"
"resend": "^6.12.0",
"web-push": "^3.6.7"
}
}