Modules
SquatchMail is a self-hosted Amazon SES email dashboard, shipped as an embeddable Hex package for Phoenix applications.
An opt-in Swoosh adapter that enforces SquatchMail.Guard's guardrails
ahead of a wrapped real adapter.
Observes every Swoosh.Mailer.deliver/2 and deliver_many/2 call in the
host application via :telemetry, with zero changes to the host's mailer
or adapter.
Persists captured emails off the process that sent them.
Reads SquatchMail's application configuration.
A captured or sent email and its lifecycle status.
Metadata about an attachment on an email.
A downstream event observed for an email (delivery, open, click, bounce, etc.).
A normalized recipient of an email (a to/cc/bcc address).
Pre-send guardrails: suppression enforcement and the complaint-rate auto-pause.
Versioned migrations for SquatchMail's database tables.
Periodically prunes data older than the configured retention window.
Generates prefixed, URL-safe public identifiers backed by random bytes.
Amazon SES v2 / SNS integration for SquatchMail.
Hand-written verification of Amazon SNS message signatures.
Orchestrates inbound SNS webhook delivery: token auth, signature verification, SES event normalization, persistence, and suppression rules.
A Plug.Parsers body reader that caches the raw request body in
conn.assigns[:raw_body] before returning it for JSON parsing.
The (single-row) SES connection configuration.
An address that should not be sent to.
The persistence context for SquatchMail's observability data.
Streams the Trail Log's current filter set as a CSV download —
GET <dashboard_path>/activity/export.csv.
Serves SquatchMail's self-contained CSS/JS bundle (plus the logo PNG) with content-hashed, immutable-cached paths.
Shared design-system components for SquatchMail dashboard pages: badges,
stat cards, the live indicator, and empty states. Every visual rule here
traces back to a rule in DESIGN.md — see that file before changing colors,
radii, or copy.
The SquatchMail footprint mark and small outlined nav icons.
Root and app layouts for the SquatchMail dashboard.
Base Camp — GET <dashboard_path>/base-camp, the SES connection/setup page.
The Sighting inspector — GET <dashboard_path>/sightings/:public_id.
The Do-Not-Disturb registry — GET <dashboard_path>/suppressions.
The Trail Log — SquatchMail's default landing page (squatch_mail_dashboard
mounted at /), showing the live activity feed: stat strip, filters, and
the sent-email activity table.
The default on_mount hook and live_session session builder for the
SquatchMail dashboard.
Enforces layers (b) and (c) of SquatchMail.Web.Router's security model.
Mounts the SquatchMail dashboard in a host Phoenix router.
Receives inbound Amazon SNS/SES event notifications at
POST <dashboard_path>/webhooks/sns/:token.
A raw audit record of an inbound webhook payload (typically SNS/SES).
Mix Tasks
Builds priv/static/squatch_mail.css by concatenating
assets/css/fonts.css (the base64-embedded Bebas Neue / Space Mono
@font-face rules) with the hand-written assets/css/squatch_mail.css.
Install and configure SquatchMail for use in this application.