← Blog

How to Evaluate a Next.js SaaS Boilerplate Before You Buy: A 30-Minute Code Review Checklist (2026)

By Jake Mcdonald, founder of ShipEmber · December 1, 2026 · About a 10-minute read · Checked against the Stripe, Next.js, and Auth.js docs

I'm Jake Mcdonald. Every Next.js SaaS boilerplate landing page looks about the same: auth, billing, dashboard, dark mode, a stack of logos. The landing page can't tell you whether the billing actually holds up. The code can, and you don't need a weekend to read it. You need about 30 minutes and a list of the six or seven files that matter.

This is the checklist I use when I look at someone else's starter, including the free ones on GitHub and the paid ones with a public demo or a refund window. It's not about style or folder names. It's about the spots where a starter can quietly give away your paid plan, charge someone without unlocking anything, or leak a secret. I checked the Stripe details against the webhooks docs, the Next.js details against the proxy file convention docs, and the middleware CVE against the GitHub advisory, all on December 1, 2026.

TL;DR: the 30-minute map

Minutes File to open What good looks like Red flag
0–3 package.json Current Next.js, Auth.js, Stripe, Prisma versions; a test script Next.js below a patched release for CVE-2025-29927
3–8 Auth config (auth.ts or similar) AUTH_SECRET from env, a database adapter, providers you actually want Secrets hardcoded, or "auth" that's only a client-side check
8–13 Checkout route Signed-in user required, price chosen on the server, user ID attached to the session Client sends any price ID or amount it likes
13–20 Webhook handler Raw body, signature verified, events deduplicated, subscription state refetched req.json() before verification, or no verification at all
20–24 Plan helper One server function that reads the plan from your database Plan read from a cookie, local storage, or a query string
24–27 Gated dashboard page + API routes Server-side check on the page, Server Actions, and API routes Pro features hidden in the UI but the API answers anyone
27–29 .env.example Every variable listed with placeholder values Real keys committed, or NEXT_PUBLIC_ on a secret
29–30 License Clear terms for client projects and resale, a refund policy No license file, or "personal use only" when you build for clients

If a starter passes all eight rows, the rest is taste. If it fails the webhook or the gating rows, walk away or budget a day to fix it.

Before you start: how to get eyes on the code

Free starters are easy: clone the repo. Paid kits vary. Some have a public repo or a public demo, some show code in their docs, and some show nothing until you pay. If you can't see the code first, check two things before you buy: is there a refund window you can use to run this checklist, and will the seller answer "show me your webhook handler" in an email? Both answers tell you a lot.

Clone it, run npm install, and keep your editor's file search open. Most of this checklist is "find the file, read 50 lines."

Minutes 0–3: package.json and versions

Open package.json first. You're looking for three things.

  • Next.js version. CVE-2025-29927 let requests skip middleware entirely with an internal x-middleware-subrequest header. Per the GitHub advisory, the patched releases are 12.3.5, 13.5.9, 14.2.25, and 15.2.3. A kit still pinned below those in its line and doing auth only in middleware is a real problem, not a cosmetic one.
  • Middleware vs proxy. In current Next.js, the middleware file convention is deprecated and renamed to proxy. An older middleware.ts isn't wrong on its own, but it tells you how recently the kit was updated.
  • A test script. "test" in scripts and a CI config in the repo mean someone runs the code on every change. No tests isn't a dealbreaker for a small kit, but it's a signal.

Minutes 3–8: the auth config

Find the file that sets up auth. With Auth.js v5 it's usually auth.ts at the root, exporting handlers, auth, signIn, and signOut.

Check:

  • Where the secret comes from. The Auth.js install guide says AUTH_SECRET is the one mandatory environment variable. It should come from env, never a string in the file.
  • Is there a database adapter? If you want magic links or want users stored in your own database, you need one. A kit that only has JWT sessions and no user table will make linking a user to a Stripe customer awkward later.
  • Providers. Are the providers the ones you want (Google, GitHub, email)? Swapping providers is easy; adding a user table later is not. I wrote more about picking them in Google, GitHub, or Magic Links?

Red flag: "protected" pages that check useSession() in a client component and nothing else. That hides a page. It doesn't protect anything.

