Skip to content

Notifications

Status: not yet implemented

There is no notification service in the backend at the time of writing. Search across backend/internal/services/, backend/internal/handlers/, and backend/internal/repository/ returns no notification-related files (only references to email notifications inside AuthService and Apple S2S notifications, which are something else entirely). The frontend route frontend/app/notifications/index.tsx is a static empty-state screen showing "no notifications yet" copy. There is no push provider wired in — neither Firebase Cloud Messaging (FCM) nor Apple Push Notification service (APNs) appears in go.mod or anywhere in the codebase.

This page exists as a placeholder so future work has somewhere obvious to land.

What exists today

Surface Where Notes
users.notifications_enabled column backend/internal/models/user.go Boolean preference, default true, exposed via PATCH /api/v1/auth/profile. Not consumed by any emitter yet.
frontend/app/notifications/index.tsx frontend Static empty-state screen ("no notifications yet").
AuthHandler.HandleAppleNotification backend/internal/handlers/auth_handler.go Apple's server-to-server notification endpoint for consent-revoked / account-delete. Not user-facing notifications.
Welcome / OTP / deactivation emails EmailService (see Email) Transactional email, not in-app notifications.
User webhook (WebhookURL, WebhookSecret) backend/internal/webhooks/service.go + users table Per-user outbound webhook with HMAC signing and SSRF protection. Only fired by AuthHandler.TestWebhook today — no event in the app currently triggers it.

What would need to change

If/when notifications get built, the natural shape is:

  1. Add a notifications table (recipient_id, type, entity_id, entity_type, payload JSONB, read_at).
  2. Add NotificationService with an emit method, fanned out to:
  3. Add a push provider integration — likely FCM for Android/web and APNs for iOS — with per-device token registration on the users or a new device_tokens table.
  4. Optionally route important emits through the existing user webhook (internal/webhooks/).

Where to look

If you're starting this work

Cross-reference Chat (mute / NotificationsEnabled gating already exists in user preferences) and Friends (good first emit point — request sent / accepted is the most user-visible miss today). Hook into the existing async ActivityLogService for the queue plumbing if you don't want to introduce a new worker queue.