Skip to content
Docs
ProvidersUpdated 2026-08-20

Newsletter and notifications

Subscribe audiences through Resend or Beehiiv and send operational messages through Discord or Feishu.

Newsletter contract

The newsletter module exposes three operations:

  • subscribe;
  • status;
  • unsubscribe.

The same page and API work with Resend Contacts or Beehiiv. Waitlist and signup flows call the stable operations rather than a vendor SDK.

Select a newsletter provider

env
VITE_NEWSLETTER_PROVIDER=resend

Use beehiiv for the alternate adapter.

Preview mode

env
NEWSLETTER_PREVIEW=true

The preview adapter stores deterministic subscription state so end-to-end tests can join, query, and unsubscribe without a vendor account.

Waitlist integration

A first waitlist join can subscribe the selected newsletter provider and send a welcome email. The waitlist remains the durable source of queue position and referral state in D1.

Notification contract

Discord and Feishu adapters receive bounded text through one sendNotification operation. Admin can choose a provider and exercise the integration from the product UI.

env
NOTIFICATION_PREVIEW=true

Preview mode confirms the request locally. Production requires the selected webhook URL.

Operational guidance

  • Keep audience status cache in KV and queue state in D1.
  • Provide a working unsubscribe path.
  • Never send administrator-only data through a public notification endpoint.
  • Rate-limit automated notification sources when you add them.
TanStarter SES documentationBuilt with TanStack Start and Content Collections.