ACME HQDemo work items and pages, made up for Emargen's demo. Not a real company.
Engineering / Engineering / Architecture overview

notifier

By Piet de Vries · created 14 Apr 2025, 08:30 UTC · last updated 22 Oct 2026, 15:40 UTC · version 15

notifiermailcresttextbridgenoticesarchitecture

Repository: Emargen/acme-notifier · Owner: Elif Yildiz (since June 2026; Piet de Vries before) · Stack: TypeScript on Node.js 20

notifier tells people things. It sends notice emails through Mailcrest, SMS codes through Textbridge, and in-app notices to the bell in the portal. It decides nothing about access: it reacts to identity-service's events. This page replaces the 2021 notes.

What it sends

NoticeTriggerEmailIn-appSMS
Request waitingaccess_request.createdto the approveryes–
Reminderidentity-service's reminder jobto the approveryes–
Decision madeaccess_request.decidedto the person who askedyes–
Single sign-on switched on for a depotdepot.sso_enabledto the client's administratorsyes–
Requests moved to youaccess_request.moved (since 22 October)one email per new approveryes–
Phone codedirect call from identity-service––yes

The wording of each notice lives in src/templates/; Leo checks new templates for tone.

Mail: Mailcrest

Until 16 October, every client's email went through one Mailcrest account (src/send/sendNotice.ts used DEFAULT_ACCOUNT). That account is in Mailcrest's US region, and Mailcrest keeps message logs for 30 days where the account is. ACM-305 found this on 12 October while building Halden's EU notices: every notice to an EU client's people left a log in the US. Mira chose option b on 13 October: a second account in Mailcrest's EU region.

Since 16 October (ACM-304, switched over in OPS-50):

// src/send/sendNotice.ts
const account = provider.account(accountForRegion(client.region));
Client regionMailcrest accountMessage logs kept
EUEU accountin the EU, 30 days
UKUS accountin the US, 30 days
USUS accountin the US, 30 days

Bounces and complaints come back by webhook per account. Both accounts share one suppression list, synced hourly. If mail stops: Runbook: notice emails not arriving.

SMS: Textbridge

Phone codes go out through Textbridge. identity-service calls POST /codes on notifier directly rather than through the queue, so a code leaves within a second. Delivery receipts come back by webhook; since OPS-33 an alarm fires when receipts lag more than five minutes. There is one SMS provider (ADR-013). If codes stop: Runbook: SMS codes not arriving.

In-app notices

Since 4 August the same events also make in-app notices, stored in notifier's own table per region and served to the portal's bell. They are kept 90 days. Read state is per person.

Events and idempotency

notifier reads the region's queue. Every event carries an id; notifier stores handled ids for seven days and drops repeats, because the outbox delivers at least once.

Change history

VersionDateWhoWhat
928 May 2026PietSMS codes through Textbridge
1024 Jun 2026ElifOwnership; receipt-lag alarm after OPS-33
115 Aug 2026ElifIn-app notices
1217 Sep 2026ElifMail library brought up to its latest release
1313 Oct 2026ElifMailcrest's US logs (ACM-305)
1416 Oct 2026ElifEU account live; account picked by region
1522 Oct 2026ElifRequests moved to you (ACM-320)