diff --git a/docs/plans/newsletter.md b/docs/plans/newsletter.md new file mode 100644 index 0000000..4f70f66 --- /dev/null +++ b/docs/plans/newsletter.md @@ -0,0 +1,345 @@ +# Newsletter signup (weekly updates) + +Goal: build an email subscriber list for a weekly "what's changed" update, +collected from **both** the termic.dev site and inside the termic app. + +## Provider: Kit (ConvertKit) + +Chosen for the larger free tier (10k subscribers) over Buttondown (100). + +Key property that makes this simple: Kit's **public form-subscribe endpoint +needs no API key**, so the static site and the desktop app can both POST to +it directly. No backend, no stored secret (which we'd never want to ship in +a desktop binary anyway). + +``` +POST https://app.kit.com/forms//subscriptions +Content-Type: application/json +{ "email_address": "user@example.com" } +``` + +### One-time setup before implementing + +1. Create a Kit account. +2. Grow, Landing Pages and Forms, create an **inline form**. +3. The embed URL ends in the form id, e.g. `.../forms/8284615/subscriptions` + → `FORM_ID = 8284615`. +4. Plug that id into the two `` placeholders below (one in the + Rust const, one in the site form). Same id for both. + +## Part 1: termic.dev site (Astro on Cloudflare Pages) + +Static host, so the plain-HTML-form pattern works with zero Functions. + +- Add a styled `
` with an `email_address` input. +- Best home: `src/components/Footer.astro` (alternatively the hero in + `src/pages/index.astro`). +- Match existing CSS (`src/styles/global.css`). Inline success/error via a + tiny `