Documentation Index
Fetch the complete documentation index at: https://grantmaster.dev/llms.txt
Use this file to discover all available pages before exploring further.
shared/notifications
Notification delivery infrastructure. All features that need to send in-app or push notifications call into this module — never directly to Firestore.Module Map
| File | Role |
|---|---|
notificationDispatch.ts | Primary entry point — sendNotification(payload, recipientRole) |
notificationCrud.ts | Low-level Firestore CRUD wrappers (get, markRead, delete, snooze) |
notificationRepository.ts | Firestore query layer for the notifications collection |
notificationAudienceResolver.ts | Resolves recipients by SystemRole from the employees collection |
notificationOrchestrator.ts | Chains audience resolution → message building → delivery |
notificationMessageBuilders.ts | Per-type message formatters (subject, body, action URL) |
notificationDeliveryPlanner.ts | Plans delivery channels (in-app, push, email) based on user preferences |
deadlineReminderComposer.ts | Composes deadline-specific reminder notifications |
journalNotifications.ts | Journal submission and approval notification builders |
fcmService.ts | Firebase Cloud Messaging (push notification) delivery |
notificationAnalyticsService.ts | Delivery and open-rate analytics |
templateInterpolation.ts | {{placeholder}} substitution in notification templates |
portalNotificationBuilders.ts | Notification builders for portal stakeholder events |
Primary API
Audience Resolution
notificationAudienceResolver.ts can resolve recipients by role across an organization:
status !== 'active') are excluded from all audience resolution.
Firestore Collection
notifications/{notificationId} — Notification documents. Queried by (organizationId, recipientId).
Callers
Every feature that produces actionable notifications callssendNotification():
features/expenses— submission, approval, rejectionfeatures/journals— submission, approval, rejectionfeatures/admin— assignment notificationsfeatures/users— time-off decisions, invitationsfeatures/compliance— alert notificationsfeatures/grants— outcome notifications