Skip to content

Conversation

@mhartington
Copy link
Contributor

@mhartington mhartington commented Oct 24, 2025

Summary by CodeRabbit

  • Documentation

    • Updated many framework guides to add dotenv, introduce a centralized Prisma configuration surface, move seeding into a config-driven workflow, and renumber steps for clarity.
  • New Features

    • Added guidance for a standardized Prisma client initialization (singleton with env-aware handling and optional Postgres acceleration) and a config-based seed workflow.
  • Bug Fixes / Misc

    • Unified Prisma client generator guidance across guides and adjusted seed wiring to use the new config approach.

@github-actions
Copy link
Contributor

Dangerous URL check

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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 24, 2025

Walkthrough

Adds a root-level prisma.config.ts, moves seed wiring from package.json into prisma.config.ts (migrations.seed), adds prisma/seed.ts and dotenv usage across many guides, and updates Prisma schema generator provider from prisma-client-jsprisma-client in multiple docs.

Changes

Cohort / File(s) Summary
Prisma config + seeds (multiple guides)
content/800-guides/080-turborepo.mdx, content/800-guides/090-nextjs.mdx, content/800-guides/160-tanstack-start.mdx, content/800-guides/170-react-router-7.mdx, content/800-guides/180-solid-start.mdx, content/800-guides/190-sveltekit.mdx, content/800-guides/220-astro.mdx, content/800-guides/320-permit-io-access-control.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
Add prisma.config.ts (default export via defineConfig), add prisma/seed.ts with export async function main() (and invocation), set migrations.seed to run the seed (e.g., tsx prisma/seed.ts), and add dotenv/env wiring in examples.
Prisma generator provider updates
content/800-guides/080-turborepo.mdx, content/800-guides/090-nextjs.mdx, content/800-guides/220-astro.mdx, content/800-guides/320-permit-io-access-control.mdx, content/800-guides/360-embed-studio-nextjs.mdx, content/800-guides/370-bun.mdx
Update Prisma schema generator provider from provider = "prisma-client-js"provider = "prisma-client"; remove engineType = "client" where present; adjust generated-client import paths in examples.
Framework-specific client & utilities
content/800-guides/090-nextjs.mdx, content/800-guides/340-ai-sdk-nextjs.mdx, content/800-guides/350-authjs-nextjs.mdx
Add lib/prisma.ts exporting a PrismaClient singleton (Postgres variant uses withAccelerate + global singleton pattern), add runtime-safe client examples and update example imports to use the generated client or new lib.
Permit.io / middleware adjustments
content/800-guides/320-permit-io-access-control.mdx
Introduce prisma.config.ts; change PrismaClient import paths to local generated client (e.g., ../src/generated/prisma/client), and add exported AuthRequest interface extending Request with user? and prisma?.
Bun guide refactor
content/800-guides/370-bun.mdx
Remove driver-adapter flow and @prisma/adapter-pg; switch to direct DATABASE_URL usage, simplify schema/generator to prisma-client, update db/seed/command examples to bunx/bun run patterns, and adjust server sample to use Prisma ORM.
Miscellaneous docs updates
content/800-guides/220-astro.mdx, content/800-guides/340-ai-sdk-nextjs.mdx, content/800-guides/360-embed-studio-nextjs.mdx, content/800-guides/320-permit-io-access-control.mdx
Remove engineType = "client" where present, add top-level import "dotenv/config" in some examples, adjust step numbers and narrative to reflect new config-driven seed workflow, and update code import paths within examples.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Pre-merge checks

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Title Check ❓ Inconclusive The title "chore(): update guides to use new config file" is vague and uses non-specific terminology that lacks meaningful detail. While the PR does update multiple guides and introduce a new configuration setup (prisma.config.ts), the title doesn't clarify what the config file is, what it configures, or the broader scope of changes. The term "new config file" is generic and could apply to many different pull requests. The changeset includes significant structural changes beyond just "using" a config file—such as restructuring seed orchestration from package.json to prisma.config.ts, introducing new seed files, adding dotenv support, and updating the Prisma generator provider—but the title provides no indication of this broader context. Consider revising the title to be more specific and descriptive of the core changes. For example, "refactor guides to use new Prisma configuration pattern with prisma.config.ts" would better convey that this is introducing a new configuration approach rather than just adding a file. Alternatively, if brevity is preferred, "migrate Prisma setup to use prisma.config.ts and seed restructuring" would capture the main transformations across the guides.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@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.

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: 12

