Skip to content
STACK IT FIRST
Install the skills
01 · Web · MVP · SaaS

Next.js + Drizzle + Supabase

The most-scaffolded SaaS starting point on the internet, which is exactly why an agent builds it well.
Agent fit5/5 MVP · Ship it Reviewed

The stack

Framework
Next.js App Router
Data
Postgres on Supabase via Drizzle ORM
Auth
Supabase Auth
Hosting
Vercel (or Cloudflare via OpenNext)
Also
  • Tailwind CSS + a small component kit
  • Zod schemas shared between forms and server actions
  • Stripe Checkout when the first customer asks
AGENTS.md + real projects on STACK IT FAST (opens in a new tab)

Why agents do well here

5/5
  • App Router, server actions and Drizzle appear in more tutorials and templates than any other SaaS combination, so the agent's defaults match the framework's.
  • Drizzle's schema file is plain TypeScript; the agent can read the whole data model in one file and derive types without codegen.
  • Supabase Auth and row-level security push authorisation into the database, where the agent can express it as a policy rather than scatter it through handlers.

Avoid at this tier

  • A separate API service; server actions and route handlers are enough.
  • Multi-tenancy abstractions before the second customer exists.
  • Client state libraries for data that lives on the server.

How it fits together

Keep it one Next.js app. Server components read from the database through Drizzle, server actions write to it, and the client only holds form state. Row-level security carries authorisation so handlers stay thin.

Folder layout

src/
  app/            (marketing)/, (app)/dashboard/, api/webhooks/stripe/
  db/             schema.ts, migrations/, client.ts
  features/       billing/, auth/, projects/  (actions + components + tests together)
  lib/            env.ts, zod schemas, supabase clients

First five decisions

Lock these in before the agent writes the second feature. Each one removes a choice it would otherwise make differently every time.

  1. 01 App Router only
  2. 02 Drizzle schema as the source of truth
  3. 03 Supabase Auth with RLS on from day one
  4. 04 Feature folders instead of type folders
  5. 05 Zod for every boundary

Also fits this cell

Same tier, same profile, a different stack. Pick one of these only for the reason given.

When to move on

Stay here until the product forces the next tier. You are ready for Growth when:

  • Customers notice when something breaks
  • More than one person merges to main in a week
  • You have a billing provider and a support inbox
  • You need to know what changed and why, weeks later
Growth · SaaS Next.js + Prisma + Postgres The well-trodden SaaS monolith, organised by feature, with a schema the agent and the migration tool both read. Next tier

Same tier, other profiles