Imported from `server/TODO.md`. ## Kanban - Column: Backlog - Area: Server ## 📋 TODO - Push Notifications (MEDIUM PRIORITY) Browser push notifications for key events. ### Task Breakdown: #### 1. Prisma Schema Updates - [ ] Add `PushSubscription` model (id, userId, endpoint, p256dh, auth, createdAt) - [ ] Run migration - [ ] **Success Criteria:** Schema compiles ✅ #### 2. Push Service - [ ] Create `notifications/` module - [ ] `subscribe(userId, subscription)` — Store push subscription - [ ] `unsubscribe(userId, endpoint)` — Remove push subscription - [ ] `sendNotification(userId, title, body, data?)` — Send push to user - [ ] Generate VAPID keys for web push - [ ] **Success Criteria:** Push notifications delivered ✅ #### 3. Integration Points - [ ] Notify on: match found, battle invite received, friend request, clan challenge - [ ] `POST /api/notifications/subscribe` — Register push subscription - [ ] `DELETE /api/notifications/subscribe` — Unregister - [ ] **Success Criteria:** Notifications fire for all triggers ✅ #### 4. Tests - [ ] Subscription storage tests - [ ] Notification delivery tests - [ ] **Success Criteria:** All notification tests passing ✅ ---
Imported from
server/TODO.md.Kanban
📋 TODO - Push Notifications (MEDIUM PRIORITY)
Browser push notifications for key events.
Task Breakdown:
1. Prisma Schema Updates
PushSubscriptionmodel (id, userId, endpoint, p256dh, auth, createdAt)2. Push Service
notifications/modulesubscribe(userId, subscription)— Store push subscriptionunsubscribe(userId, endpoint)— Remove push subscriptionsendNotification(userId, title, body, data?)— Send push to user3. Integration Points
POST /api/notifications/subscribe— Register push subscriptionDELETE /api/notifications/subscribe— Unregister4. Tests