06.14

Obavijesti

Sažetak

Obavijesti u aplikaciji, push na iOS i Android, web push i e-pošta, vođeni outbox tablicom i usklađivani po rasporedu. Push poruke ne nose klinički sadržaj.

Tehnička specifikacija vodi se na engleskom jeziku; naslovi i sažeci poglavlja prevedeni su na hrvatski.

Overview

  • ProductionOperate · Notifications
    Tell the right person that something needs them, on whichever device they are using.

Pipeline

  1. A domain change writes a notification in the same transaction.
  2. A change bus fans it out to open clients; a one-minute drain decides at send time whether a push is still useful (expired, resolved, muted, quiet hours, already seen in a live tab) and sends one push per person per drain.
  3. FCM, APNs and Web Push deliver to registered devices; email goes through the configured mail provider.
  4. Reconciliation re-sends anything not acknowledged.

Data owned

  • Clinic notifications
    Holds
    The inbox
  • Push registrations
    Holds
    Encrypted device tokens

Models and engines

This module makes no model calls. Everything it computes is deterministic code.

Guardrails

  • Native push carries a generic category sentence; web push is sent without a payload, so there is nothing to leak.
  • Tokens are encrypted at rest.
  • No provider call runs inside a database transaction; drains work under a lease, so a crash re-sends at most once and the device collapses duplicates.

Rollout and status

  • ProductionInbox, push, email
    Native push through Capacitor

Interfaces

  • Consumes
    What
    Domain events across modules
  • Emits
    What
    Inbox entries, push and email
SOURCE OF TRUTH
  • server/services/notifications/
  • docs/notifications-tier1-implementation-plan.md
Svaki broj u ovoj specifikaciji generira se iz repozitorija i provjerava u CI-ju.