Available Documentation Notifier - Project Overview

🏠 Home contracted-services / availabledocumentationnotifier / docs

Available Documentation Notifier - Project Overview

Solution Structure

Project Type Framework Description
TELS.ContractedServices.AvailableDocumentationNotifier Console App (Batch) .NET 8.0 Scheduled batch job — notifies facility contacts when documentation is available
TELS.ContractedServices.AvailableDocumentationNotifier.Tests xUnit (.NET 8.0) .NET 8.0 Unit tests (Moq, xUnit)

Architecture

Purpose

AvailableDocumentationNotifier is a scheduled Nomad batch job that runs weekly (Mondays at 9 AM UTC) to notify facility contacts when documentation has been uploaded for contracted service events within the past week. It is a satellite service to the main Contracted Services system.

How It Works

  1. Runs every Monday at 9:00 AM UTC via Nomad scheduler
  2. Calculates a 7-day notification window ending at the most recent Monday 9 AM
  3. Retrieves all contacts with contracted service locations from the Contracted Services API (paginated)
  4. For each contact, publishes an AvailableDocumentationNotificationCommand with their facility IDs and the date window
  5. The main Contracted Services subscriber consumes these commands and sends actual emails

Notification Window Logic

The cutoff date is calculated as the most recent occurrence of the configured NotificationDayOfWeek at NotificationHourOfDay: - Window: [cutoffDate - 7 days, cutoffDate) — exactly 7 days - If run on Monday at 10 AM: window = last Monday 9 AM to this Monday 9 AM - If run on Monday at 7 AM (before configured hour): window = previous Monday 9 AM to last Monday 9 AM

Published Messages

Message Type Consumed By
AvailableDocumentationNotificationCommand Contracted Services subscriber

Schema:

{
  "personId": 500,
  "facilityIds": [100, 200],
  "createdAfterDateInclusive": "2026-03-02T09:00:00Z",
  "createdBeforeDateExclusive": "2026-03-09T09:00:00Z"
}

Published via BusProxy (TELS.BusProxy.Client 3.0.0 with S3 fallback, 45s timeout).


Key Technology Stack

Category Technology
Runtime .NET 8.0
Orchestration Nomad (Platypus framework)
Event Publishing TELS.BusProxy.Client 3.0.0 + S3 fallback
Auth JWT token refresh via Auth Service (5-minute cache)
Resilience Polly 8.6.0 (3 retries, exponential backoff)
Configuration Vault (secrets) + Consul (config) via envconsul
Logging JSON to AWS CloudWatch (platypus log group)
Testing xUnit, Moq

External Dependencies

Integration Mechanism Description
Contracted Services API HTTP (TELS.WebServiceClients.ContractedServices.V1 1.9.0 + V2 2.6.1) Retrieves contacts with contract locations (paginated)
Auth Service HTTP Token refresh (5-minute cache)
BusProxy HTTP + S3 fallback Message publishing (45s timeout)

Deployment