Weekly Alerts
People save the Shows list’s filters as Saved Filters (the Save search button, or the bell on a Band or
Venue page), signing in with an emailed link. Each person can have up to 20.
After the ingest of each new edition they get one Alert email listing the Upcoming Shows that match (see
ADR 0003). Accounts and Saved Filters live in Supabase;
emails go through Resend from alerts@list.sturgis.me.
- Commands:
python -m app.cli alertssends this week’s Alerts. A person gets the same Alert only once a day, so running it again sends no one a second email.--dry-runprints them instead, one per person whose Saved Filters match Upcoming Shows, and sends nothing. It needs only the two Supabase settings inbackend/.env(see Configuration):docker compose run --rm api python -m app.cli alerts --dry-run.--only you@example.comsends just one person’s, as a test.
- One-time setup:
- Supabase project: email sign-in on. Site URL
https://list.sturgis.me. Redirect URLshttps://list.sturgis.me/alerts/**andhttp://localhost:3000/the_list/alerts/**; the wildcards are needed because the sign-in link carries the filter to save. Runsupabase/migrations/*.sqlin order in the SQL editor. - Resend: verify
list.sturgis.me(its DKIM, SPF and DMARC records are in thesturgis.meDNS), and create sending-only API keys. - Supabase SMTP: send through Resend (
smtp.resend.com, port 465, userresend), fromalerts@list.sturgis.me. - GitHub:
- secrets
SUPABASE_URL,SUPABASE_SERVICE_ROLE_KEY(thesb_secret_…key) andRESEND_API_KEY, for the Deploy workflow’s Alerts job - variables
NEXT_PUBLIC_SUPABASE_URL,NEXT_PUBLIC_SUPABASE_ANON_KEY(the publishable key) andALERTS_FROM. The Deploy workflow passes the first two to the build asPUBLIC_SUPABASE_URLandPUBLIC_SUPABASE_ANON_KEY; set those infrontend/.envto try sign-in locally.
- secrets
- Supabase project: email sign-in on. Site URL
- Unsubscribe: every Alert links to
/alerts/unsubscribe/?token=…, which turns that person’s Alerts off without signing in. People can also turn them off and on, or delete alerts, on/alerts/. - Privacy: email addresses never enter the repository, the
databranch or the logs. The job logs counts only.