Next.js + Prisma + Postgres
The stack
- Framework
- Next.js App Router
- Data
- Managed Postgres (Neon, Supabase or RDS) via Prisma
- Auth
- Auth.js or Clerk
- Hosting
- Vercel, or a container on Fly / Railway
- Also
-
- Tailwind CSS + shadcn/ui
- Stripe Billing with webhook handlers as jobs
- Inngest or a Postgres-backed queue for side effects
- Playwright smoke tests in CI
Why agents do well here
5/5- Prisma's schema file is the most widely documented ORM format in existence; agents generate correct migrations and queries from it with very few misses.
- Feature folders keep a billing change inside
features/billing/, so the agent's diff stays local and reviewable. - Next.js conventions are strong enough that generated code matches the surrounding code, which is what keeps a growing codebase consistent.
Avoid at this tier
- Splitting into services because the app "feels big"; split modules, not deployables.
- Custom auth; the failure modes are exactly the ones an agent does not see.
- Handling webhooks synchronously; every side effect becomes a job.
How it fits together
Still one Next.js app, now with the guardrails a team needs. Prisma owns the schema and migrations, every feature folder owns its actions, components and tests, and a queue owns everything that is not a request.
Folder layout
src/
app/ (marketing)/, (app)/, api/webhooks/
features/ auth/, billing/, workspaces/, <feature>/ {actions, components, tests}
server/ db.ts, queue.ts, email.ts
prisma/ schema.prisma, migrations/
AGENTS.md conventions, commands, and the decisions above 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.
- 01 Feature folders over type folders
- 02 Prisma migrations committed and reviewed
- 03 A queue for every side effect
- 04 Playwright on the three flows that make money
- 05 An
AGENTS.mdthat says all of this
Also fits this cell
Same tier, same profile, a different stack. Pick one of these only for the reason given.
- Nuxt 4 + Vue + PostgreSQL (opens in a new tab)
Your team writes Vue. Nuxt gives the same server-plus-UI shape with Vue conventions the agent knows just as well.
- Elixir + Phoenix LiveView + PostgreSQL (opens in a new tab)
Real-time collaboration is the product, not a feature: presence, live cursors, many concurrent socket connections.
- Next.js + Vercel AI SDK + Jev (System One + LLM) (opens in a new tab)
AI decisions sit in the request path (routing, classification, gating) and need confidence thresholds rather than free-form LLM output.
When to move on
Stay here until the product forces the next tier. You are ready for Scale when:
- More than one team owns part of the product
- You serve users from more than one region or under data-residency rules
- An auditor will ask how a change got to production
- A single deploy touching everything is no longer acceptable