# Next.js + Postgres + Prisma + Vercel
URL: https://wwadd.dev/stacks/nextjs-postgres-prisma-vercel
Last verified: 2026-09-28

The default choice when you need SEO, server rendering, and typed database access in one codebase.

## When to use it
- Public content must be indexable and fast on first paint
- You want API routes and UI in the same repo and the same deploy
- The schema is non-trivial and you want migrations under version control

## How the pieces fit
Next.js renders on the server, so data fetching happens next to the database instead of over the public internet. Prisma turns the schema into TypeScript types, so a column rename becomes a compile error rather than a runtime 500. Vercel runs the framework it maintains, so routing, caching, and image optimization work without hand-tuning. The result is one mental model: write a server component, query Postgres, return HTML.

## The tech and its role
- [Next.js (App Router)](https://wwadd.dev/tools/nextjs): Framework, SSR/SSG, routing
- [React Server Components](https://wwadd.dev/tools/react): Server-side data fetching
- [Postgres](https://wwadd.dev/tools/postgresql): Primary datastore
- [Prisma](https://wwadd.dev/tools/prisma): Typed ORM and migrations
- [Better Auth](https://wwadd.dev/tools/better-auth): Sessions and OAuth providers
- [Vercel](https://wwadd.dev/tools/vercel): Hosting, edge caching, previews

## Real-world examples
- Cal.com: Open-source scheduling platform whose public repo shows the full shape: Next.js app, Prisma schema and migrations, Postgres database. (source: https://github.com/calcom/cal.com)
- Notion's marketing site: Built with Next.js on Vercel and runs hundreds of experiments a year at the edge — the indexable site is kept separate from the Notion app itself. (source: https://vercel.com/blog/how-notion-powers-rapid-and-performant-experimentation)

## Skip if
Skip if your app is a purely internal dashboard behind a login — the server rendering cost buys you SEO you will never use.

## Testing and shipping
- [Test the behavior users depend on](https://wwadd.dev/moves/testing-shipping/test-user-behavior)
- [Check keyboard access and automated accessibility](https://wwadd.dev/moves/testing-shipping/keyboard-accessibility-check)
- [Investigate flaky browser tests](https://wwadd.dev/moves/testing-shipping/diagnose-flaky-tests)
- [Verify the production build before release](https://wwadd.dev/moves/testing-shipping/verify-built-release)
- [Keep secrets out of browser bundles](https://wwadd.dev/moves/testing-shipping/keep-secrets-server-side)
- [Make CI validate the same release inputs](https://wwadd.dev/moves/testing-shipping/ci-release-gates)
- [Capture errors with useful context](https://wwadd.dev/moves/testing-shipping/error-reporting-context)
- [Change database schemas in compatible stages](https://wwadd.dev/moves/testing-shipping/compatible-schema-migrations)
- [Prove a backup can restore](https://wwadd.dev/moves/testing-shipping/verify-backup-restore)
- [Prepare rollback before publishing](https://wwadd.dev/moves/testing-shipping/plan-release-rollback)

