Gishen-ComingSoon/TASKS.md
Kerod-Fresenbet-Gebremedhin2660 96283aed62 feat(waitlist): connect Google Sheets and add invisible spam protection
- Save waitlist and B2B submissions and notify the info inbox
- Add duplicate protection and hourly notification retries
- Require server-verified invisible Turnstile challenges
- Reject reused tokens with a lock-protected hash ledger
- Remove browser-only signup success fallback
- Add privacy notice, regression tests, and setup documentation
2026-11-09 10:59:42 +03:00

39 lines
4.8 KiB
Markdown

# Tasks
## Kerod: set up the contact email and route every inquiry to it
The coming-soon page asks people to email or call Gishen. Before we share the link:
- [x] Create `b2b@gishenpharmacy.org` and `info@gishenpharmacy.org`. Mail DNS, SPF, DKIM, DMARC and mail-client TLS are configured; Kerod verified end-to-end mail delivery.
- [x] Route inquiries to `info@gishenpharmacy.org`: B2B mail is copied there while retaining the B2B mailbox; both web forms send their internal notifications there.
- [ ] Assign someone on the Gishen team to read `info@` daily and respond within one working day, as promised on the page.
- [ ] Confirm `+251 930 099 850` is answered for B2B onboarding calls, or send us the right number to put on the page.
- [x] Deploy `tools/waitlist-apps-script.gs`, owned by `kiburtw1@gmail.com`, with `NOTIFY=info@gishenpharmacy.org`. The live `/exec` URL is configured in `index.html` and deployed to the VPS.
- [x] Verify the email, phone-only and B2B forms on the live page. All three saved successfully and their notification messages arrived in `info@`. Kerod also confirmed end-to-end mailbox delivery.
## Operations
- Private Sheet: [Gishen launch waitlist & B2B inquiries](https://docs.google.com/spreadsheets/d/14zuxfxr1XVNcc7Ld6b2aZcoVfNdKBR6n8GKWwqoVK_k/edit#gid=38651670). Sharing was verified as "Private to only me" under `kiburtw1@gmail.com`. Grant individual team members access as needed; never make the contact list public.
- Apps Script: [Gishen website — Waitlist & B2B](https://script.google.com/home/projects/1h9MhmjgO67uSBHP3juTBz1WBSknQ10lc3049wtaRCNzQidiVxcAXlKob/edit).
- The `Waitlist` tab stores individuals; `Institutions` stores B2B inquiries. `notificationStatus` records whether the internal email was sent. Pending notifications retry hourly.
- Notifications are sent by the owning Google account, with replies directed to `info@`. Google email quotas apply; a delayed notification does not discard a saved signup.
- This is signup collection only. Subscriber launch emails and SMS campaigns are not automatically sent. Plan the launch communication separately, honoring the page's promise of one launch message.
- Updating Apps Script code requires updating the existing deployment to a new version; saving the editor alone does not update `/exec`.
- Run backend regression checks with `node --test tools/waitlist.test.mjs`.
- Three clearly labelled `TEST — Gishen ... setup 2026-11-09` records remain as verification examples: two in `Waitlist` and one in `Institutions`. Exclude/delete these test records before using the lists for real outreach. Their notifications were received in `info@`.
- The previous live page is recoverable at `/var/backups/gishen-waitlist-20261109-Jjqo59/index.html` on the production VPS.
## Silent CAPTCHA configuration
- [x] Deployed Apps Script **Version 3** to the existing `/exec` URL on 2026-11-09, with invisible Turnstile verification and the independent replay guard.
- [x] Verified in Safari: both forms succeed without visible challenges; missing/invalid tokens, wrong-form tokens and replayed valid tokens are rejected. Existing labelled test contacts were reused, and the signup count did not change during these checks.
- [x] All 13 backend regression tests pass, including failure-closed behavior, duplicate protection and replay rejection even if the provider repeats success.
- Cloudflare account: the Yaltopia-Gishen profile's existing account. Widget: `Gishen .org waitlist — invisible`, restricted to `gishenpharmacy.org`; invisible mode, no pre-clearance.
- Public sitekey: `0x4AAAAAAF5kBCYJ6Vhl5ok7`. The matching secret is stored only in Apps Script's `TURNSTILE_SECRET_KEY` Script property, not in this repository.
- Both final form submissions require a fresh token. The server checks hostname and the appropriate `waitlist`/`b2b` action before storing or emailing. Invalid/missing/replayed tokens must fail without changing the lists.
- Token reuse is also blocked by a script-lock-protected hash ledger, independent of the provider response. It stores only SHA-256 hashes for a ten-minute replay window; expired hash entries are pruned on subsequent accepted requests. Do not delete active replay properties to bypass a failed challenge.
- No email/phone ownership check is enabled. If verification cannot finish, visitors can retry or contact Gishen directly; there is no unprotected form bypass.
- Deploy `privacy.html` alongside the page; its footer link and Cloudflare Privacy Addendum disclosure are required for invisible mode.
- Pre-captcha landing-page backup: `/var/backups/gishen-turnstile-20261109.XmlNVe/index.html` on the production server. Reverting HTML alone is not sufficient: the protected backend still requires a token. Coordinate a complete rollback of the Apps Script deployment if needed; Version 1 is the earlier unprotected backend.