E5-F3: Queue Progressive Notifications¶
Delivered by waiting-room
This feature is implemented by the standalone waiting-room service. Queue-lifecycle notifications (admitted, expired, session_expired, and operator-mode called) fan out through waiting-room's own NotificationDispatcher interface — WebSocket while foregrounded, FCM (Android) / APNs (iOS) while backgrounded. They do not flow through the ticketing backend's Notification Workers and do not appear on the NATS Event Bus.
Epic: E5: Waiting Queue System
Size: S (Small)
Problem / Outcome¶
Push notifications at key queue milestones.
Scope¶
In-Scope:
- Push for significant position changes
- Push at position ~50 ("almost at front")
- Push when it's user's turn
- Firebase integration
Out-of-Scope:
- In-app popups (client-side implementation)
Acceptance Criteria¶
- AC1: Push sent when position significantly changes
- AC2: Push sent when user reaches position ~50: "You're almost at the front!"
- AC3: Push sent when it's user's turn: "It's your turn! Buy tickets for [Match]"
Data Model Impact¶
NotificationLog table:
- id (UUID, PK)
- user_id (UUID, FK)
- type (ENUM: queue_update, queue_near_front, queue_your_turn)
- match_id (UUID, FK)
- message (VARCHAR)
- sent_at (TIMESTAMP)
- delivery_status (ENUM: sent, delivered, failed)
Permissions/Roles¶
- System (triggered by queue advancement)
How to Verify¶
npm test -- --grep "queue notifications"
Expected: Pushes sent at correct milestones.
Dependencies¶
Implementation Tasks¶
Doc References¶
Last Updated: January 2026