Skip to content

svc-notifications

NovaTrek Notifications Service  |  Support  |  v1.0.0  |  NovaTrek Platform Team

Sends notifications to guests and guides via email, SMS, push, and in-app channels.

Swagger UI Download OpenAPI Spec


Integration Context

svc-notifications C4 context diagram

Data Store

Overview

Property Detail
Engine PostgreSQL 15 + Valkey 8
Schema notifications
Tables notifications, templates, delivery_log, channel_preferences
Estimated Volume ~15,000 notifications/day
Connection Pool min 5 / max 25 / idle timeout 10min
Backup Strategy Daily pg_dump, 30-day retention

Key Features

  • Valkey queue for async delivery processing
  • Template versioning with rollback support
  • Multi-channel delivery: email, SMS, push, in-app

Table Reference

notifications

Notification dispatch records with delivery tracking

Column Type Constraints
notification_id UUID PK
recipient_id UUID NOT NULL
template_id UUID NOT NULL, FK -> templates
channel VARCHAR(20) NOT NULL
subject VARCHAR(255) NULL
body TEXT NOT NULL
status VARCHAR(20) NOT NULL, DEFAULT 'queued'
scheduled_at TIMESTAMPTZ NULL
sent_at TIMESTAMPTZ NULL
created_at TIMESTAMPTZ NOT NULL

Indexes:

  • idx_notif_recipient on recipient_id, created_at DESC
  • idx_notif_status on status
  • idx_notif_scheduled on scheduled_at (WHERE status = 'scheduled')

templates

Notification content templates with version history

Column Type Constraints
template_id UUID PK
name VARCHAR(100) NOT NULL
channel VARCHAR(20) NOT NULL
subject_template TEXT NULL
body_template TEXT NOT NULL
version INTEGER NOT NULL, DEFAULT 1
active BOOLEAN NOT NULL, DEFAULT TRUE
created_at TIMESTAMPTZ NOT NULL

Indexes:

  • idx_tpl_name_channel on name, channel

delivery_log

Delivery attempt history for debugging and retry logic

Column Type Constraints
log_id UUID PK
notification_id UUID NOT NULL, FK -> notifications
attempt SMALLINT NOT NULL
status VARCHAR(20) NOT NULL
provider_response JSONB NULL
attempted_at TIMESTAMPTZ NOT NULL

Indexes:

  • idx_dlog_notif on notification_id

Solutions Affecting This Service

Ticket Solution Capabilities Date
NTK-10009 Refund and Dispute Management Workflows CAP-5.5, CAP-5.4 2026-03-06

Endpoints (6 total)


GET /notifications -- List notifications

Returns notifications filtered by recipient and/or channel, ordered most-recent first.

View in Swagger UI

GET /notifications sequence diagram

POST /notifications -- Send a notification

Queues a notification for delivery via the specified channel.

View in Swagger UI

POST /notifications sequence diagram

GET /notifications/{notification_id} -- Retrieve notification details

Returns full details and delivery status of a single notification.

View in Swagger UI

GET /notifications/{notification_id} sequence diagram

POST /notifications/bulk -- Send bulk notifications

Sends the same templated notification to multiple recipients.

View in Swagger UI

POST /notifications/bulk sequence diagram

GET /templates -- List notification templates

Returns all available notification templates, optionally filtered by channel.

View in Swagger UI

GET /templates sequence diagram

POST /templates -- Create a notification template

Registers a new notification template with variable placeholders for dynamic content.

View in Swagger UI

POST /templates sequence diagram

Consuming Applications

Application Screens Using This Service
Guest Portal Reservation Management, Waiver Signing, Trip Gallery
Operations Dashboard Safety Incident Board
Adventure App Photo Upload, Weather and Trail Alerts

Events Consumed

Event Producer Channel
reservation.status_changed svc-reservations novatrek.booking.reservation.status-changed
checkin.completed svc-check-in novatrek.operations.checkin.completed
schedule.published svc-scheduling-orchestrator novatrek.operations.schedule.published
payment.processed svc-payments novatrek.support.payment.processed
incident.reported svc-safety-compliance novatrek.safety.incident.reported
emergency.triggered svc-emergency-response novatrek.safety.emergency.triggered
wildlife_alert.issued svc-wildlife-tracking novatrek.safety.wildlife-alert.issued