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>
33 lines
819 B
Ruby
33 lines
819 B
Ruby
source "https://rubygems.org"
|
|
|
|
ruby "3.2.0"
|
|
|
|
# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
|
|
gem "rails", "~> 7.1.0"
|
|
|
|
# Use the Puma web server [https://github.com/puma/puma]
|
|
gem "puma", ">= 5.0"
|
|
|
|
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
|
|
gem "tzinfo-data", platforms: %i[ windows jruby ]
|
|
|
|
group :development, :test do
|
|
# See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem
|
|
gem "debug", platforms: %i[ mri windows ]
|
|
end
|
|
|
|
group :development do
|
|
# Speed up commands on slow machines / big apps [https://github.com/rails/spring]
|
|
# gem "spring"
|
|
|
|
end
|
|
|
|
|
|
gem "stripe", "~> 18.3"
|
|
gem "resend", "~> 0.12"
|
|
|
|
gem "dotenv-rails", "~> 3.2"
|
|
|
|
gem "dockerfile-rails", ">= 1.7", :group => :development
|
|
|
|
gem "pg", "~> 1.6"
|