How to add a word-of-mouth referral program to your Next.js SaaS -- generating unique referral codes per user, attributing signups to the right referrer, and tracking conversions with Drizzle ORM so you only reward what converts.
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 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.
How to add email verification to a Next.js SaaS -- a signed JWT link sent via Resend on signup, a verify endpoint that marks the user confirmed in Drizzle ORM, and a service-layer guard that blocks unverified users from protected actions.
How to implement GDPR right to erasure and data portability in a Next.js SaaS -- a self-service account deletion endpoint, cascading Drizzle ORM deletes, a data export download, and a confirmation gate so users cannot accidentally delete their account.