Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
Simple Next.js template that uses a Postgres database and Drizzle as the ORM.
The Postgres + Drizzle Next.js Starter is a minimal Next.js boilerplate from the Vercel examples repository that connects a Postgres database to a Next.js app through the Drizzle ORM.
The Postgres + Drizzle Next.js Starter is a starter template, not a full product. It gives you a Next.js application pre-configured with a Postgres database and Drizzle ORM, so you can begin building data-driven features immediately. The template is published in Vercel's official examples repository on GitHub and is designed for deployment on Vercel, though it runs locally with pnpm dev. A live demo is hosted at https://postgres-drizzle.vercel.app/.
pnpm create next-app --example https://github.com/vercel/examples/tree/main/storage/postgres-drizzle, then run pnpm dev.The Postgres + Drizzle Next.js Starter is for Next.js developers who want a working Postgres connection without writing boilerplate. It is also useful for developers evaluating Drizzle ORM who want to see a minimal, real-world schema and query setup. Finally, it suits anyone deploying a data-backed app to Vercel who prefers clicking a deploy button over configuring infrastructure.
The template offers two entry paths. First, you can click the "Deploy with Vercel" button from the README, which clones the repository and starts a Vercel deployment with a Vercel Postgres integration. Alternatively, you can run pnpm create next-app --example with the example's GitHub path, install dependencies, and start the development server with pnpm dev. Either path yields the same Next.js application.
Drizzle ORM is the object-relational mapper for this template. Drizzle is a TypeScript ORM that lets you define Postgres tables as schema objects and run type-safe queries without code generation.
The starter expects a Postgres database. In the one-click Vercel deploy flow, it uses Vercel Postgres. When running locally, you provide your own Postgres connection string through environment variables.
The starter code is part of Vercel's public examples repository and is free to use. Hosting the app on Vercel follows Vercel's pricing; the template itself carries no license fee.
Click the deploy button in the README or manually create a new project from the Git repository, then add the Postgres integration. The environment variables for the database connection are handled by the Vercel integration.