Caution

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

⚠️ Outside diff range comments (1)
content/800-guides/080-turborepo.mdx (1)

131-131: Fix spelling error in instruction text.

Line 131 contains a spelling error: dotevn should be dotenv. This appears in the instructional text that users will follow, and while context may help some developers understand the intended meaning, it should be corrected for clarity.

- Include an import for `dotevn` at the top of the `prisma.config.ts`
+ Include an import for `dotenv` at the top of the `prisma.config.ts`
🧹 Nitpick comments (3)
content/800-guides/180-solid-start.mdx (1)

142-158: Redundant code duplication in prisma.config.ts examples

The prisma.config.ts configuration is shown twice (lines 142–158 and lines 223–239), with only a minor difference in how the seed line is marked. This duplication may confuse readers about which version is correct.

To improve clarity, consider consolidating these examples or making the progression more explicit (e.g., "here's the basic config" → "now add the seed line"). If the intent is to show before/after, clarify that in the surrounding text.

Also applies to: 223-239

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

136-152: Redundant code duplication in prisma.config.ts examples

The prisma.config.ts configuration appears twice (lines 136–152 and lines 216–232), similar to the pattern in solid-start.mdx. Consider consolidating these examples for better clarity.

Also applies to: 216-232

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

70-72: Terminology clarity for direct connection approach

Lines 70–72 introduce a "direct connection string" for Prisma Postgres, which is different from the pooled connection shown in other guides. While this is appropriate for Bun's use case, consider adding a brief note explaining why Bun uses direct connections (vs. connection pooling) to help readers understand the design choice.

This is a nice-to-have improvement for consistency with the architectural reasoning provided in other guides.

📜 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 6e91b55 and 6bd1e5f.

