Sortie Labs

Ship it · Next.js SaaS starter

A SaaS foundation your agent can build on without breaking it.

AgentShip is a Next.js 16 starter with the parts every SaaS needs — magic-link auth, Stripe billing, a locked-down dashboard — plus the rails that let a coding agent extend it safely: written-down conventions, RLS in the schema, and a verify gate it has to pass.

Auth that actually works cross-device

Supabase magic-link sign-in with a callback that survives being opened on a different device — the failure mode most starters ship broken. Protected dashboard behind middleware, RLS locked at the row.

Real Stripe billing, wired end to end

Checkout route, a signature-verified webhook, and the subscription state it writes back — the piece tutorials skip. Runs entirely in Stripe test mode until you have revenue.

Rules your agent follows

AGENTS.md + CLAUDE.md written for a coding agent, three worked playbooks (add a paid plan, a protected page, a webhook event), so the agent extends the code the way you would.

A verify gate + CI

scripts/verify.sh runs typecheck, lint and build after every change; a GitHub Action runs it on every push. Broken work can't reach main.

Straight from the source

The verify gate every change has to pass — this is what "done" means.

# scripts/verify.sh
set -euo pipefail
echo "▸ typecheck"; npx tsc --noEmit
echo "▸ lint";      npx eslint .
echo "▸ build";     npm run build
echo "✓ verify passed"

What's in the zip

A real slice of the shipped tree — small enough that you and your agent can read every file.

  • app/auth/callback/route.tscross-device magic-link callback (the hard part, done right)
  • app/api/stripe/checkout/route.tscreate a Checkout session
  • app/api/stripe/webhook/route.tssignature-verified webhook → subscription state
  • app/dashboard/page.tsxprotected, auth-gated dashboard
  • lib/supabase/{server,client,admin}.tsthe three Supabase clients, used correctly
  • supabase/migrations/0001_profiles.sqlRLS policies in the schema, not an afterthought
  • playbooks/add-a-paid-plan.mdstep-by-step extension guides for your agent
  • scripts/verify.shthe gate: typecheck + lint + build
  • .github/workflows/verify.ymlruns the gate on every push

What this is — and isn't

AgentShip is a focused foundation, not a 200-file kitchen sink. It gives you the parts that are genuinely hard to get right — auth that works across devices, billing wired end to end, and the agent rails that keep both safe — and stops there. Every claim on this page is literally true of the code in the zip. You own it outright: unlimited projects, yours or your clients'.

In the box

  • Next.js 16 (App Router) + TypeScript + Tailwind v4
  • Supabase magic-link auth + protected dashboard, RLS locked
  • Stripe subscriptions with a signature-verified webhook
  • AGENTS.md + CLAUDE.md + three extension playbooks
  • verify.sh gate + GitHub Actions CI
  • 46 files, no dead weight — you can read the whole thing

Questions

How is this different from a free Next.js + Supabase template?
Templates give you the happy path. AgentShip ships the parts they skip: a magic-link callback that survives cross-device opens, a signature-verified Stripe webhook, RLS policies in the migration, and the AGENTS.md rules + verify gate that let an agent extend all of it without quietly breaking auth or billing.
Do I need to pay for anything to run it?
No. It's built to run on free tiers — Vercel, Supabase, and Stripe test mode — until you actually have paying customers.
Can I use it for client work?
Yes. The licence covers unlimited personal and client projects. You just can't resell AgentShip itself as a competing starter kit.
Is there a free way to try it first?
Yes — AgentShip Lite is free and MIT-licensed on GitHub: the Next.js 16 + Supabase auth core and the full agent-readiness layer, so you can feel the workflow before you buy the billing half.

Own it outright. Extend it with your agent.