Minutes 8–13: the checkout route

Search for checkout.sessions.create. This is where money starts, so read it slowly.

  • Does it require a signed-in user? The route should call auth() (or equivalent) and return a 401 if there's no session.
  • Who picks the price? Good: the client sends a plan key like "pro", and the server maps it to a Stripe price ID from env or config. Bad: the client sends a raw price ID or amount, so anyone with dev tools can pick whichever of your prices they like.
  • Does it tie the session to the user? Look for client_reference_id, metadata, or an existing customer ID for that user. Without one of those, the webhook has no reliable way to know whose account to upgrade.
  • Does it reuse Stripe customers? If every checkout creates a new customer, you'll end up with duplicates per user. I went deeper on this in Prisma Schema for SaaS Billing.

Minutes 13–20: the webhook handler

This is the most important file in any SaaS starter, so it gets the most time. Search for constructEvent or webhooks. In App Router it's usually something like app/api/webhooks/stripe/route.ts.

What good looks like:

export async function POST(req: Request) {
  const body = await req.text(); // raw body, not req.json()
  const sig = req.headers.get("stripe-signature");
  if (!sig) return new Response("Missing signature", { status: 400 });

  let event;
  try {
    event = stripe.webhooks.constructEvent(body, sig, process.env.STRIPE_WEBHOOK_SECRET!);
  } catch {
    return new Response("Invalid signature", { status: 400 });
  }

  // dedupe on event.id, then refetch the subscription and upsert it
  // ...
  return new Response("ok", { status: 200 });
}

Check each of these:

  1. Raw body. Stripe's docs are blunt: signature verification needs the raw request body, and any manipulation makes it fail. If the handler parses JSON first, verification is either broken or skipped.
  2. Signature actually verified. If there's no constructEvent (or manual signature check), anyone can POST a fake "payment succeeded" event and get Pro. This is the single biggest red flag on the list.
  3. Duplicates handled. Stripe's docs say endpoints "might occasionally receive the same event more than once" and suggest logging processed event IDs. Look for a table or check keyed on event.id, or at least a handler that's safe to run twice (an upsert, not an insert plus an email).
  4. Order doesn't matter. Stripe also says not to depend on events arriving in order. Good handlers refetch the subscription from Stripe and write its current state instead of trusting whatever event arrived last. My longer write-up is Stripe Webhooks in Next.js: Idempotency, Out-of-Order Events, and Retries.
  5. More than one event. If it only handles checkout.session.completed, nobody ever loses Pro when they cancel or their card fails. Look for customer.subscription.updated and customer.subscription.deleted too.
  6. Quick 2xx. Stripe wants a quick success response before slow work. A handler that sends emails and calls three APIs before responding will time out and get retried.

Minutes 20–24: the plan helper

Search for plan, isPro, or subscription. You want one server-side function that answers "is this user on Pro?" by reading your database, which the webhook keeps in sync.

Red flags:

  • The plan comes from a cookie, local storage, or a URL parameter.
  • The plan is set on the Checkout success page. The success URL is a redirect, not a receipt, and I explained why in Why Your Stripe Checkout Success URL Is Not a Receipt.
  • The check only looks at whether a subscription row exists, and ignores its status. A canceled or unpaid subscription still has a row.

Minutes 24–27: the gated dashboard page and the APIs behind it

Open the dashboard page and one Pro-only API route or Server Action.

  • The page should check the plan on the server and redirect or show an upgrade prompt.
  • The API route or Server Action that does the Pro work should check again. Hiding a button doesn't stop someone from calling the endpoint.
  • If the only check is in middleware.ts or proxy.ts, that's the pattern CVE-2025-29927 broke. A proxy check is fine as a first filter. It shouldn't be the only one.

Quick test if the kit runs locally: sign in as a free user, copy a Pro API request from the network tab of a Pro account, and replay it with curl using the free user's cookie. It should fail. I covered the full pattern in Free vs Pro Feature Gating in Next.js App Router.

Minutes 27–29: .env.example