📒 Files selected for processing (13)
  • content/800-guides/080-turborepo.mdx (2 hunks)
  • content/800-guides/090-nextjs.mdx (6 hunks)
  • content/800-guides/160-tanstack-start.mdx (4 hunks)
  • content/800-guides/170-react-router-7.mdx (4 hunks)
  • content/800-guides/180-solid-start.mdx (4 hunks)
  • content/800-guides/190-sveltekit.mdx (4 hunks)
  • content/800-guides/220-astro.mdx (4 hunks)
  • content/800-guides/320-permit-io-access-control.mdx (6 hunks)
  • content/800-guides/340-ai-sdk-nextjs.mdx (3 hunks)
  • content/800-guides/350-authjs-nextjs.mdx (3 hunks)
  • content/800-guides/360-embed-studio-nextjs.mdx (8 hunks)
  • content/800-guides/370-bun.mdx (6 hunks)
  • content/800-guides/390-hono.mdx (8 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-10-09T21:32:50.340Z
Learnt from: aidankmcalister
PR: prisma/docs#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/390-hono.mdx
  • content/800-guides/160-tanstack-start.mdx
  • content/800-guides/340-ai-sdk-nextjs.mdx
  • content/800-guides/180-solid-start.mdx
  • content/800-guides/080-turborepo.mdx
  • content/800-guides/350-authjs-nextjs.mdx
  • content/800-guides/170-react-router-7.mdx
  • content/800-guides/090-nextjs.mdx
  • content/800-guides/190-sveltekit.mdx
  • content/800-guides/360-embed-studio-nextjs.mdx
  • content/800-guides/320-permit-io-access-control.mdx
🪛 LanguageTool
content/800-guides/220-astro.mdx

[grammar] ~121-~121: Ensure spelling is correct
Context: ...y using dotenv. Include an import for dotevn at the top of the prisma.config.ts `...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

content/800-guides/390-hono.mdx

[grammar] ~327-~327: Ensure spelling is correct
Context: ...les will automatically be set to Hono's contenxt, so dotenv can be skipped. ### 3.3....

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

content/800-guides/160-tanstack-start.mdx

[grammar] ~381-~381: Ensure spelling is correct
Context: ...y using dotenv. Include an import for dotevn at the top of the prisma.config.ts `...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

content/800-guides/340-ai-sdk-nextjs.mdx

[grammar] ~131-~131: Ensure spelling is correct
Context: ...y using dotenv. Include an import for dotevn at the top of the prisma.config.ts `...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

content/800-guides/180-solid-start.mdx

[grammar] ~140-~140: Ensure spelling is correct
Context: ...y using dotenv. Include an import for dotevn at the top of the prisma.config.ts `...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

content/800-guides/350-authjs-nextjs.mdx

[grammar] ~178-~178: Ensure spelling is correct
Context: ...y using dotenv. Include an import for dotevn at the top of the prisma.config.ts `...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

content/800-guides/170-react-router-7.mdx

[grammar] ~120-~120: Ensure spelling is correct
Context: ...y using dotenv. Include an import for dotevn at the top of the prisma.config.ts `...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

content/800-guides/090-nextjs.mdx

[grammar] ~140-~140: Ensure spelling is correct
Context: ...y using dotenv. Include an import for dotevn at the top of the prisma.config.ts `...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

content/800-guides/190-sveltekit.mdx

[grammar] ~134-~134: Ensure spelling is correct
Context: ...y using dotenv. Include an import for dotevn at the top of the prisma.config.ts `...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

content/800-guides/360-embed-studio-nextjs.mdx

[grammar] ~148-~148: Ensure spelling is correct
Context: ...y using dotenv. Include an import for dotevn at the top of the prisma.config.ts `...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

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

[grammar] ~202-~202: Ensure spelling is correct
Context: ...y using dotenv. Include an import for dotevn at the top of the prisma.config.ts `...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

⏰ 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). (3)
  • GitHub Check: Check links
  • GitHub Check: runner / linkspector
  • GitHub Check: Check internal links
🔇 Additional comments (2)
content/800-guides/190-sveltekit.mdx (1)

134-134: Typo in documentation: dotevndotenv

Line 134 contains the same spelling error. The text reads "Include an import for dotevn" but should be "Include an import for dotenv".

Apply this fix:

-Include an import for `dotevn` at the top of the `prisma.config.ts`
+Include an import for `dotenv` at the top of the `prisma.config.ts`
⛔ Skipped due to learnings
Learnt from: aidankmcalister
PR: prisma/docs#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.
content/800-guides/350-authjs-nextjs.mdx (1)

178-178: Typo in documentation: dotevndotenv

Line 178 contains the same spelling error as found in other files. The text reads "Include an import for dotevn" but should be "Include an import for dotenv".

Apply this fix:

-Include an import for `dotevn` at the top of the `prisma.config.ts`
+Include an import for `dotenv` at the top of the `prisma.config.ts`
⛔ Skipped due to learnings
Learnt from: aidankmcalister
PR: prisma/docs#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.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Oct 24, 2025

Deploying docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 3eb8f84
Status: ✅  Deploy successful!
Preview URL: https://fd24bd25.docs-51g.pages.dev
Branch Preview URL: https://chore-update-guides-for-new.docs-51g.pages.dev

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: 2

Caution

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

⚠️ Outside diff range comments (1)
content/800-guides/220-astro.mdx (1)

154-154: Fix incorrect import path in seed script.

The import path is incorrect for a seed file located in the prisma/ directory. The path ../prisma/generated/client.js resolves to the wrong location; it should be ./generated/client.js to import from the same directory.

- import { PrismaClient, Prisma } from "../prisma/generated/client.js";
+ import { PrismaClient, Prisma } from "./generated/client.js";
♻️ Duplicate comments (4)
content/800-guides/390-hono.mdx (1)

292-293: Fix typo in explanatory text: contenxtcontext, and improve grammar.

Line 292 contains a spelling error (contenxt should be context) and an awkward phrase (will be read that file should be will read that file or will read the file).

