Storefront has been decoupled into micro-frontends with a dedicated commerce app and shared shell.

Read the architecture guide →

Internal platform system that consumes order commands, renders email templates, and submits messages over SMTP.

Internal

System Purpose & Boundary

The Notification System centralizes transactional email rendering and SMTP delivery handoff within the PlatformDomainv1.0.0PlatformProvides cross-cutting capabilities for recurring scheduled triggers and durable, idempotent transactional email notific...Ownerplatform-engineering-teamDiagramOpen docs domain. It consumes order lifecycle commands from Finance SystemSystemv1.0.0Finance SystemInternal BookWorm workflow system that coordinates post-checkout basket cleanup and order notifications through Durable ...Ownercommerce-fulfillment-teamDiagramOpen docs, merges supplied order and customer context into shared email templates, and submits MIME messages to the configured mail provider (SendGridSystemv1.0.0SendGridExternal email delivery platform used by BookWorm to submit rendered transactional emails over authenticated SMTP. Ownerplatform-engineering-teamDiagramOpen docs in publish environments, or a local test inbox in development). Owning order business state, tracking inbox delivery/bounces, and maintaining a relational email outbox are explicitly out of scope.

Warning

Mail-provider acceptance confirms only SMTP submission—not recipient inbox arrival or underlying order success. Calling domains retain full ownership of business state, and exhausted delivery retries route to the dead-letter Kafka topic.

Contained Capabilities

Service / AgentRole in SystemPrimary Data StoreInteraction Style (Sync / Async)
Notification APIServicev1.0.0Notification APIInternal background worker that consumes order commands from Kafka, renders MJML email templates, and submits mail over ...SubscribesPlaceOrderCommand, CancelOrderCommand +1APIsAsyncAPIOwnerplatform-engineering-teamDiagramRepositoryOpen docsConsumes order email commands from Kafka, deduplicates by message ID, renders templates, and submits over SMTPRedis (24-hour idempotency cache)Async (Kafka consumer & SMTP client)

External Interactions & Trust Boundaries

System Visualizations

System Context

Component Topology

Architecture Decisions

Architecture Decision Records (9)

Decisions that apply to this Notification System. Search, filter by status, or sort by clicking a column.
Summary
ADR-001: Consume order notification commands through KafkaAcceptedNov 1, 2026Notification consumes Finance order commands through Wolverine and Kafka, keeping email processing outside the business operation's synchronous path.
ADR-002: Persist email work in a PostgreSQL outbox before SMTP submissionSupersededNov 1, 2026Notification owns durable email records in PostgreSQL and marks them sent after the sender succeeds, without claiming atomic or exactly-once provider delivery.
ADR-003: Keep email delivery behind a MailKit SMTP provider boundaryAcceptedNov 1, 2026Notification submits MIME messages through MailKit over SMTP, using MailPit in development and a configured provider elsewhere without relying on SendGrid's HTTP API.
ADR-004: Let Scheduler trigger Notification-owned maintenance batchesSupersededNov 1, 2026Scheduler publishes hourly maintenance requests while Notification selects and processes bounded outbox batches and owns resend and cleanup outcomes.
ADR-005: Treat notification content and credentials as confidentialAcceptedNov 1, 2026Notification keeps recipient data and rendered content transient during SMTP delivery and requires runtime secrets and restricted operational access.
ADR-001: Keep notification ownership inside BookWormAcceptedOct 27, 2026BookWorm treats SendGrid as an external delivery provider while the Notification System owns notification state, business meaning, and delivery policy.
ADR-002: Keep business ownership outside the SchedulerAcceptedOct 27, 2026The Scheduler System coordinates when work is attempted, while Catalog and Notification systems own validation, processing, business data, and final outcomes.
ADR-002: Use a durable outbox with bounded provider retriesAcceptedOct 27, 2026Notification delivery attempts are driven by durable outbox records and a bounded retry policy so provider outages do not lose work or create unbounded duplicate sends.
ADR-003: Keep SendGrid credentials and message data within the delivery boundaryAcceptedOct 27, 2026SendGrid credentials are runtime secrets, while email addresses and message content are restricted to the components that require them for delivery and support.
  • Notification DeliveryFlowv1.0.0Notification DeliveryFinance emits order-notification commands over Kafka; Notification API applies Redis idempotency, renders MJML email tem...Ownerplatform-engineering-teamView flowOpen docs — End-to-end notification rendering and SMTP submission flow.
  • User CheckoutFlowv1.0.0User CheckoutAn authenticated customer checks out a persisted basket through Ordering API; Finance coordinates asynchronous basket cl...Ownercommerce-fulfillment-teamView flowOpen docs — Checkout flow triggering order placement notifications.
  • domains/bookworm/subdomains/platform/engineering/platform-integration-boundaries — Platform service and external provider boundaries.