Build one service that every team calls with a notification type + recipient, and let the service resolve channel, template, user preferences, and priority. The key design move is priority lanes — an OTP cannot wait behind a 2M-user marketing blast.
Architecture
Services ─▶ Notify API ─▶ [validate + enrich] ─▶ Kafka topics
├─ otp/txn (high lane)
└─ marketing (bulk lane)
│
┌──── Dispatcher (per lane) ────┐
│ prefs check ─▶ template render │
└────┬──────┬──────┬────────────┘
Push Email SMS In-App
(provider adapters + rate limit)
