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>
32 lines
1.4 KiB
Text
32 lines
1.4 KiB
Text
<% content_for :title, "Pricing — Crimata" %>
|
|
|
|
<style>
|
|
.pricing { text-align: center; padding: 4rem 0; }
|
|
.pricing h1 { font-size: 2.5rem; font-weight: 800; letter-spacing: -1px; margin-bottom: 1rem; }
|
|
.pricing p { color: #555; font-size: 1.1rem; margin-bottom: 3rem; }
|
|
.card { display: inline-block; border: 1px solid #eee; border-radius: 16px; padding: 2.5rem 3rem; text-align: left; min-width: 320px; }
|
|
.price { font-size: 3rem; font-weight: 800; letter-spacing: -1px; margin-bottom: 0.25rem; }
|
|
.price span { font-size: 1rem; font-weight: 400; color: #555; }
|
|
.features { list-style: none; margin: 1.5rem 0 2rem; }
|
|
.features li { padding: 0.4rem 0; color: #444; }
|
|
.features li::before { content: "✓ "; font-weight: 700; }
|
|
.sub { margin-top: 1rem; font-size: 0.875rem; color: #999; text-align: center; }
|
|
</style>
|
|
|
|
<div class="pricing">
|
|
<h1>Simple pricing.</h1>
|
|
<p>One plan. Everything included.</p>
|
|
|
|
<div class="card">
|
|
<div class="price">$10 <span>/ month</span></div>
|
|
<ul class="features">
|
|
<li>Your own hub at slug.crimata.com</li>
|
|
<li>Custom domain support</li>
|
|
<li>Blog with images</li>
|
|
<li>Fully managed hosting</li>
|
|
<li>Cancel anytime</li>
|
|
</ul>
|
|
<%= link_to "Get Started", checkout_start_path, class: "btn", style: "width:100%; text-align:center; display:block;" %>
|
|
<p class="sub">No setup fees.</p>
|
|
</div>
|
|
</div>
|