- By default, Hono does not load any environment variables from a `.env`. `dotenv` handles this and will be read that file and expose them via `process.env`. Hono can get additional types to know that the `withPrisma` middleware will set a `prisma` key on the Hono context
+ By default, Hono does not load any environment variables from a `.env`. `dotenv` handles this and will read that file and expose them via `process.env`. Hono can get additional types to know that the `withPrisma` middleware will set a `prisma` key on the Hono context
content/800-guides/190-sveltekit.mdx (1)

216-232: Fix code block language marker: jsonts.

The code block at line 216 is marked with json language identifier but contains TypeScript code. Change the marker to ts for proper syntax highlighting.

-```json file=prisma.config.ts
+```ts file=prisma.config.ts
 import 'dotenv/config'
 import { defineConfig, env } from 'prisma/config';
 export default defineConfig({
   schema: 'prisma/schema.prisma',
   migrations: {
     path: 'prisma/migrations',
     seed: `tsx prisma/seed.ts`,
   },
   engine: 'classic',
   datasource: {
     url: env('DATABASE_URL'),
   },
 });
content/800-guides/360-embed-studio-nextjs.mdx (1)

237-251: Fix code block language marker: jsonts.

The code block at line 237 is marked with json language identifier but contains TypeScript code. Change the marker to ts for proper syntax highlighting.

-```json file=prisma.config.ts
+```ts file=prisma.config.ts
 import 'dotenv/config';
 import { defineConfig, env } from 'prisma/config';
 export default defineConfig({
   schema: 'prisma/schema.prisma',
   migrations: {
     path: 'prisma/migrations',
     seed: `tsx prisma/seed.ts`,
   },
   engine: 'classic',
   datasource: {
     url: env('DIRECT_URL'),
   },
 });
content/800-guides/160-tanstack-start.mdx (1)

461-477: Fix code block language marker: jsonts.

The code block at line 461 is marked with json language identifier but contains TypeScript code. Change the marker to ts for proper syntax highlighting.

-```json file=prisma.config.ts
+```ts file=prisma.config.ts
 import 'dotenv/config'
 import { defineConfig, env } from 'prisma/config';
 export default defineConfig({
   schema: 'prisma/schema.prisma',
   migrations: {
     path: 'prisma/migrations',
     seed: `tsx prisma/seed.ts`,
   },
   engine: 'classic',
   datasource: {
     url: env('DATABASE_URL'),
   },
 });
🧹 Nitpick comments (2)
content/800-guides/320-permit-io-access-control.mdx (1)

200-202: Grammar: pluralize "environment variable".

Line 201 should use the plural form.

- By default, Prisma requires environment variable to be managed by your runtime or by using `dotenv`.
+ By default, Prisma requires environment variables to be managed by your runtime or by using `dotenv`.
content/800-guides/220-astro.mdx (1)

120-121: Grammar: pluralize "environment variable".

Line 120 should use the plural form to match the instruction's intent.

- By default, Prisma requires environment variable to be managed by your runtime or by using `dotenv`.
+ By default, Prisma requires environment variables to be managed by your runtime or by using `dotenv`.
📜 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 6bd1e5f and ab9aebb.