This file tells you how honest the setup docs are.

  • Everything listed. Database URL, AUTH_SECRET, provider IDs and secrets, Stripe secret key, webhook secret, price IDs. If you have to discover variables by crashing the app, setup will be painful.
  • Placeholders only. Real keys in a public repo mean those keys are burned, and it says something about how the rest was built. Also run git log on the file if you can.
  • No secrets with NEXT_PUBLIC_. Next.js inlines NEXT_PUBLIC_ variables into the browser bundle. NEXT_PUBLIC_STRIPE_SECRET_KEY is a leak, not a config choice. Only the publishable key belongs there.

While you're here, check that the webhook secret is separate per environment. The local Stripe CLI secret, a test-mode endpoint, and a live endpoint each have their own. More in Stripe Webhook Secrets Across Local, Preview, and Production.

Minute 29–30: the license

Read the license or terms page before you write a line of your own code on top of it.

  • Can you use it for client projects, or only your own?
  • Can you use it in more than one project?
  • What can't you do? Reselling the kit itself as a template is a common, reasonable restriction.
  • Updates and refunds: for how long, and on what terms?

A free repo with no license file isn't actually free to use in the legal sense. Ask the author or pick another one.

Red flags that should end the review early

  • Webhook signatures not verified, or body parsed before verification
  • Pro granted on the success URL
  • Plan gating only in the UI or only in middleware/proxy
  • Client chooses the price ID or amount at checkout
  • Secrets committed, or secret keys behind NEXT_PUBLIC_
  • No license, or a license that doesn't cover how you'll use it

Any one of these can be fixed. But if a kit ships with two or three of them, the "saves you weeks" pitch probably isn't true, and you'll spend that time finding what else is wrong.

If you can't see the code: questions to ask the seller

  1. Can you show me your Stripe webhook handler?
  2. Where does the plan check happen for API routes and Server Actions?
  3. How do you handle duplicate and out-of-order webhook events?
  4. What happens to a user's access when their subscription is canceled or a renewal fails?
  5. Can I use it for client work? What's the refund window?

A seller who knows their code can answer all five in one short email.

Why choose ShipEmber

I wrote this checklist the way I'd want someone to review ShipEmber, and I built ShipEmber to pass it. It's a Next.js App Router SaaS starter with auth, Stripe subscriptions from Free to Pro, and a gated dashboard already wired together. It uses Auth.js v5 with Google, GitHub, and magic links, Prisma with Postgres, Stripe Checkout, the customer portal, and signed, idempotent webhooks that keep the plan in sync from Stripe's data, with server-side plan checks on the dashboard. There's an .env.example, a seed script, and tests that run in CI.

One honest catch: you can't browse the ShipEmber code before you buy. That's why there's a walkthrough video, and why you can ask for a refund within 14 days if it doesn't work as described. Run this checklist against it in that window. If you find a red flag, I want to hear about it.

Where it's not the right fit: if you need teams, organizations, SSO/SAML, per-seat or usage-based billing, or a merchant of record that handles sales tax for you, a bigger kit will serve you better. I compared some options in Best Next.js SaaS boilerplates in 2026. And if you'd rather wire it yourself, the free starters in Free vs Paid Next.js SaaS Boilerplates are a good place to practice this checklist.

ShipEmber is a one-time payment of $49, the price on the site right now. You can use it in unlimited personal and client projects. You just can't resell the kit itself as a starter or template.

Prefer watching over reading? There's a short walkthrough:

Watch the ShipEmber walkthrough on YouTube

See pricing

Get ShipEmber, $49

Related: Why Your Stripe Checkout Success URL Is Not a Receipt · Stripe Webhooks in Next.js: Idempotency, Out-of-Order Events, and Retries · Free vs Pro Feature Gating in Next.js App Router

Doc note: raw-body signature verification, duplicate deliveries ("might occasionally receive the same event more than once"), event ordering, and quick 2xx responses checked on docs.stripe.com/webhooks; CVE-2025-29927 patched versions (12.3.5, 13.5.9, 14.2.25, 15.2.3) on GitHub advisory GHSA-f82v-jwr5-mffw; middleware deprecated and renamed to proxy on nextjs.org; AUTH_SECRET as the one mandatory variable on authjs.dev. All on December 1, 2026.

— Jake Mcdonald, Springfield, IL