Skip to content

feat(docs): add Next.js + Prisma Postgres on Vercel guide#7876

Closed
aidankmcalister wants to merge 1 commit into
mainfrom
feat/docs-nextjs-vercel-quickstart
Closed

feat(docs): add Next.js + Prisma Postgres on Vercel guide#7876
aidankmcalister wants to merge 1 commit into
mainfrom
feat/docs-nextjs-vercel-quickstart

Conversation

@aidankmcalister
Copy link
Copy Markdown
Contributor

@aidankmcalister aidankmcalister commented May 7, 2026

Summary

  • Adds a new guide at /guides/postgres/nextjs-vercel covering the full path from create-next-app to a deployed Vercel app backed by Prisma Postgres
  • Explains why Prisma Postgres is a natural fit for Next.js on Vercel — built-in connection pooling removes the need to configure pgBouncer separately for serverless functions
  • Covers environment setup, prisma init, Prisma schema, migrations, and postinstall hook for Vercel builds
  • Updates apps/docs/content/docs/guides/postgres/meta.json to surface the guide in sidebar navigation

Test plan

  • Guide renders at /docs/v7/guides/postgres/nextjs-vercel
  • All internal links resolve
  • nextjs-vercel appears in the Postgres guides sidebar

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Added a comprehensive guide for deploying Next.js applications with Prisma Postgres on Vercel. The guide covers project scaffolding, dependency installation, Prisma schema setup, Prisma Client configuration, integration in Server Components and API routes, and deployment instructions including postinstall scripts and environment variable configuration.

Adds /guides/postgres/nextjs-vercel — a zero-config focused quickstart
explaining why Prisma Postgres works well with Vercel serverless functions:
built-in pooling, single DATABASE_URL, no pgBouncer setup required. DR-8359

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 7, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
blog Ready Ready Preview, Comment May 7, 2026 1:53pm
docs Ready Ready Preview, Comment May 7, 2026 1:53pm
eclipse Ready Ready Preview, Comment May 7, 2026 1:53pm
site Ready Ready Preview, Comment May 7, 2026 1:53pm

Request Review

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 7, 2026

🍈 Lychee Link Check Report

8 links: ✅ 1 OK | 🚫 0 errors | 🔀 2 redirects | 👻 5 excluded

✅ All links are working!


Full Statistics Table
Status Count
✅ Successful 1
🔀 Redirected 2
👻 Excluded 5
🚫 Errors 0
⛔ Unsupported 0
⏳ Timeouts 0
❓ Unknown 0

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 7, 2026

Review Change Stack

Walkthrough

This PR adds a new documentation guide for integrating Prisma Postgres with Next.js applications deployed on Vercel. The guide provides end-to-end instructions covering project scaffolding, Prisma setup, schema definition, database configuration, runtime client implementation, and deployment steps, with an entry added to the Postgres guides metadata index.

Changes

Next.js on Vercel Integration Guide

Layer / File(s) Summary
Guide Registration
apps/docs/content/docs/guides/postgres/meta.json
Registers "nextjs-vercel" in the pages metadata index for Postgres guides.
Guide Frontmatter and Overview
apps/docs/content/docs/guides/postgres/nextjs-vercel.mdx
Establishes page metadata and introduces the guide, highlighting Prisma Postgres's built-in connection pooling and Vercel Marketplace integration option.
Project Setup and Dependencies
apps/docs/content/docs/guides/postgres/nextjs-vercel.mdx
Documents creating a new Next.js app with create-next-app and installing Prisma CLI, Prisma Client, and the @prisma/adapter-pg adapter for Postgres.
Schema and Configuration
apps/docs/content/docs/guides/postgres/nextjs-vercel.mdx
Defines a sample User model in the schema, configures prisma.config.ts to load environment variables, and runs prisma migrate dev and prisma generate.
Runtime Client Setup and Usage
apps/docs/content/docs/guides/postgres/nextjs-vercel.mdx
Creates a shared Prisma client singleton in lib/prisma.ts using PrismaPg adapter and demonstrates querying in both a Server Component and an API Route Handler.
Deployment and Next Steps
apps/docs/content/docs/guides/postgres/nextjs-vercel.mdx
Configures a postinstall script for Prisma Client generation, instructs setting DATABASE_URL in Vercel environment variables, and links to related guides.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title clearly and concisely describes the main change: adding a Next.js + Prisma Postgres on Vercel documentation guide, which aligns with the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

@argos-ci
Copy link
Copy Markdown

argos-ci Bot commented May 7, 2026

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ✅ No changes detected - May 7, 2026, 2:02 PM

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/docs/content/docs/guides/postgres/nextjs-vercel.mdx`:
- Around line 54-56: Update the dev dependency installation step by removing the
unused "tsx" package from the command that currently reads "npm install prisma
tsx --save-dev"; change it to only install the required dev dependency (prisma)
and ensure any later references to ".tsx" remain as file extensions only, not as
a package requirement in the guide.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 906ee01b-8f64-4210-80d4-8af403f9bf55

📥 Commits

Reviewing files that changed from the base of the PR and between 94e5163 and 1630231.

📒 Files selected for processing (2)
  • apps/docs/content/docs/guides/postgres/meta.json
  • apps/docs/content/docs/guides/postgres/nextjs-vercel.mdx

Comment on lines +54 to +56
```npm
npm install prisma tsx --save-dev
```
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check if tsx is used in package.json scripts or referenced in the guide
rg -n 'tsx' apps/docs/content/docs/guides/postgres/nextjs-vercel.mdx

Repository: prisma/web

Length of output: 169


Remove unnecessary tsx dependency.

The tsx package is installed on line 55 but never used in any subsequent steps. The guide runs Prisma CLI commands (npx prisma init, npx create-db) and Next.js framework code, neither of which requires tsx. The references to "tsx" elsewhere in the guide are only file extensions (.tsx), not invocations of the package. Removing it simplifies the installation command:

-npm install prisma tsx --save-dev
+npm install prisma --save-dev
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/docs/content/docs/guides/postgres/nextjs-vercel.mdx` around lines 54 -
56, Update the dev dependency installation step by removing the unused "tsx"
package from the command that currently reads "npm install prisma tsx
--save-dev"; change it to only install the required dev dependency (prisma) and
ensure any later references to ".tsx" remain as file extensions only, not as a
package requirement in the guide.

@aidankmcalister aidankmcalister deleted the feat/docs-nextjs-vercel-quickstart branch May 7, 2026 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant