Back to articles
How to Build a SaaS Waitlist with Email Capture in Next.js 16 (From Scratch)

How to Build a SaaS Waitlist with Email Capture in Next.js 16 (From Scratch)

via Dev.to Webdevhuangyongshan46-a11y

Building a waitlist is one of the first things every SaaS founder needs — before the product is done, before the landing page is polished, before anything. You need a way to capture early interest. In this tutorial we'll build a complete waitlist with: A server action that captures email addresses Prisma + PostgreSQL to persist signups Resend to send a confirmation email A minimal admin view to see who signed up All with Next.js 16 and zero third-party waitlist services. 1. The Prisma Schema Add a WaitlistEntry model to your schema.prisma : model WaitlistEntry { id String @id @default(cuid()) email String @unique name String? source String? // utm_source or referrer createdAt DateTime @default(now()) confirmed Boolean @default(false) } Run npx prisma migrate dev --name add_waitlist . 2. The Server Action Create app/actions/waitlist.ts : ' use server ' import { prisma } from ' @/lib/prisma ' import { Resend } from ' resend ' import { z } from ' zod ' const resend = new Resend ( process

Continue reading on Dev.to Webdev

Opens in a new tab

Read Full Article
2 views

Related Articles