Skip to content

Mobile Chat Notifications Adverse Events

Ankit Upadhyay edited this page Jul 9, 2026 · 1 revision

Mobile: Chat, Notifications, Adverse Events

Messaging, push, adverse-event reporting, and the Merck reference. Part of Mobile Overview. Architecture context: Realtime and Notifications.

Chat (Stream Chat)

src/features/chat/:

  • services/streamChatService.ts — getChatClient, connectStreamUser, disconnectStreamUser, getAppointmentChannel, markChannelAsRead, getUnreadCount, sendMessage, isClientConnected, getCurrentUserId; chatBackendService.ts for token/channel provisioning.
  • Components: CustomAttachment, EnhancedMessage, EnhancedMessageInput, VoiceMessagePlayer. Screen: ChatChannelScreen.tsx, reached from the Appointments stack (Chat, ChatChannel). Backend: Backend: Realtime, Chat, Jobs.

Notifications

  • In-app: src/features/notifications/ — notificationSlice.ts (notifications: items, unreadCount, filter, sortBy), thunks.ts, services/notificationService.ts; components NotificationCard, NotificationFilterPills; screen NotificationsScreen.
  • Push: src/shared/services/firebaseNotifications.ts — initializeNotifications, handleBackgroundRemoteMessage, handleNotificationBackgroundEvent, scheduleLocalReminder, clearAllSystemNotifications, getCurrentFcmToken; token registration in deviceTokenRegistry.ts. FCM/Notifee are bootstrapped by the NotificationBootstrap component in App.tsx, which routes taps via NotificationNavigationIntent → navigateFromNotificationIntent. Setup: Notifications Setup.

Adverse-event reporting

src/features/adverseEventReporting/ — a multi-step wizard:

  • state/AdverseEventReportContext.tsx, services/adverseEventService.ts, content (generalInfoSections.ts, supportedCountries.ts), components (AERLayout.tsx, AERInfoSection.tsx).
  • Screens: LandingScreen, Step1–Step5, ThankYouScreen. Stack: AdverseEventStackNavigator.tsx. Backend: adverse-event.

Merck manuals

src/features/merck/ — services/merckService.ts, components/MerckSearchWidget.tsx, screens/MerckManualSearchScreen.tsx, types.ts (MerckEntry, MerckLanguage). Surfaced through the Appointments stack MerckManuals route. Backend: Backend: Integrations.

Related

Product & Domain
Architecture
Applications
Design & Accessibility
Engineering Handbook
Decisions (ADRs)
Design Docs & Plans
Roadmap
Operations
Meta

Canonical code & docs: main repo · Auto-generated companion: DeepWiki

Clone this wiki locally