Skip to content

[TODO Import][Server][Backlog] Push notifications module and integration #10

Description

@ferneediaz

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 ✅

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions