Static landing page for the Mischief Manager waitlist. Hosted on GitHub Pages (frontend) with a recommended Vercel/Netlify serverless backend for secure waitlist collection using the Resend API.
- Dark-mode responsive landing page
- Enhanced waitlist form (email + optional handle + source)
- Client-side status + graceful error handling
- Sends data to a serverless
/api/waitlistendpoint - Uses Resend for confirmation + internal notification
- Optional GitHub file storage (append JSON/CSV via API)
- Push this repo to GitHub.
- Enable GitHub Pages (Settings → Pages → Deploy from branch, root).
- Configure custom domain + DNS.
- (Optional) Override endpoint without rebuilding by injecting
WAITLIST_ENDPOINTusing a small snippet beforescript.jsif you serve via another host.
<script>window.WAITLIST_ENDPOINT='https://your.vercel.app/api/waitlist'</script>
<script src="script.js" defer></script>You need a secure backend because the Resend API key must never be exposed in the browser.
Add a file api/waitlist.js in a Vercel project (see sample in this repo under api/waitlist.sample.js).
Set the following in Vercel/Netlify dashboard:
RESEND_API_KEY– Your Resend API key- (Optional)
NOTIFY_TO– Internal email(s) to alert (comma separated) - (Optional)
GITHUB_TOKEN_SIGNUPS– Fine‑grained PAT to append signups file - (Optional)
REPO_SLUG– e.g.youruser/mischief-manager.waitlist-data
- User submits form → POST
/api/waitlist. - Function validates + dedups (simple email hash).
- Sends confirmation email via Resend.
- Sends internal notification (optional).
- Appends record to GitHub file OR a simple in-memory fallback if storage not configured.
Create a separate private repo to store waitlist.json or waitlist.csv. Grant the PAT content:write for that repo only. The function will:
- Fetch existing file (if any)
- Append new record
- Commit updated file via GitHub Contents API
Minimal: reject >3 submissions per IP/hour or same email within 24h. (See sample code placeholder.)
Use a simple transactional email (plaintext or minimal HTML). Avoid heavy styling for deliverability.
See api/waitlist.sample.js in this repository for a full implementation outline.
You can still open index.html directly; submission will fail unless WAITLIST_ENDPOINT is reachable.
- Never embed
RESEND_API_KEYin frontend code. - Use serverless cold storage commits sparingly to avoid rate limits.
- Sanitize/validate email + optional handle before storing.
- Add hCaptcha/Turnstile for bot defense
- Add region-based risk copy
- Provide real-time position in waitlist
Internal use only (add proper license if needed).