Repository navigation
Realtime and Notifications
How clinic staff and pet owners get live chat, push notifications, and time-based automation. Operational setup is in Realtime Setup and Notifications Setup; this page is the architecture.
The platform's "realtime" surface is really three distinct systems:
| Need | Mechanism |
|---|---|
| Chat between people | Stream Chat (getstream.io) |
| Push to devices | Firebase Cloud Messaging (FCM) + Notifee (mobile), email via AWS SES/Pinpoint |
| Time-based / async automation | BullMQ queues over Redis |
Conversations run on Stream Chat, not a home-grown socket layer:
- The backend
chat.service.tsusesStreamChat.getInstanceto provision users and channels; the mobile app usesstream-chat-react-native. - Appointment-scoped channels are windowed by appointment status (chat opens/closes around the visit lifecycle). There's also a network/colleague chat and shared-entity chat.
- Stream calls back into the backend at a raw-body webhook
/v1/chat/webhooks/stream(ChatWebhookController.handleStreamEvent). - Upload safety:
config/stream-upload-policy.tspushes a blocked-extension allowlist to Stream at boot; attachments are virus-scanned (attachmentScanner.service.ts, VirusTotal). Enforcement of the blocklist against Stream was fixed in PR #2431 - it was previously configured but not applied.
The Support Chat plans add a dedicated SUPPORT session type on this same Stream infrastructure.
-
Mobile: server-side
firebase-adminsends FCM messages; the device presents them with Notifee, routing taps via ayc://deep-link scheme. Setup and entry points: Notifications Setup. -
Backend:
notification.service.ts+deviceToken.service.tsmanage tokens and dispatch; templates innotificationTemplates.ts; email via AWS SES/Pinpoint. - Care-reminder emails carry opt-out/unsubscribe handling since PR #2419, with a recipient-level opt-out stored in the database.
Time-based and async work runs on BullMQ (Redis-backed), initialized by queues/index.ts (initQueues()) at boot and processed by workers in src/workers:
-
Appointments —
MARK_NO_SHOW(auto no-show after a window). -
Tasks — recurrence, reminders, and schedule engines (
taskRecurrence/taskReminder/taskScheduleworkers). - Labs — IDEXX reference sync, lab-status polling, lab-result ingestion.
There is no central EventBus module today; decoupling is via BullMQ queues plus a FinanceEventService for finance audit events.
docs/guide/realtime-backend.md documents a proposed Redis Pub/Sub + Socket.IO event bus (org-scoped org:{orgId}:events fan-out to browsers) with a shared OrgEvent contract. As of this writing that design is not wired up — socket.io is an installed dependency but no Socket.IO server exists in apps/backend. Treat it as a forward-looking design for browser live-sync, not current behavior. See Realtime Setup for the distinction.
Home · Architecture · ADRs · Plans · Roadmap · Contributing · Main repo · DeepWiki · Discord
Yosemite Crew is a product of DuneXploration UG (haftungsbeschränkt). This wiki mirrors the repository; where a page and the repo disagree, the repo wins. See the Wiki Style Guide.
Product & Domain
Architecture
Applications
- Backend — Overview
- Frontend / PIMS Web — Overview
- Mobile — Overview
- Desktop PIMS Shell
- Developer Portal
- SuperAdmin
Design & Accessibility
Engineering Handbook
Decisions (ADRs)
Design Docs & Plans
Meta
Canonical code & docs: main repo · Auto-generated companion: DeepWiki