Proje: OkulUp · Hub: OkulUp — Architecture

Notification Deep Linking

resolveNotificationRoute()

Push notification gelince resolveNotificationRoute(payload) → route string döner.

Payload’dan Route Belirleme

Öncelik sırası:

  1. payload.route veya payload.deep_link direkt route → olduğu gibi kullanılır
  2. payload.entity_type → TYPE_ALIASES → TYPE_ROUTE_MAP ile route build edilir
  3. payload.type → aynı akış

Notification Type → Route Map

announcement → /announcement/:id
appointment  → /appointment/:id
assignment   → /assignment/:id
attendance   → /attendance/:id
conversation → /chat/:id
event        → /event/:id
message      → /chat/:id
payment      → /payment/:id

Type Aliases (Backend Event → Normalized Type)

announcement_published → announcement
appointment_created/updated → appointment
assignment_published/reviewed/submitted → assignment
attendance_alert → attendance
event_reminder → event
message_received → message
payment_due/overdue/reminder → payment

ID arama sırası: id, entity_id, {type}_id, conversation_id vb.

WebSocket (Laravel Echo)

Broadcaster: pusher protocol, Laravel Reverb backend. Pusher globalThis’e set ediliyor (React Native için zorunlu).

Config:

  • Host: EXPO_PUBLIC_REVERB_HOST
  • Port: EXPO_PUBLIC_REVERB_PORT
  • Key: EXPO_PUBLIC_REVERB_KEY
  • Auth endpoint: {apiUrl}/broadcasting/auth (Bearer token ile)

forceTLS: false — production’da değiştirilmeli eğer wss kullanılıyorsa.