Skip to content

Conversation

@nurul3101
Copy link
Member

@nurul3101 nurul3101 commented Nov 11, 2025

Summary by CodeRabbit

  • Documentation

    • Standardized Prisma configuration across guides and added dotenv installation/use guidance.
    • Removed legacy Prisma settings and simplified datasource configuration in examples.
    • Updated client initialization examples to reflect adapter/accelerate-aware setups and generate workflow changes.
  • New Features

    • Added example walkthrough for product notes: UI form, saving, and listing notes in the Shopify guide.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 11, 2025

Walkthrough

Introduces a centralized Prisma configuration (prisma.config.ts) with dotenv integration and moves datasource/migration wiring out of many Prisma schema files; switches generator provider to prisma-client with ./generated/prisma output, and updates runtime Prisma client initialization to support adapters/accelerate across multiple guides.

Changes

Cohort / File(s) Summary
Prisma config + dotenv additions
content/800-guides/010-data-migration.mdx, content/800-guides/020-implementing-schema-changes.mdx, content/800-guides/030-migrate-from-typeorm.mdx, content/800-guides/040-migrate-from-sequelize.mdx, content/800-guides/050-migrate-from-mongoose.mdx, content/800-guides/060-migrate-from-drizzle.mdx, content/800-guides/070-cloudflare-d1.mdx, content/800-guides/080-turborepo.mdx, content/800-guides/100-nuxt.mdx, content/800-guides/130-docker.mdx, content/800-guides/140-use-prisma-in-pnpm-workspaces.mdx, content/800-guides/150-multiple-databases.mdx, content/800-guides/190-data-dog.mdx, content/800-guides/200-clerk-nextjs.mdx, content/800-guides/210-shopify.mdx, content/800-guides/300-supabase-accelerate.mdx, content/800-guides/310-neon-accelerate.mdx, content/800-guides/320-permit-io-access-control.mdx, content/800-guides/330-github-actions.mdx, content/800-guides/340-ai-sdk-nextjs.mdx, content/800-guides/350-authjs-nextjs.mdx, content/800-guides/360-embed-studio-nextjs.mdx, content/800-guides/370-bun.mdx, content/800-guides/390-hono.mdx, content/800-guides/400-deno-integration.mdx, content/800-guides/999-making-guides.mdx, content/800-guides/300-supabase-accelerate.mdx, content/800-guides/310-neon-accelerate.mdx
Added prisma.config.ts examples (defineConfig + import 'dotenv/config'), moved datasource/migrations wiring into config files, and added notes to install/load dotenv across many guides.
Generator & generated client changes
.../prisma/schema.prisma in many guides (e.g., 010, 040, 060, 090, 130, 140, 150, 190, 999 and others)
Changed generator provider from prisma-client-jsprisma-client and added output = "./generated/prisma"; adjusted example import paths to point at ./generated/prisma/client.
Datasource url removal from schema
.../prisma/schema.prisma fragments across many guides (e.g., 060, 070, 090, 130, 190, 400, etc.)
Removed url = env("DATABASE_URL") (or replaced with DB-specific env keys); datasource URL moved into prisma.config.ts or runtime adapter usage.
Prisma client runtime: adapters & accelerate
db/prisma.ts, src/lib/prisma.ts, packages/database/src/client.ts, lib/prisma.ts, prisma/seed.ts, prisma/seed.ts, apps/web/..., lib/* (various guide-specific paths; see guides above)
Updated runtime client examples to import generated client, add @prisma/adapter-pg usage (PrismaPg adapter) for Postgres paths, or pass accelerateUrl for Accelerate; replaced new PrismaClient() with new PrismaClient({ adapter }) or new PrismaClient({ accelerateUrl }) and added adapter instantiation where shown.
Engine removal and minor config normalization
content/800-guides/090-nextjs.mdx, 160-tanstack-start.mdx, 170-react-router-7.mdx, 180-solid-start.mdx, 190-sveltekit.mdx, 220-astro.mdx, 340-ai-sdk-nextjs.mdx, 350-authjs-nextjs.mdx, 360-embed-studio-nextjs.mdx, 390-hono.mdx, etc.
Removed engine: 'classic' from Prisma config examples and normalized migration/seed fields in prisma.config.ts snippets.
Monorepo & packaging changes
content/800-guides/080-turborepo.mdx, content/800-guides/140-use-prisma-in-pnpm-workspaces.mdx, content/800-guides/150-multiple-databases.mdx
Added database package surfaces (client exports, generated re-exports, package.json script/exports updates), created per-database prisma.config.ts, and added helper client modules/singleton patterns for multi-database setups.
Guide-specific feature additions
content/800-guides/210-shopify.mdx, content/800-guides/340-ai-sdk-nextjs.mdx, content/800-guides/999-making-guides.mdx
Added example model (ProductNote), server helpers (getNotes/createNote), saveChat persistence helper and API wiring, and new seed template examples using adapter-based client initialization.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Areas requiring extra attention:

  • Verify generated client import paths (./generated/prisma/client) and generated output consistency across examples.
  • Confirm adapter vs accelerate branches are correct per-guide (PrismaPg instantiation, use of accelerateUrl, and presence/absence of adapter).
  • Spot-check removal of url = env("DATABASE_URL") for cases needing DB-specific env names (multi-db guides).
  • Validate monorepo package.json scripts and exports (paths and workspace references) for correctness.
  • Review added public API examples (new models, getNotes/createNote, saveChat) for schema/usage consistency.

Possibly related PRs

Pre-merge checks

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and clearly describes the primary change across all modified files: transitioning documentation guides to use prisma.config.ts for Prisma configuration.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

@github-actions
Copy link
Contributor

Dangerous URL check

No absolute URLs to prisma.io/docs found.
No local URLs found.

@github-actions
Copy link
Contributor

Redirect check

This PR probably requires the following redirects to be added to static/_redirects:

  • This PR does not change any pages in a way that would require a redirect.

@github-actions
Copy link
Contributor

🍈 Lychee Link Check Report

Note: Links are cached for 5 minutes to avoid unnecessary requests, and speed up consecutive runs.

📊 Results Overview

Status Count
🔍 Total 2396
✅ Successful 2121
⏳ Timeouts 0
🔀 Redirected 253
👻 Excluded 21
❓ Unknown 0
🚫 Errors 0
⛔ Unsupported 1

@nurul3101 nurul3101 requested a review from ankur-arch November 11, 2025 14:48
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Nov 11, 2025

Deploying docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: d1b2909
Status:⚡️  Build in progress...

View logs

Copy link
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: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
content/800-guides/090-nextjs.mdx (1)

76-82: Missing @prisma/adapter-pg installation in "Other databases" tab.

The "Other databases" tab (lines 76–82) does not include installation of @prisma/adapter-pg, yet the code at lines 316–328 uses PrismaPg adapter. This creates a setup gap: users following the "Other databases" path will encounter a missing dependency error when they reach the lib/prisma.ts code.

Compare with content/800-guides/340-ai-sdk-nextjs.mdx (line 65) and content/800-guides/220-astro.mdx (line 62), where @prisma/adapter-pg is properly installed in the "Other databases" tabs.

Update the "Other databases" tab to include:

  npm install prisma tsx --save-dev
  npm install @prisma/client dotenv
+ npm install @prisma/adapter-pg
content/800-guides/170-react-router-7.mdx (2)

67-67: Clarify prisma init command for non-Prisma Postgres users.

The npx prisma init --db command explicitly sets up a Prisma Postgres database (the --db flag is shorthand for --datasource-provider prisma+postgres). However, this universal init command appears after the tabbed dependency install section, where users choosing "Other databases" would still execute this Prisma Postgres-specific setup. This creates a documentation mismatch.

Consider moving the init command into the tabs or providing separate init instructions for each database path.

For Prisma Postgres (recommended):

npx prisma init --db --output ../app/generated/prisma

For Other databases (PostgreSQL via adapter):

npx prisma init --datasource-provider postgresql --output ../app/generated/prisma

206-221: Datasource configuration is incomplete—provider must be defined alongside URL.

Prisma 7 does not support split datasource definitions. The datasource block in prisma.config.ts must include both provider and url—you cannot define provider in schema.prisma and only url in the config file. When prisma.config.ts defines a datasource, it replaces the one in schema.prisma entirely.

Either keep the complete datasource block in schema.prisma, or move the entire datasource (both provider and url) to prisma.config.ts:

import 'dotenv/config'
import { defineConfig, env } from 'prisma/config';
export default defineConfig({
  schema: 'prisma/schema.prisma',
  datasource: {
    provider: 'postgresql', // or your provider
    url: env('DATABASE_URL'),
  },
  migrations: {
    path: 'prisma/migrations',
    seed: `tsx prisma/seed.ts`,
  },
});
🧹 Nitpick comments (2)
content/800-guides/140-use-prisma-in-pnpm-workspaces.mdx (1)

227-229: PrismaClient initialization in pnpm workspaces uses accelerateUrl pattern directly.

Lines 227–229 show PrismaClient being instantiated with accelerateUrl: process.env.DATABASE_URL, which indicates this guide assumes Prisma Postgres/Accelerate usage. Unlike other guides (e.g., content/800-guides/090-nextjs.mdx) that offer dual tabs for "Prisma Postgres" vs "Other databases," this pnpm guide does not provide an adapter-based alternative path.

For users of other databases (MySQL, SQLite), they would need to manually adapt the code to use PrismaPg adapter instead. Consider adding a note or conditional setup instructions.

Add a note after line 219 indicating that for non-Postgres databases, users should replace the accelerateUrl pattern with the PrismaPg adapter initialization, similar to the approach shown in content/800-guides/090-nextjs.mdx (lines 316–328).

content/800-guides/150-multiple-databases.mdx (1)

298-300: Multiple databases guide assumes Prisma Postgres for both databases.

Lines 298–300 and 329–331 both use the accelerateUrl pattern with withAccelerate(), which indicates this guide assumes both databases are Prisma Postgres instances. This is reasonable given the guide's title focuses on "multiple Prisma Postgres databases," but there's no alternative path for users wanting to use Postgres adapters (via PrismaPg) or other database types.

Consider adding a note or conditional setup instructions for non-Postgres scenarios, similar to other guides in the PR.

Add a note in sections 3.1 and 3.2 indicating that for non-Postgres databases, users should replace the accelerateUrl pattern with the PrismaPg adapter pattern (e.g., const adapter = new PrismaPg({ connectionString: process.env.PPG_USER_DATABASE_URL }) and new PrismaClient({ adapter })).

Also applies to: 329-331

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a49d775 and c901117.

📒 Files selected for processing (29)
  • content/800-guides/010-data-migration.mdx (3 hunks)
  • content/800-guides/040-migrate-from-sequelize.mdx (2 hunks)
  • content/800-guides/060-migrate-from-drizzle.mdx (5 hunks)
  • content/800-guides/070-cloudflare-d1.mdx (3 hunks)
  • content/800-guides/080-turborepo.mdx (7 hunks)
  • content/800-guides/090-nextjs.mdx (6 hunks)
  • content/800-guides/100-nuxt.mdx (3 hunks)
  • content/800-guides/130-docker.mdx (3 hunks)
  • content/800-guides/140-use-prisma-in-pnpm-workspaces.mdx (4 hunks)
  • content/800-guides/150-multiple-databases.mdx (7 hunks)
  • content/800-guides/160-tanstack-start.mdx (3 hunks)
  • content/800-guides/170-react-router-7.mdx (4 hunks)
  • content/800-guides/180-solid-start.mdx (4 hunks)
  • content/800-guides/190-data-dog.mdx (2 hunks)
  • content/800-guides/190-sveltekit.mdx (4 hunks)
  • content/800-guides/200-clerk-nextjs.mdx (3 hunks)
  • content/800-guides/220-astro.mdx (4 hunks)
  • content/800-guides/230-betterauth-nextjs.mdx (4 hunks)
  • content/800-guides/300-supabase-accelerate.mdx (5 hunks)
  • content/800-guides/310-neon-accelerate.mdx (5 hunks)
  • content/800-guides/320-permit-io-access-control.mdx (3 hunks)
  • content/800-guides/330-github-actions.mdx (2 hunks)
  • content/800-guides/340-ai-sdk-nextjs.mdx (4 hunks)
  • content/800-guides/350-authjs-nextjs.mdx (3 hunks)
  • content/800-guides/360-embed-studio-nextjs.mdx (2 hunks)
  • content/800-guides/370-bun.mdx (4 hunks)
  • content/800-guides/390-hono.mdx (6 hunks)
  • content/800-guides/400-deno-integration.mdx (0 hunks)
  • content/800-guides/999-making-guides.mdx (4 hunks)
💤 Files with no reviewable changes (1)
  • content/800-guides/400-deno-integration.mdx
🚧 Files skipped from review as they are similar to previous changes (3)
  • content/800-guides/230-betterauth-nextjs.mdx
  • content/800-guides/330-github-actions.mdx
  • content/800-guides/070-cloudflare-d1.mdx
🧰 Additional context used
🧠 Learnings (6)
📓 Common learnings
Learnt from: aidankmcalister
Repo: prisma/docs PR: 7167
File: content/900-ai/prompts/astro.mdx:84-84
Timestamp: 2025-10-09T21:32:50.340Z
Learning: The `npx prisma init` command supports the following flags: `--db` (shorthand for `--datasource-provider prisma+postgres`), `--output` (specifies output location for generated client), `--generator-provider` (defines the generator provider), `--datasource-provider`, `--url`, `--preview-feature`, and `--with-model`. These are documented valid CLI options for Prisma init command.
📚 Learning: 2025-10-09T21:32:50.340Z
Learnt from: aidankmcalister
Repo: prisma/docs PR: 7167
File: content/900-ai/prompts/astro.mdx:84-84
Timestamp: 2025-10-09T21:32:50.340Z
Learning: The `npx prisma init` command supports the following flags: `--db` (shorthand for `--datasource-provider prisma+postgres`), `--output` (specifies output location for generated client), `--generator-provider` (defines the generator provider), `--datasource-provider`, `--url`, `--preview-feature`, and `--with-model`. These are documented valid CLI options for Prisma init command.

Applied to files:

  • content/800-guides/040-migrate-from-sequelize.mdx
  • content/800-guides/999-making-guides.mdx
  • content/800-guides/350-authjs-nextjs.mdx
  • content/800-guides/200-clerk-nextjs.mdx
  • content/800-guides/360-embed-studio-nextjs.mdx
  • content/800-guides/310-neon-accelerate.mdx
  • content/800-guides/300-supabase-accelerate.mdx
  • content/800-guides/100-nuxt.mdx
  • content/800-guides/130-docker.mdx
  • content/800-guides/160-tanstack-start.mdx
  • content/800-guides/080-turborepo.mdx
  • content/800-guides/320-permit-io-access-control.mdx
  • content/800-guides/090-nextjs.mdx
  • content/800-guides/190-data-dog.mdx
  • content/800-guides/010-data-migration.mdx
  • content/800-guides/220-astro.mdx
  • content/800-guides/370-bun.mdx
  • content/800-guides/170-react-router-7.mdx
  • content/800-guides/340-ai-sdk-nextjs.mdx
  • content/800-guides/150-multiple-databases.mdx
  • content/800-guides/140-use-prisma-in-pnpm-workspaces.mdx
  • content/800-guides/060-migrate-from-drizzle.mdx
  • content/800-guides/180-solid-start.mdx
  • content/800-guides/390-hono.mdx
  • content/800-guides/190-sveltekit.mdx
📚 Learning: 2025-08-11T09:40:55.237Z
Learnt from: ankur-arch
Repo: prisma/docs PR: 7066
File: content/200-orm/200-prisma-client/700-debugging-and-troubleshooting/245-troubleshooting-binary-size-issues.mdx:8-22
Timestamp: 2025-08-11T09:40:55.237Z
Learning: When the queryCompiler preview feature is enabled in Prisma ORM (v6.7.0+), it does not require Rust engines for CLI tools like `prisma migrate` or `prisma db pull`. The previous understanding that CLI tools would still need Rust binaries even with queryCompiler enabled is incorrect.

Applied to files:

  • content/800-guides/040-migrate-from-sequelize.mdx
  • content/800-guides/999-making-guides.mdx
  • content/800-guides/350-authjs-nextjs.mdx
  • content/800-guides/200-clerk-nextjs.mdx
  • content/800-guides/310-neon-accelerate.mdx
  • content/800-guides/300-supabase-accelerate.mdx
  • content/800-guides/100-nuxt.mdx
  • content/800-guides/160-tanstack-start.mdx
  • content/800-guides/080-turborepo.mdx
  • content/800-guides/090-nextjs.mdx
  • content/800-guides/190-data-dog.mdx
  • content/800-guides/340-ai-sdk-nextjs.mdx
  • content/800-guides/150-multiple-databases.mdx
  • content/800-guides/140-use-prisma-in-pnpm-workspaces.mdx
  • content/800-guides/180-solid-start.mdx
  • content/800-guides/190-sveltekit.mdx
📚 Learning: 2025-10-08T16:23:00.388Z
Learnt from: aidankmcalister
Repo: prisma/docs PR: 7165
File: content/800-guides/550-test-guide.mdx:85-90
Timestamp: 2025-10-08T16:23:00.388Z
Learning: For .mdx files in the prisma/docs repository: All headings and titles should use sentence case (e.g., "Getting started with Prisma ORM", "Best practices for authentication"), not title case. Exception: Always preserve exact casing for product names including "Prisma Postgres", "Prisma", "Prisma ORM", and "Prisma Data Platform".

Applied to files:

  • content/800-guides/040-migrate-from-sequelize.mdx
  • content/800-guides/999-making-guides.mdx
  • content/800-guides/350-authjs-nextjs.mdx
  • content/800-guides/200-clerk-nextjs.mdx
  • content/800-guides/100-nuxt.mdx
  • content/800-guides/130-docker.mdx
  • content/800-guides/010-data-migration.mdx
  • content/800-guides/060-migrate-from-drizzle.mdx
  • content/800-guides/180-solid-start.mdx
📚 Learning: 2025-10-08T16:23:00.388Z
Learnt from: aidankmcalister
Repo: prisma/docs PR: 7165
File: content/800-guides/550-test-guide.mdx:85-90
Timestamp: 2025-10-08T16:23:00.388Z
Learning: For .mdx files in the prisma/docs repository: Only flag code snippets for (1) exposed secrets with real-looking values that should be placeholders (e.g., API keys, database passwords, AWS credentials), or (2) blatant syntax errors like missing parentheses, brackets, braces, or mismatched delimiters. Do not flag code quality issues, anti-patterns, security vulnerabilities, missing error handling, unused variables, or any other bad practices, as documentation intentionally shows problematic code.

Applied to files:

  • content/800-guides/999-making-guides.mdx
  • content/800-guides/350-authjs-nextjs.mdx
  • content/800-guides/200-clerk-nextjs.mdx
  • content/800-guides/310-neon-accelerate.mdx
  • content/800-guides/300-supabase-accelerate.mdx
  • content/800-guides/100-nuxt.mdx
  • content/800-guides/130-docker.mdx
  • content/800-guides/090-nextjs.mdx
  • content/800-guides/190-data-dog.mdx
  • content/800-guides/140-use-prisma-in-pnpm-workspaces.mdx
📚 Learning: 2025-10-08T16:22:57.129Z
Learnt from: aidankmcalister
Repo: prisma/docs PR: 7165
File: content/800-guides/550-test-guide.mdx:50-66
Timestamp: 2025-10-08T16:22:57.129Z
Learning: In `.mdx` files, do NOT flag or suggest changes for the following code quality issues even if they represent poor practices: React anti-patterns (using var instead of useState, direct DOM manipulation), missing keys in .map() iterations, non-serializable props in getServerSideProps, unused variables, missing error handling, SQL injection vulnerabilities (unless actively showing how to fix them), insecure cookie settings, missing TypeScript types, PrismaClient instantiation patterns, or any other code quality, security, or performance issues. Documentation code snippets are copied from source code and often intentionally show "before" examples or common mistakes.

Applied to files:

  • content/800-guides/350-authjs-nextjs.mdx
  • content/800-guides/200-clerk-nextjs.mdx
  • content/800-guides/360-embed-studio-nextjs.mdx
  • content/800-guides/100-nuxt.mdx
  • content/800-guides/160-tanstack-start.mdx
  • content/800-guides/090-nextjs.mdx
  • content/800-guides/170-react-router-7.mdx
  • content/800-guides/190-sveltekit.mdx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Check links
  • GitHub Check: Check internal links
  • GitHub Check: runner / linkspector
  • GitHub Check: Cloudflare Pages
🔇 Additional comments (36)
content/800-guides/390-hono.mdx (3)

51-52: Excellent adapter and config setup for Hono.

Lines 51-52 correctly add the @prisma/adapter-pg dependency, and lines 108-123 properly introduce prisma.config.ts with dotenv integration. The configuration structure matches the Prisma v7 standard. ✓

Also applies to: 108-123


138-148: Consistent adapter initialization across seed and runtime.

The seed file (lines 138-148) and both PrismaClient initialization paths (lines 253 for Accelerate, lines 282 for adapter-based) correctly wire the PrismaPg adapter. The pattern is consistent: create adapter with connectionString, pass to PrismaClient constructor. ✓

Also applies to: 253-253, 282-282


59-59: Verify init command path argument.

Line 59 uses npx prisma init --db --output ../src/generated/prisma. Confirm this relative path resolves correctly from the Hono project root, as some other guides in this PR use different paths (e.g., ../app/generated/prisma). The inconsistency may be intentional per framework structure, but worth verifying the docs are aligned with actual framework conventions.

content/800-guides/190-sveltekit.mdx (1)

135-149: SvelteKit configuration properly aligned with prisma.config.ts pattern.

The prisma.config.ts (lines 135-149) correctly imports dotenv and defines the config structure. The seed.ts (lines 166-174) properly initializes PrismaPg adapter. Both follow the established pattern consistently. ✓

Also applies to: 166-174

content/800-guides/040-migrate-from-sequelize.mdx (1)

85-98: Clear introduction of prisma.config.ts for migration guide.

The new section at lines 85-98 properly introduces the prisma.config.ts file with dotenv loading and schema/migration/datasource configuration. The accompanying note (lines 100-109) about installing dotenv is essential context for users. ✓

content/800-guides/160-tanstack-start.mdx (1)

382-396: TanStack Start adapter setup follows established pattern.

The prisma.config.ts (lines 382-396) and seed.ts (lines 412-421) both correctly implement the dotenv/adapter initialization pattern established across the PR. The seed command wiring (lines 465-480) is properly configured. ✓

Also applies to: 412-421

content/800-guides/190-data-dog.mdx (1)

185-201: Datadog guide config updates align with new prisma.config.ts standard.

The new prisma.config.ts section (lines 185-201) properly introduces dotenv loading and the standard config structure. Consistent with other guides in this PR. ✓

content/800-guides/350-authjs-nextjs.mdx (1)

209-226: Auth.js guide properly implements adapter patterns with connection pooling.

Both paths (Accelerate at lines 209-226 and adapter-based at lines 231-251) correctly initialize PrismaClient. The global instance caching pattern (lines 214-222 and 239-247) is a best practice for Next.js to prevent connection exhaustion. ✓

Also applies to: 231-251

content/800-guides/370-bun.mdx (1)

184-200: Bun guide seed command correctly uses Bun runtime.

Line 193 properly configures the seed command for Bun: bun run prisma/seed.ts. This is runtime-specific (Bun-appropriate), unlike the tsx commands in Node.js guides. Excellent attention to framework-specific details. ✓

content/800-guides/360-embed-studio-nextjs.mdx (1)

180-238: Embedded Studio guide provides comprehensive seed example.

The seed.ts file (lines 180-238) not only implements the adapter pattern correctly but also provides a complete example with User and Post creation, making it educational. The adapter setup follows the established pattern. ✓

content/800-guides/100-nuxt.mdx (2)

65-93: Excellent addition of centralized configuration. The new prisma.config.ts introduction is well-positioned and clearly documented. The separation of concerns—configuration file for env loading + schema definitions—is a clean pattern.


117-127: Generator output path missing from schema. The schema shows provider = "prisma-client" without specifying an output path. With the centralized prisma.config.ts approach, either:

  1. The output path should be in the schema's generator block, or
  2. It should be configured via prisma.config.ts (generator config section)

Verify that the Prisma Client generation knows where to output files. If relying on defaults, document that behavior. As per learnings, output location is a documented CLI option for npx prisma init.

content/800-guides/130-docker.mdx (2)

128-154: Clear configuration setup. The prisma.config.ts introduction is consistent with other guides, includes proper dotenv integration note, and the installation instruction for dotenv is helpful for users.


166-179: Good adapter pattern demonstration. The PrismaPg adapter initialization and PrismaClient wiring is clean and consistent with adapter conventions. The pattern—create adapter instance, pass to client constructor—is the correct approach for Prisma 7 adapter usage.

content/800-guides/310-neon-accelerate.mdx (3)

49-75: Excellent foundational setup. The prisma.config.ts introduction clearly establishes the centralized configuration pattern. Good placement before introspection step.


125-151: Clear DIRECT_URL handling for Accelerate. The distinction between DATABASE_URL (Accelerate pool) and DIRECT_URL (direct database connection for migrations) is crucial and well-explained. The updated config correctly uses env('DIRECT_URL') for migrations.


158-166: Helpful Prisma 7 migration note. The removal of the --no-engine flag is correctly documented and the explanation—that it's no longer required in Prisma 7 for Accelerate—is aligned with current best practices. Based on learnings.

content/800-guides/080-turborepo.mdx (2)

224-239: Proper centralized Prisma config for monorepo. The prisma.config.ts at the package level (packages/database) is correctly positioned with dotenv and environment-driven datasource configuration.


402-426: Well-structured adapter initialization options. The tabbed content showing both Prisma Postgres (Accelerate) and other database (PrismaPg) adapter patterns is excellent for flexibility. Both use proper singleton pattern with global cache and NODE_ENV check.

content/800-guides/200-clerk-nextjs.mdx (2)

288-315: Consistent configuration introduction. The prisma.config.ts setup in the Clerk guide follows the established pattern and integrates cleanly with the Next.js + Clerk workflow.


345-378: Flexible PrismaClient initialization options. The tabbed approach showing both Accelerate extension and PrismaPg adapter patterns is appropriate, giving developers choice based on their database provider while maintaining the singleton pattern across both paths.

content/800-guides/320-permit-io-access-control.mdx (2)

198-217: Proper dotenv integration in config. The addition of import 'dotenv/config' at the top of prisma.config.ts ensures environment variables are loaded before Prisma configuration is evaluated. This is essential for the env('DATABASE_URL') call to work.


253-262: Consistent seed script adapter usage. The seed script correctly instantiates the PrismaPg adapter and passes it to PrismaClient. This maintains consistency with the runtime client initialization pattern and ensures seeding uses the same adapter configuration.

content/800-guides/300-supabase-accelerate.mdx (2)

49-75: Solid foundational Accelerate config. The prisma.config.ts setup for Supabase + Accelerate follows the established pattern consistently with related guides (Neon, etc.).


125-151: Clear DIRECT_URL documentation for migrations. The explanation and implementation of separating DATABASE_URL (Accelerate pooling) from DIRECT_URL (direct database for migrations) is critical for production setups and well-documented here.

content/800-guides/999-making-guides.mdx (3)

94-108: Clear adapter pattern in code example. The PrismaPg adapter initialization and PrismaClient instantiation shown in the introductory code example is a good pattern to teach guide contributors. Demonstrates the fundamental adapter usage pattern in just a few lines.


354-382: Well-positioned configuration section in template. The new section 2.3 "Configure Prisma" is appropriately placed in the guide template after schema definition and before migrations. The prisma.config.ts example is clear and includes helpful dotenv note.


454-471: Proper seed configuration integration. The updated prisma.config.ts at line 465 shows the correct seed field syntax: seed: \tsx prisma/seed.ts``. This tells Prisma how to run seed scripts and is well-documented in the template for contributors.

content/800-guides/340-ai-sdk-nextjs.mdx (2)

59-59: Verify @prisma/adapter-pg is installed for non-Postgres databases.

Line 65 installs @prisma/adapter-pg only in the "Other databases" tab, which is correct for PostgreSQL-compatible adapters. However, if a user selects a different database (MySQL, SQLite, etc.), this tab may be misleading. The comment in the tab or documentation should clarify that this guide specifically uses the Postgres adapter for "other databases," or provide additional adapter options.

Does this guide support non-PostgreSQL databases, or should the "Other databases" tab be renamed to "Other PostgreSQL-compatible databases" for clarity? As per learnings, the npx prisma init command supports the --datasource-provider flag to allow users to choose their database type during initialization.

Also applies to: 65-65


177-179: Ensure adapter initialization aligns across both PrismaClient paths.

The Prisma Postgres path (lines 177–179) uses accelerateUrl: process.env.DATABASE_URL with withAccelerate(), while the "Other databases" path (lines 200–202) uses a PrismaPg adapter with connectionString: process.env.DATABASE_URL!. Both approaches are valid but operate differently:

  • Postgres path: Direct accelerateUrl configuration bypasses the need for an explicit adapter object.
  • Other databases path: Instantiates a PrismaPg adapter, which is the recommended pattern for database adapters.

This divergence is intentional and correct, but ensure users understand why the patterns differ (Accelerate is a Prisma-hosted service vs. local adapter pattern).

Also applies to: 200-202

content/800-guides/010-data-migration.mdx (1)

64-91: New section "Configure Prisma" is well-positioned and comprehensive.

The addition of section 1.2 introduces prisma.config.ts at the appropriate point in the workflow—after schema definition but before running migrations. The note about installing dotenv (lines 85–91) is helpful for users unfamiliar with the dependency.

content/800-guides/220-astro.mdx (1)

70-70: Output path in npx prisma init command differs from other guides.

Line 70 uses --output ../prisma/generated, while content/800-guides/340-ai-sdk-nextjs.mdx (line 73) uses --output ../app/generated/prisma. The choice of output directory is project-specific, but ensure the path is consistent with where the generated Prisma Client is actually imported in later code.

In this file, the import at line 152 references "../prisma/generated/client.js", which aligns with the output path on line 70. This is correct and consistent within the file.

content/800-guides/090-nextjs.mdx (1)

702-702: Postinstall script correctly updated to remove --no-engine flag.

Line 702 changes "postinstall": "prisma generate --no-engine" to "postinstall": "prisma generate". This aligns with the new prisma.config.ts setup and reflects modern Prisma practices. Based on learnings, the queryCompiler preview feature (v6.7.0+) no longer requires Rust engines for CLI tools, making this change appropriate.

content/800-guides/060-migrate-from-drizzle.mdx (1)

149-177: Prisma configuration section appropriately placed in migration guide.

Section 2.3 "Configure Prisma" is well-timed in the Drizzle migration workflow—placed after database connection setup (2.2) but before introspection (2.4). This gives users a chance to set up the configuration layer before they need it for schema introspection.

The instructions for dotenv installation (lines 168–176) are helpful for users unfamiliar with the dependency.

content/800-guides/180-solid-start.mdx (1)

79-79: @prisma/adapter-pg properly installed in "Other databases" tab.

Unlike content/800-guides/090-nextjs.mdx, this file correctly includes @prisma/adapter-pg installation at line 79 in the "Other databases" tab, ensuring consistency with the adapter-based code at lines 285–293.

content/800-guides/150-multiple-databases.mdx (1)

109-118: Environment variable naming convention (PPG_*_DATABASE_URL) is clear and specific.

The use of PPG_USER_DATABASE_URL and PPG_POST_DATABASE_URL (where PPG likely stands for "Prisma Postgres") makes the purpose of each environment variable explicit. The pattern is documented clearly in the .env file example (lines 109–118 and 188–197).

Also applies to: 188-197

@github-actions
Copy link
Contributor

🍈 Lychee Link Check Report

Note: Links are cached for 5 minutes. Failed links (timeouts, rate limits) are retried in a second run with longer timeout.

📊 Results Overview

Status Count
🔍 Total 2396
✅ Successful 2081
⏳ Timeouts 0
🔀 Redirected 261
👻 Excluded 21
❓ Unknown 0
🚫 Errors 32
⛔ Unsupported 1

Errors per input

Errors in 100-getting-started/02-setup-prisma/100-start-from-scratch/110-relational-databases-node-mysql.mdx

Errors in 100-getting-started/02-setup-prisma/100-start-from-scratch/110-relational-databases-typescript-mysql.mdx

Errors in 100-getting-started/02-setup-prisma/100-start-from-scratch/110-relational-databases/100-connect-your-database-node-mysql.mdx

Errors in 100-getting-started/02-setup-prisma/100-start-from-scratch/110-relational-databases/100-connect-your-database-node-planetscale.mdx

Errors in 100-getting-started/02-setup-prisma/100-start-from-scratch/110-relational-databases/100-connect-your-database-typescript-mysql.mdx

Errors in 100-getting-started/02-setup-prisma/100-start-from-scratch/110-relational-databases/100-connect-your-database-typescript-planetscale.mdx

Errors in 100-getting-started/02-setup-prisma/200-add-to-existing-project/110-relational-databases-node-mysql.mdx

Errors in 100-getting-started/02-setup-prisma/200-add-to-existing-project/110-relational-databases-typescript-mysql.mdx

Errors in 100-getting-started/02-setup-prisma/200-add-to-existing-project/110-relational-databases/100-connect-your-database-node-mysql.mdx

Errors in 100-getting-started/02-setup-prisma/200-add-to-existing-project/110-relational-databases/100-connect-your-database-node-planetscale.mdx

Errors in 100-getting-started/02-setup-prisma/200-add-to-existing-project/110-relational-databases/100-connect-your-database-typescript-mysql.mdx

Errors in 100-getting-started/02-setup-prisma/200-add-to-existing-project/110-relational-databases/100-connect-your-database-typescript-planetscale.mdx

Errors in 200-orm/050-overview/500-databases/400-mysql.mdx

Errors in 200-orm/100-prisma-schema/20-data-model/20-relations/410-referential-actions/index.mdx

Errors in 200-orm/100-prisma-schema/20-data-model/20-relations/420-relation-mode.mdx

Errors in 200-orm/100-prisma-schema/20-data-model/30-indexes.mdx

Errors in 200-orm/100-prisma-schema/20-data-model/40-views.mdx

Errors in 200-orm/200-prisma-client/100-queries/050-filtering-and-sorting.mdx

Errors in 200-orm/200-prisma-client/100-queries/058-transactions.mdx

Errors in 200-orm/200-prisma-client/100-queries/060-full-text-search.mdx

Errors in 200-orm/200-prisma-client/100-queries/070-case-sensitivity.mdx

Errors in 200-orm/200-prisma-client/150-using-raw-sql/200-raw-queries.mdx

Errors in 200-orm/200-prisma-client/200-special-fields-and-types/100-working-with-json-fields.mdx

Errors in 200-orm/300-prisma-migrate/050-getting-started.mdx

Errors in 200-orm/300-prisma-migrate/300-workflows/90-development-and-production.mdx

Errors in 200-orm/500-reference/100-prisma-schema-reference.mdx

Errors in 200-orm/500-reference/350-database-features.mdx

Errors in 200-orm/800-more/600-help-and-troubleshooting/050-dataguide/02-introduction-to-data-types.mdx

@AmanVarshney01 AmanVarshney01 merged commit a72eb21 into prisma-7 Nov 17, 2025
4 of 6 checks passed
@AmanVarshney01 AmanVarshney01 deleted the feat/update-guides-to-use-prisma-config-v7 branch November 17, 2025 09:59
@github-actions
Copy link
Contributor

🍈 Lychee Link Check Report

Note: Links are cached for 5 minutes. Failed links (timeouts, rate limits) are retried in a second run with longer timeout.

📊 Results Overview

Status Count
🔍 Total 2263
✅ Successful 2233
⏳ Timeouts 0
🔀 Redirected 7
👻 Excluded 22
❓ Unknown 0
🚫 Errors 0
⛔ Unsupported 1

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.

3 participants