Michael Freno f66fd43f62 nook: capture trial email and run the two lifecycle emails
Trials were anonymous — a 14-day trial you cannot talk to. trials gains
an email column (idempotent ALTER), POST /api/the-nook/trial-email
attaches the optional first-launch prompt's answer, and the address
lands in a Brevo list when NOOK_TRIAL_LIST_ID is set. The lifecycle
emails follow: a D+11 trial expiry reminder with a buy link, a purchase
thank-you from the Stripe webhook, and scheduled testimonial (D+3) and
review (D+14) asks via the daily /api/the-nook/lifecycle cron. Rows are
marked before sending so retries never double-send; trial addresses
that already bought get no buy reminder; the endpoint requires a
Bearer secret (CRON_SECRET / NOOK_LIFECYCLE_SECRET) and fails closed
when unconfigured — an open trigger would email real users. All sends
are best-effort and logged, never thrown.

Tests: trial-email (3) and lifecycle (6) suites; full run 539 pass.

Issues: FRE-10, FRE-11
2026-10-04 23:22:24 -04:00
2026-07-23 22:53:40 -04:00
2026-10-03 15:01:23 -04:00
2026-09-05 16:06:27 -04:00
2026-09-06 13:53:49 -04:00
2026-10-03 11:04:37 -04:00
2025-12-17 13:51:13 -05:00
2025-12-16 22:42:05 -05:00
Description
No description provided
153 MiB
Languages
TypeScript 64.5%
JavaScript 33.6%
CSS 1.2%
HTML 0.4%
Shell 0.3%