Skip to Content

Architecture

One POST /notifications call creates a NotificationRequest row, then one NotificationDelivery row per (channel × recipient). Sends run in parallel; failures on one delivery do not block others.

POST /notifications NotificationRequest (SQLite) ├─ Delivery (TELEGRAM × chat) ──▶ grammy Bot API ├─ Delivery (EMAIL × address) ──▶ Resend ├─ Delivery (SMS × phone) ──▶ Pindo └─ Delivery (WHATSAPP × phone)──▶ Meta Cloud API

src/ layout

PathRole
main.tsNest bootstrap
app.module.tsRoot module wiring
config/Env / settings
auth/Optional API key guard for /notifications
notifications/Controller, service, DTOs, dispatcher orchestration
channels/Per-channel senders (Telegram, Email, SMS, WhatsApp)
database/TypeORM + entities (NotificationRequest, NotificationDelivery, …)
webhooks/WhatsApp verification and delivery status updates

Persistence

  • Driver: SQLite via TypeORM
  • Default path: DATABASE_URL=file:./data/notifications.db (file: prefix stripped for TypeORM)
Last updated on