How to Build a SaaS Waitlist with Email Capture in Next.js 16 (From Scratch)
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....

Source: DEV Community
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.env.RESEND_AP