1 Like
1 BranchVal Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Registration site for the Feeling of Computing SF meetup on Thursday, August 6, 2026 at 6 PM at The Nook, 1242 Market St Fl 2, San Francisco.
Built on Val Town with Better Auth magic-link login, React, Hono, and SQLite.
🔗 Live site: https://foc-sf-2026.val.run 🏠 Community: https://feelingof.com
- Registration form — no login required to sign up. Collects email, name,
legible link, motivation, demo topic, and free-form notes.
All fields use proper
autocompleteattributes for browser autofill. - Magic-link auth — after registering, users can log in with their email to edit their registration. Powered by Better Auth + Val Town Email.
- Admin panel — at
/admin, restricted to admin emails (set viaADMIN_EMAILenv var). Shows all registrations with expandable details. - Email notifications — admin gets an email when someone registers.
- View source — every page links to the source code on Val Town.
Rendering mermaid diagram...
index.ts ← Hono entrypoint: auth, API routes, static serving
backend/
auth.ts ← Better Auth instance (magic link + email)
schema.ts ← Creates auth tables + registrations table
api.ts ← Registration CRUD + admin API routes
frontend/
index.html ← HTML shell (Twind + React)
index.tsx ← React entrypoint
lib/
auth-client.ts ← Better Auth React client (useSession, signIn, signOut)
components/
App.tsx ← Root: client-side router + session state
Header.tsx ← Sticky header with login/logout + view source
LandingPage.tsx ← Event info + register CTA + inline form
RegisterForm.tsx ← 6-field registration form (autofill-friendly)
RegisterSuccess.tsx ← Post-registration: "log in to edit" + magic link
MyRegistration.tsx ← View/edit your registration (auth-gated)
AdminPanel.tsx ← All registrations table (admin-only)
SignIn.tsx ← Reusable magic-link sign-in form
- Register: Visit
/→ click "Register" → fill form → submit → success page with "log in to edit" button. - Edit registration: Click "log in to edit" → magic link email →
click link → logged in →
/meshows your registration with edit button. - Admin: Log in with an admin email → visit
/admin→ see all registrations.
| Key | Description |
|---|---|
BETTER_AUTH_SECRET | Secret for signing session tokens (generate from generate-random-signing-key.val.run) |
ADMIN_EMAIL | Comma-separated admin email addresses for admin panel access |
👉 Add BETTER_AUTH_SECRET here: https://www.val.town/x/stevekrouse/foc-sf-2026/environment-variables?key=BETTER_AUTH_SECRET
👉 Add ADMIN_EMAIL here: https://www.val.town/x/stevekrouse/foc-sf-2026/environment-variables?key=ADMIN_EMAIL
Auth tables (user, session, account, verification) are managed by
Better Auth. The app adds one table:
CREATE TABLE registrations (
id TEXT PRIMARY KEY,
email TEXT NOT NULL UNIQUE,
name TEXT NOT NULL,
link TEXT,
why TEXT,
demo_topic TEXT,
anything_else TEXT,
created_at INTEGER NOT NULL,
updated_at INTEGER NOT NULL
);
Registrations are upserted by email — submitting the form again with the same email updates the existing record.
- Auth: Better Auth with magic link plugin. Sessions are cookie-based, 7-day expiry, auto-refresh. Magic link tokens expire in 5 minutes.
- Styling: Tailwind via Twind (runtime, no build step).
- Routing: Client-side path router in
App.tsxusingpushState+popstate. Server has a catch-all that servesindex.htmlfor all non-API routes. - Privacy: Val is set to private (not discoverable on Val Town). The registration form is accessible to anyone with the link.