Skip to content

Invite links: track which URL each waitlist signup came through, with an admin dashboard - #96

Merged
DanialBeg merged 2 commits into
mainfrom
claude/busy-fermi-pf8aq2
Nov 19, 2026
Merged

DanialBeg merged 2 commits into
mainfrom
claude/busy-fermi-pf8aq2

Conversation

@DanialBeg

Copy link
Copy Markdown
Member

What this does

Admins can make a trackable link per place the waitlist gets shared and see how far each one's signups get: visited → joined the waitlist → invited → signed in → onboarded.

  • Links: https://edvifi.ai/?ref=<slug>#waitlist. A link only labels where a signup came from; it grants no access. Accounts are still invite-only.
  • Admin dashboard: a new Invite links item in the sidebar, shown only to accounts whose email is in public.app_admins. It shows the funnel in total, per platform (taken from the link name before the colon, e.g. "Reddit: r/FAFSA") and per link, plus create, copy, archive and restore.
  • Database (migration 20261119000000_invite_links, already applied to production): the invite_links table (admin-only RLS, no delete), a shape-checked waitlist.ref column, record_invite_visit (anon-callable, bumps a visit counter) and get_invite_link_stats (admin-only, returns nothing to anyone else). anon still has no select, update or delete on waitlist.
  • scripts/invite/invite.mjs --ref=<slug> invites one link's signups as a wave.

Not in this PR

The form that records the ref lives in Edvifi/landing (feature/invite-link-refs). Until that ships, every signup lands in the "No link" row.

Checks

  • tsc -b, eslint ., npm run build clean; vitest run 762/762.
  • Against production: the stats function returns the expected rows for the admin and an empty set otherwise; security advisors flag only the two intentional SECURITY DEFINER functions.
  • The 61 links from the GTM tracker already exist in production.

claude and others added 2 commits November 19, 2026 02:15
Admins can create a trackable link per school, post or partner
(edvifi.ai/home?ref=<slug>#waitlist) from Settings, and see each link's
funnel: visits, waitlist signups, conversion, invited, signed in and
onboarded. Signups with no ref and stray refs nobody created get rows of
their own, and a stray ref can be adopted as a real link.

- Migration: invite_links table (admin-only RLS), waitlist.ref column
  (shape-checked, no FK so a bad link never fails a signup), anon
  record_invite_visit RPC, admin-only get_invite_link_stats RPC
- Waitlist form reads ?ref=, remembers it in the browser, counts one
  visit per browser per link
- invite.mjs --ref=<slug> sends a wave to one link's signups
- docs/waitlist.md covers setup and what each number means

Links are labels for counting only; they grant no access.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018go6C4tyK3k5ujd1Mc3aCP
@vercel

vercel Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
webapp Ready Ready Preview Nov 19, 2026 4:20am UTC

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying timeline-prototype with  Cloudflare Pages  Cloudflare Pages

Latest commit: 730c61a
Status: ✅  Deploy successful!
Preview URL: https://69f64159.timeline-prototype.pages.dev
Branch Preview URL: https://claude-busy-fermi-pf8aq2.timeline-prototype.pages.dev

View logs

@DanialBeg
DanialBeg merged commit 0227dda into main Nov 19, 2026
6 checks passed
@DanialBeg
DanialBeg deleted the claude/busy-fermi-pf8aq2 branch November 19, 2026 04:26

This branch was successfully deployed

1 active deployment
Preview — 730c61aa Deployed Nov 19, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants