How to add a free trial to your Stripe subscription flow in a Next.js SaaS -- setting the trial window at checkout, tracking trial status in Drizzle ORM, sending a reminder email before expiry, and downgrading users who do not convert.
How to add admin impersonation to a Next.js SaaS -- issuing a scoped JWT that lets support staff view the app as any user, exiting safely, and audit-logging every session with Drizzle ORM.
How to add passwordless magic link login to a Next.js SaaS -- generating a signed token, sending the login link via Resend, verifying it in a callback route, and expiring used tokens in Drizzle ORM.
How to build a pre-launch waitlist in a Next.js SaaS -- a Drizzle ORM schema that tracks signups and referral chains, a position counter, and a confirmation email via Resend so every signup has a share link from day one.
How to accept one-time payments in a Next.js SaaS using Stripe Checkout -- creating a session, handling the webhook, recording the purchase in Drizzle ORM, and gating features behind a paid check.
How to add GitHub and Google OAuth to a Next.js App Router SaaS without NextAuth -- handling the callback, exchanging the code for a user profile, upserting the user in Drizzle ORM, and issuing a JWT so the rest of your auth layer stays unchanged.