Skip to content
refs

feat(accounts): open sign-up to everyone and add an admin page

Aman Kumarcommitted Dec 3, 2026c153785parent a3f4aec

Sign-up now creates the account and its namespace at once and signs the person in. People who are still on the old waitlist get their namespace the next time they sign in. The waitlist page, its emails and its texts are gone. Admins still get an email for each new sign-up. The new /admin page shows totals, 30 days of activity, agent runtimes, the most common actions and a table of every person. Only addresses in ADMIN_EMAILS can open it.

1 decision

refs now records when each person last used the site with a browser session or an access token. Only admins see it, on the admin page.

Why

  • The admin page must show which people come back, and refs had no record of visits.
  • refs writes the time at most once every 5 minutes for each person, so the cost stays small.

If this changes later

Remove the recording and drop the stored times with a migration. The admin page then loses the last seen column.

Paths considered

  1. Chosen
  2. Read visits from PostHog
  3. PostHogThe Worker would need a PostHog API key to read data back, and refs sends PostHog only a few events.

Touches

  • resolveActor
  • users.last_seen_at
Evidence · 2
  • apps/backend/identity.ts
  • migrations/0037_open_signup.sql
25 files changed · +447 −212
README.md+2 −6
apps/backend/analytics.ts+2 −2
apps/backend/contract/handles.ts+6 −12
apps/backend/contract/index.ts+0 −1
apps/backend/contract/views.ts+46 −3
apps/backend/handles/account.ts+1 −27
apps/backend/handles/admin.ts+73 −0
apps/backend/handles/gate.ts+20 −15
apps/backend/handles/refs.ts+6 −5
apps/backend/identity.ts+6 −0
apps/backend/mail.ts+4 −26
apps/backend/test/accounts.test.ts+62 −0
apps/backend/test/analytics.test.ts+4 −4
apps/backend/test/provision-analytics.test.ts+1 −0
apps/frontend/components/landing.tsx+2 −2
apps/frontend/components/shell.tsx+1 −1
apps/frontend/docs/quickstart.md+3 −3
apps/frontend/root.tsx+1 −1
apps/frontend/routes.ts+1 −1
apps/frontend/routes/admin-waitlist.tsx+0 −76
apps/frontend/routes/admin.tsx+188 −0
apps/frontend/routes/login.tsx+1 −1
apps/frontend/routes/signup.tsx+6 −16
migrations/0037_open_signup.sql+1 −0
packages/design-system/components/shell.tsx+10 −10