Andrew Gundersen [Fri, 27 Feb 2026 22:12:23 +0000 (17:12 -0500)]
Add passwordless email auth with pre-checkout signup
Flow: enter email → magic link → verified → Stripe checkout → dashboard
- SessionsController: new/create (send magic link), sent, verify, destroy
- Customer model: generate_magic_token!, magic_token_valid?, verify_email!
- Migration: magic_token, magic_token_expires_at, email_verified_at + unique indexes
- CustomerMailer + mailer layout with magic link email (html + text)
- CheckoutController: GET /checkout/start requires auth, passes customer_id
as Stripe metadata; webhook finds customer by metadata and updates record
- DashboardController: requires auth, uses current_customer from session
- ApplicationController: current_customer, require_auth, redirect_after_auth
(stores return_to so verify sends user back to where they were headed)
- Resend gem + initializer; production uses :resend delivery method
- Dev logs magic link URL to Rails logger instead of sending email
- Pricing page: simple link to /checkout/start (no more JS fetch)
- Layout: Sign in / Dashboard / Sign out nav links
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Andrew Gundersen [Fri, 27 Feb 2026 04:51:50 +0000 (23:51 -0500)]
Add ActiveRecord, customer dashboard, separate DB architecture
- Re-enable ActiveRecord pointing at Neon Postgres
- Add Customer model with stripe_customer_id, email, slug, status
- Add dashboard controller and Apple ID-style device view
- Redirect checkout success to /dashboard
- Webhook now calls /instances, parses response, creates Customer in Rails DB
- Add MIT License
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>