📒 Files selected for processing (11)
  • content/800-guides/090-nextjs.mdx (6 hunks)
  • content/800-guides/160-tanstack-start.mdx (4 hunks)
  • content/800-guides/170-react-router-7.mdx (4 hunks)
  • content/800-guides/180-solid-start.mdx (4 hunks)
  • content/800-guides/190-sveltekit.mdx (4 hunks)
  • content/800-guides/220-astro.mdx (4 hunks)
  • content/800-guides/320-permit-io-access-control.mdx (6 hunks)
  • content/800-guides/340-ai-sdk-nextjs.mdx (3 hunks)
  • content/800-guides/350-authjs-nextjs.mdx (3 hunks)
  • content/800-guides/360-embed-studio-nextjs.mdx (8 hunks)
  • content/800-guides/390-hono.mdx (8 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • content/800-guides/180-solid-start.mdx
🧰 Additional context used
🧠 Learnings (3)
📚 Learning: 2025-10-09T21:32:50.340Z
Learnt from: aidankmcalister
PR: prisma/docs#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/160-tanstack-start.mdx
  • content/800-guides/190-sveltekit.mdx
  • content/800-guides/350-authjs-nextjs.mdx
  • content/800-guides/340-ai-sdk-nextjs.mdx
  • content/800-guides/090-nextjs.mdx
  • content/800-guides/360-embed-studio-nextjs.mdx
  • content/800-guides/320-permit-io-access-control.mdx
  • content/800-guides/170-react-router-7.mdx
  • content/800-guides/390-hono.mdx
📚 Learning: 2025-10-08T16:23:00.388Z
Learnt from: aidankmcalister
PR: prisma/docs#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/190-sveltekit.mdx
📚 Learning: 2025-10-08T16:22:57.129Z
Learnt from: aidankmcalister
PR: prisma/docs#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/190-sveltekit.mdx
🪛 LanguageTool
content/800-guides/390-hono.mdx

[grammar] ~327-~327: Ensure spelling is correct
Context: ...les will automatically be set to Hono's contenxt, so dotenv can be skipped. ### 3.3....

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

⏰ 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). (3)
  • GitHub Check: Check links
  • GitHub Check: runner / linkspector
  • GitHub Check: Check internal links
🔇 Additional comments (1)
content/800-guides/320-permit-io-access-control.mdx (1)

255-255: Verify consistency of PrismaClient import paths across files.

The seed script (line 255) imports without a .js extension (../src/generated/prisma/client), while the middleware (line 457) imports with one (../generated/prisma/client.js). While both may work depending on your environment setup, consider ensuring consistency for clarity.

Can you confirm that both import paths correctly resolve to the generated Prisma Client at runtime? If possible, verify by checking that the prisma/schema.prisma generator block specifies an output path that matches these import locations.

Also applies to: 457-457

@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 2416
✅ Successful 2389
⏳ Timeouts 0
🔀 Redirected 0
👻 Excluded 26
❓ Unknown 0
🚫 Errors 0
⛔ Unsupported 1
Full Github Actions output

coderabbitai[bot]
coderabbitai bot previously approved these changes Oct 24, 2025
@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 2416
✅ Successful 2389
⏳ Timeouts 0
🔀 Redirected 0
👻 Excluded 26
❓ Unknown 0
🚫 Errors 0
⛔ Unsupported 1
Full Github Actions output

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: 4

Caution

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

⚠️ Outside diff range comments (2)
content/800-guides/340-ai-sdk-nextjs.mdx (1)

92-95: Update Prisma generator provider to prisma-client.

Line 93 shows provider = "prisma-client-js", but the PR is updating guides to use the new prisma-client provider. This should be aligned with the other guides in this PR.

 generator client {
-  provider = "prisma-client-js"
+  provider = "prisma-client"
   output   = "../app/generated/prisma"
 }
content/800-guides/360-embed-studio-nextjs.mdx (1)

182-233: Export the seed main() function for prisma.config.ts invocation.

The seed script at line 187 defines a main() function but does not export it. Since line 244 in prisma.config.ts references seed: \tsx prisma/seed.ts`, the seed file should follow the established pattern of exporting an async main()` function that can be called directly.

