- 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 |
||
|---|---|---|
| brand | ||
| icons | ||
| products | ||
| tools | ||
| favicon.ico | ||
| index.html | ||
| privacy.html | ||
| README.md | ||
| TASKS.md | ||
Gishen Pharmacy: coming soon
A static waitlist page for the Gishen online pharmacy launch. It has no build step and no dependencies: index.html plus its assets. The logo, icons, product images, brand colours and branch list come from the main Gishen repo.
npx serve . # or: python3 -m http.server
Deploy it to any static host (Vercel, Netlify, nginx) with the repo root as the site root. Asset paths are absolute (/brand/...).
Waitlist
The form takes a phone number (SMS, the default) or an email, then asks for a name. The live ENDPOINT posts to tools/waitlist-apps-script.gs, which saves to a private Google Sheet owned by kiburtw1@gmail.com and sends an internal notification to info@gishenpharmacy.org. The page only confirms success after a server-side save; there is no browser-only success fallback.
Individuals and institutions are stored in separate tabs. Duplicate contacts do not create extra waitlist rows or repeat already-sent notifications. Notification failures and Google email quota exhaustion leave rows marked pending; an hourly trigger retries them. User-entered values are protected against spreadsheet formula injection.
Keep the Sheet private. The anonymous web app runs as the owner and exposes only a signup count on GET, not contact details. Owner access, links, deployment notes and remaining human tasks are in TASKS.md. Saving script changes is not enough: update its existing web-app deployment to a new version, preserving the /exec URL. Run setupWaitlist once when provisioning a new project; it creates the tabs and hourly retry trigger.
Run backend regression checks: node --test tools/waitlist.test.mjs.
This collects a waitlist; it does not send welcome emails, SMS or launch campaigns automatically.
Invisible spam protection
Both forms obtain a fresh Cloudflare Turnstile token on final submission. The widget is configured in Invisible mode for gishenpharmacy.org, so visitors do not see a checkbox or puzzle. No email or phone ownership verification is performed.
Apps Script validates every token with Cloudflare before writing to Sheets or sending notifications. It requires a successful verification, the exact gishenpharmacy.org hostname and the matching waitlist or b2b action. A script-lock-protected hash ledger also prevents token reuse even if the provider repeats a successful response; hashes expire after ten minutes and are pruned on subsequent accepted requests. Raw tokens are never stored. Missing, expired/reused, invalid and wrong-site tokens are rejected. Verification outages fail closed, with a retry/contact message; there is no unprotected submission fallback.
Only the public sitekey belongs in index.html. The secret is stored as TURNSTILE_SECRET_KEY in Apps Script Project Settings → Script properties. Never put it in HTML, source control or logs. If replacing the widget, update both its public sitekey and that private property, then test both forms. Saving server code is not enough: update the existing web-app deployment to a new version.
privacy.html discloses this use and links Cloudflare's Turnstile Privacy Addendum, as required for invisible mode. Keep it deployed and linked from the footer. This bot check is not a substitute for rate limiting and does not prove ownership of a submitted contact address.
B2B onboarding
Institutions sign up through the form in the B2B section (institution, type, contact person, phone, optional email and usual orders). It posts to the same Apps Script endpoint with type: 'b2b', which adds a row to an "Institutions" tab and emails NOTIFY. Without an endpoint the B2B form falls back to opening a pre-filled email. Direct mail to b2b@gishenpharmacy.org is also copied to info@, retaining both mailboxes. Institutions can call +251 930 099 850; the team must confirm that this number is staffed and ensure the promised one-working-day response.