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:
+10
-2
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user