-async function main() {
+export async function main() {

Also, ensure the file invokes main after the function definition:

main()
  .catch((e) => {
    console.error(e)
    process.exit(1)
  })
  .finally(async () => {
    await prisma.$disconnect()
  })
🧹 Nitpick comments (2)
content/800-guides/320-permit-io-access-control.mdx (2)

254-256: Align seed script import path and extension with other guides.

The import at line 255 uses ../src/generated/prisma/client without the .js extension, which differs from other guides in this PR that use .js. For consistency and compatibility with TypeScript/ES modules, add the .js extension:

-import { PrismaClient } from '../src/generated/prisma/client';
+import { PrismaClient } from '../src/generated/prisma/client.js';

250-256: Consider standardizing seed script location.

This guide places the seed script at scripts/seed.ts (line 254 heading), while other guides in this PR use prisma/seed.ts. While both work, using the standard location (prisma/seed.ts) would improve consistency across the documentation and align with Prisma conventions.

📜 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 40d76a3 and 98d7b68.

📒 Files selected for processing (10)
  • content/800-guides/090-nextjs.mdx (6 hunks)
  • content/800-guides/160-tanstack-start.mdx (4 hunks)
  • content/800-guides/170-react-router-7.mdx (4 hunks)
  • content/800-guides/180-solid-start.mdx (4 hunks)
  • content/800-guides/190-sveltekit.mdx (4 hunks)
  • content/800-guides/220-astro.mdx (4 hunks)
  • content/800-guides/320-permit-io-access-control.mdx (6 hunks)
  • content/800-guides/340-ai-sdk-nextjs.mdx (3 hunks)
  • content/800-guides/350-authjs-nextjs.mdx (3 hunks)
  • content/800-guides/360-embed-studio-nextjs.mdx (8 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • content/800-guides/180-solid-start.mdx
  • content/800-guides/350-authjs-nextjs.mdx
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-10-09T21:32:50.340Z
Learnt from: aidankmcalister
PR: prisma/docs#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/170-react-router-7.mdx
  • content/800-guides/340-ai-sdk-nextjs.mdx
  • content/800-guides/190-sveltekit.mdx
  • content/800-guides/360-embed-studio-nextjs.mdx
  • content/800-guides/320-permit-io-access-control.mdx
  • content/800-guides/160-tanstack-start.mdx
  • content/800-guides/090-nextjs.mdx
📚 Learning: 2025-10-08T16:23:00.388Z
Learnt from: aidankmcalister
PR: prisma/docs#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/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). (3)
  • GitHub Check: Check links
  • GitHub Check: Check internal links
  • GitHub Check: runner / linkspector
🔇 Additional comments (3)
content/800-guides/220-astro.mdx (1)

85-89: ✓ Correct generator provider and prisma.config.ts setup.

The Prisma generator is properly updated to prisma-client provider, and the prisma.config.ts setup with dotenv integration looks correct.

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

100-103: ✓ Prisma configuration properly updated.

The generator provider is correctly set to prisma-client, and the dotenv/config integration in prisma.config.ts is properly configured.

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

247-249: Verify datasource URL configuration.

Line 248 uses env('DIRECT_URL') for the datasource, but most other guides in this PR use env('DATABASE_URL'). Confirm this is intentional for this guide or update to match the standard pattern used elsewhere for consistency.

   datasource: {
-    url: env('DIRECT_URL'),
+    url: env('DATABASE_URL'),
   },

@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 2416
✅ Successful 2389
⏳ Timeouts 0
🔀 Redirected 0
👻 Excluded 26
❓ Unknown 0
🚫 Errors 0
⛔ Unsupported 1
Full Github Actions output

@mhartington mhartington force-pushed the chore/update-guides-for-new-config branch from e569d32 to 3eb8f84 Compare October 24, 2025 19:21
@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 2416
✅ Successful 2388
⏳ Timeouts 0
🔀 Redirected 0
👻 Excluded 26
❓ Unknown 0
🚫 Errors 1
⛔ Unsupported 1

Errors per input

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

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: 1

♻️ Duplicate comments (1)
content/800-guides/390-hono.mdx (1)

292-292: Fix spelling error and improve grammatical clarity in environment variables section.

Line 292 contains awkward phrasing, and Line 327 contains a spelling error.

At Line 292, change:

- By default, Hono does not load any environment variables from a `.env`. `dotenv` handles this and will be read that file and expose them via `process.env`.
+ By default, Hono does not load any environment variables from a `.env`. `dotenv` handles this and will read that file and expose them via `process.env`.

At Line 327, fix the spelling error:

- If using Cloudflare Workers, the environment variables will automatically be set to Hono's contenxt, so `dotenv` can be skipped.
+ If using Cloudflare Workers, the environment variables will automatically be set to Hono's context, so `dotenv` can be skipped.

Also applies to: 327-327

📜 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 e569d32 and 3eb8f84.

📒 Files selected for processing (13)
  • content/800-guides/080-turborepo.mdx (2 hunks)
  • content/800-guides/090-nextjs.mdx (6 hunks)
  • content/800-guides/160-tanstack-start.mdx (4 hunks)
  • content/800-guides/170-react-router-7.mdx (4 hunks)
  • content/800-guides/180-solid-start.mdx (4 hunks)
  • content/800-guides/190-sveltekit.mdx (4 hunks)
  • content/800-guides/220-astro.mdx (4 hunks)
  • content/800-guides/320-permit-io-access-control.mdx (6 hunks)
  • content/800-guides/340-ai-sdk-nextjs.mdx (3 hunks)
  • content/800-guides/350-authjs-nextjs.mdx (3 hunks)
  • content/800-guides/360-embed-studio-nextjs.mdx (8 hunks)
  • content/800-guides/370-bun.mdx (6 hunks)
  • content/800-guides/390-hono.mdx (8 hunks)
🚧 Files skipped from review as they are similar to previous changes (3)
  • content/800-guides/080-turborepo.mdx
  • content/800-guides/340-ai-sdk-nextjs.mdx
  • content/800-guides/190-sveltekit.mdx
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-10-09T21:32:50.340Z
Learnt from: aidankmcalister
PR: prisma/docs#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/350-authjs-nextjs.mdx
  • content/800-guides/180-solid-start.mdx
  • content/800-guides/320-permit-io-access-control.mdx
  • content/800-guides/170-react-router-7.mdx
  • content/800-guides/090-nextjs.mdx
  • content/800-guides/360-embed-studio-nextjs.mdx
  • content/800-guides/160-tanstack-start.mdx
  • content/800-guides/390-hono.mdx
📚 Learning: 2025-10-08T16:23:00.388Z
Learnt from: aidankmcalister
PR: prisma/docs#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/180-solid-start.mdx
🪛 LanguageTool
content/800-guides/390-hono.mdx

[grammar] ~327-~327: Ensure spelling is correct
Context: ...les will automatically be set to Hono's contenxt, so dotenv can be skipped. ### 3.3....

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

⏰ 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). (2)
  • GitHub Check: Check internal links
  • GitHub Check: runner / linkspector
🔇 Additional comments (4)
content/800-guides/370-bun.mdx (1)

45-47: Verify that @prisma/client can locate the generated client at custom output path.

Line 46 installs @prisma/client, but line 98 specifies a custom output path ("../generated/prisma"). The seed script (line 132) and database utility (line 122) then import from "./generated/prisma/client". Verify that the generated client is correctly created at this custom output location and that the import paths work as expected after running migrations.

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

457-457: Verify TypeScript import with .js extension is intentional.

The middleware file imports '../generated/prisma/client.js' with a .js file extension in a TypeScript file (line 457). This is unusual and typically requires specific configuration (e.g., allowJs: true or ESM with --experimental-require-module in Node.js). Verify that this import path works in your project's build and runtime configuration. If this is meant to be '../generated/prisma/client' (without .js), it should be corrected to match standard TypeScript conventions.


204-219: Excellent dotenv integration in prisma.config.ts.

The explicit import 'dotenv/config' at line 206 ensures environment variables are properly loaded from the .env file before the configuration is evaluated. This pattern is correct and should be consistent across all guides using prisma.config.ts. ✓

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

235-251: Verify datasource URL configuration in prisma.config.ts.

Line 248 uses env('DIRECT_URL') while earlier sections reference DATABASE_URL. This pattern (DIRECT_URL for seed operations, DATABASE_URL for pooled connections) is valid for production Next.js with edge runtime, but the guide should clarify this distinction. Currently, readers might be confused about which variable to use in their .env file.

Consider adding a note explaining why DIRECT_URL is used in this specific section and how it differs from the DATABASE_URL mentioned in section 2.2.

@mhartington mhartington merged commit 46e6dd8 into main Oct 24, 2025
8 of 9 checks passed
@mhartington mhartington deleted the chore/update-guides-for-new-config branch October 24, 2025 19:43
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