Skip to content

feat: push notification system#59

Merged
mohitgauniyal merged 5 commits into
devfrom
feature/notifications
Apr 23, 2026
Merged

feat: push notification system#59
mohitgauniyal merged 5 commits into
devfrom
feature/notifications

Conversation

@mohitgauniyal
Copy link
Copy Markdown
Collaborator

Notification Architecture

  • Event-driven system — routes emit events, dispatcher handles delivery
  • rules.ts — single file to change who gets notified and what message
  • Adding new notification type = 3-4 lines across 3 files

Backend

  • events/emitter.ts — all app event constants in one place
  • notifications/rules.ts — notification rules for all event types
  • notifications/dispatcher.ts — listens to events, sends notifications
  • utils/expoPush.ts — Expo Push API with token cleanup and error handling
  • complaints.ts — emits events instead of direct push calls

Mobile

  • Device token registration working with EAS build
  • Notification permission request on first login
  • Foreground notification handler — shows banner when app is open
  • Tap handler with deep link map — tapping notification navigates to correct screen
  • navigationRef wired to NavigationContainer

EAS Setup

  • Firebase Android configured via EAS secret
  • FCM V1 service account key uploaded
  • app.config.js with dynamic googleServicesFile
  • Development build working on Android

Tests

  • Jest mock for expo-server-sdk
  • 188 tests passing

- Event emitter with all app event constants
- Notification rules — single file to change who gets what
- Dispatcher — listens to events, sends notifications
- expoPush utility using expo-server-sdk
- complaints.ts emits events instead of direct push calls
- Jest mock for expo-server-sdk
- 188 tests passing
@mohitgauniyal mohitgauniyal merged commit 714c3c8 into dev Apr 23, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant