Notifications
In-app notifications list, push notifications (local reminders and server push), and a shared notification hook for permission and listeners.
Location
src/core/hooks/useNotifications.ts— Shared hook for permission, listeners, cold start, push sync (used by App, PermissionsPrompt).src/features/notifications/api/—notifications.service.ts,push.service.tssrc/features/notifications/domain/—notifications.store.tssrc/features/notifications/ui/— NotificationsListScreen
Shared hook: useNotifications
- Purpose: Single place for notification handling (local and server). Used in App for listeners and permission prompt.
- Options:
onNoteIdFromNotification,userId,appIsReady - Returns:
permissionStatus,requestPermission,ensureChannelForReminders,showPermissionPrompt,setShowPermissionPrompt
Screens
| Screen | Purpose |
|---|---|
| NotificationsListScreen | List of notifications, mark read |
| Settings > Notifications | Push toggle |
API
- notifications.service — Fetch notifications, mark read.
- push.service — Expo push tokens, enable/disable, sync token to backend.
Domain
- notifications.store — Notifications list, unread count; used by UI and tab badge.