Skip to content

DR-7287 | docs: add Deno runtime guide#7505

Open
ArthurGamby wants to merge 1 commit intomainfrom
dr-7287-new-guide-deno-prisma
Open

DR-7287 | docs: add Deno runtime guide#7505
ArthurGamby wants to merge 1 commit intomainfrom
dr-7287-new-guide-deno-prisma

Conversation

@ArthurGamby
Copy link
Contributor

@ArthurGamby ArthurGamby commented Feb 17, 2026

Summary by CodeRabbit

  • Documentation
    • Added a complete guide for integrating Prisma ORM with Prisma Postgres in Deno environments, including project setup, configuration, schema updates, database seeding, and example server implementation.

@vercel
Copy link

vercel bot commented Feb 17, 2026

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

Project Deployment Actions Updated (UTC)
docs Error Error Feb 17, 2026 10:23am

Request Review

@github-actions
Copy link
Contributor

🍈 Lychee Link Check Report

3664 links: ✅ 2979 OK | 🚫 19 errors | 🔀 0 redirects | 👻 664 excluded

❌ Errors

./apps/docs/content/docs.v6/(index)/prisma-orm/add-to-existing-project/mongodb.mdx

./apps/docs/content/docs.v6/(index)/prisma-orm/quickstart/mongodb.mdx

./apps/docs/content/docs.v6/ai/index.mdx

./apps/docs/content/docs.v6/orm/more/comparisons/prisma-and-drizzle.mdx

./apps/docs/content/docs.v6/orm/more/dev-environment/editor-setup.mdx

  • [503] https://fig.io/ | Rejected status code (this depends on your "accept" configuration): Service Unavailable

./apps/docs/content/docs.v6/orm/overview/introduction/should-you-use-prisma.mdx

./apps/docs/content/docs.v6/orm/overview/prisma-in-your-stack/graphql.mdx

./apps/docs/content/docs.v6/orm/prisma-client/setup-and-configuration/databases-connections/index.mdx

./apps/docs/content/docs.v6/orm/prisma-client/testing/integration-testing.mdx

./apps/docs/content/docs.v6/orm/prisma-client/testing/unit-testing.mdx

./apps/docs/content/docs.v6/orm/prisma-schema/overview/generators.mdx

./apps/docs/content/docs/(index)/prisma-orm/add-to-existing-project/mongodb.mdx

./apps/docs/content/docs/(index)/prisma-orm/quickstart/mongodb.mdx

./apps/docs/content/docs/ai/index.mdx

./apps/docs/content/docs/orm/more/comparisons/prisma-and-drizzle.mdx

./apps/docs/content/docs/orm/more/dev-environment/editor-setup.mdx

  • [503] https://fig.io/ | Rejected status code (this depends on your "accept" configuration): Service Unavailable

./apps/docs/content/docs/orm/prisma-client/testing/integration-testing.mdx

./apps/docs/content/docs/orm/prisma-client/testing/unit-testing.mdx

./apps/docs/content/docs/orm/prisma-schema/overview/generators.mdx


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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 17, 2026

Walkthrough

A new Deno runtime guide is added to the Prisma documentation, detailing setup, configuration, schema updates, seeding, and running a PostgreSQL-backed HTTP server. The navigation metadata is updated to reference this new guide.

Changes

Cohort / File(s) Summary
Deno Runtime Documentation
apps/docs/content/docs/guides/runtimes/deno.mdx
New comprehensive guide covering Prisma ORM integration with Deno, including project setup, schema configuration, database seeding, and example server implementation.
Navigation Metadata
apps/docs/content/docs/guides/runtimes/meta.json
Updated pages array to include the new Deno guide alongside existing Bun runtime documentation.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 3
✅ 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 clearly and concisely describes the main change: adding a Deno runtime guide to the documentation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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


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.

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

🧹 Nitpick comments (3)
apps/docs/content/docs/guides/runtimes/deno.mdx (3)

109-124: The section title says "direct connection" but the steps describe creating an API key — a brief clarification would help.

Section 2.3 walks users through creating an API key to get a direct connection string, but a reader unfamiliar with Prisma Postgres might not immediately understand why an API key yields a postgres:// connection string. Consider adding a one-liner explaining the relationship, e.g., "Prisma Postgres provides direct TCP connection strings through API keys."

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/docs/content/docs/guides/runtimes/deno.mdx` around lines 109 - 124,
Clarify that creating an API key yields a direct TCP connection string by adding
a one-line explanation under the "2.3. Configure environment variables for
direct connection" heading (e.g., mention that Prisma Postgres issues direct
TCP/postgres:// connection strings via API keys), and update the `.env` example
comment near the DATABASE_URL entries to reflect that the API key provides the
direct connection string so readers understand why they create an API key to get
a postgres:// URL.

174-185: Consider noting why db.ts isn't reused in the seed script.

The seed script at prisma/seed.ts (lines 192–201) duplicates the PrismaClient + PrismaPg adapter setup from db.ts (lines 175–184). This is actually fine since seed scripts run independently via prisma db seed, but a brief comment in the guide explaining this choice would help readers understand why the shared db.ts module isn't imported. Something like: "We create a separate client instance here because the seed script runs independently."

Also applies to: 191-201

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/docs/content/docs/guides/runtimes/deno.mdx` around lines 174 - 185, Add
a brief explanatory comment in the guide near the db.ts/prisma/seed.ts examples
clarifying why the seed script creates its own PrismaClient and PrismaPg adapter
instead of importing db.ts: mention that prisma/seed.ts runs independently via
`prisma db seed` (separate process), so it must instantiate its own client
(PrismaClient + PrismaPg) and therefore we intentionally duplicate the setup for
the `prisma` variable rather than reusing db.ts.

263-291: The server handler could benefit from basic error handling.

Right now, if the database query fails (connection issue, missing table, etc.), the server will return an unhandled promise rejection or a generic 500. For a guide that newcomers will follow, wrapping the handler logic in a try/catch with a meaningful error response teaches a good habit early.

💡 Suggested improvement
 async function handler(req: Request): Promise<Response> {
   const { pathname } = new URL(req.url);
 
   // Skip favicon route
   if (pathname === "/favicon.ico") {
     return new Response(null, { status: 204 });
   }
 
+  try {
     // Return all users
     const users = await prisma.user.findMany();
 
     // Count all users
     const count = await prisma.user.count();
 
     // Format the response with JSON
     return new Response(
       JSON.stringify({
         users: users,
         totalUsers: count,
       }),
       { headers: { "Content-Type": "application/json" } },
     );
+  } catch (error) {
+    console.error("Database query failed:", error);
+    return new Response(
+      JSON.stringify({ error: "Internal Server Error" }),
+      { status: 500, headers: { "Content-Type": "application/json" } },
+    );
+  }
 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/docs/content/docs/guides/runtimes/deno.mdx` around lines 263 - 291, The
handler currently performs prisma.user.findMany() and prisma.user.count()
without error handling; wrap the body of the async function handler(req:
Request) in a try/catch so database/query failures are caught, log the error
(e.g., console.error or a logger) inside the catch, and return a Response with
status 500 and a JSON error payload and Content-Type header; keep the existing
favicon shortcut outside or before the try so it still returns 204 without
querying the DB, and ensure Deno.serve({ port: 8000 }, handler) continues to use
the updated handler.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@apps/docs/content/docs/guides/runtimes/deno.mdx`:
- Around line 1-5: The frontmatter is missing required meta fields; add
metaTitle and metaDescription string entries to the frontmatter (e.g., set
metaTitle to the existing title value "Deno" and metaDescription to the existing
description "Learn how to use Prisma ORM in a Deno application with Prisma
Postgres") so that metaTitle and metaDescription are defined as strings
alongside title and description.

---

Nitpick comments:
In `@apps/docs/content/docs/guides/runtimes/deno.mdx`:
- Around line 109-124: Clarify that creating an API key yields a direct TCP
connection string by adding a one-line explanation under the "2.3. Configure
environment variables for direct connection" heading (e.g., mention that Prisma
Postgres issues direct TCP/postgres:// connection strings via API keys), and
update the `.env` example comment near the DATABASE_URL entries to reflect that
the API key provides the direct connection string so readers understand why they
create an API key to get a postgres:// URL.
- Around line 174-185: Add a brief explanatory comment in the guide near the
db.ts/prisma/seed.ts examples clarifying why the seed script creates its own
PrismaClient and PrismaPg adapter instead of importing db.ts: mention that
prisma/seed.ts runs independently via `prisma db seed` (separate process), so it
must instantiate its own client (PrismaClient + PrismaPg) and therefore we
intentionally duplicate the setup for the `prisma` variable rather than reusing
db.ts.
- Around line 263-291: The handler currently performs prisma.user.findMany() and
prisma.user.count() without error handling; wrap the body of the async function
handler(req: Request) in a try/catch so database/query failures are caught, log
the error (e.g., console.error or a logger) inside the catch, and return a
Response with status 500 and a JSON error payload and Content-Type header; keep
the existing favicon shortcut outside or before the try so it still returns 204
without querying the DB, and ensure Deno.serve({ port: 8000 }, handler)
continues to use the updated handler.

Comment on lines +1 to +5
---
title: Deno
description: Learn how to use Prisma ORM in a Deno application with Prisma Postgres
url: /guides/runtimes/deno
---
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Find all runtime guide files
fd "\.mdx$" apps/docs/content/docs/guides/runtimes/ -type f | head -20

Repository: prisma/web

Length of output: 224


🏁 Script executed:

#!/bin/bash
# Check the frontmatter of the Bun runtime guide for comparison
if fd "bun.mdx" apps/docs/content/docs/guides/runtimes/ > /dev/null 2>&1; then
  fd "bun.mdx" apps/docs/content/docs/guides/runtimes/ --exec head -15 {}
else
  echo "bun.mdx not found, searching for any runtime guides..."
  fd "\.mdx$" apps/docs/content/docs/guides/runtimes/ --exec head -15 {} \; | head -40
fi

Repository: prisma/web

Length of output: 701


🏁 Script executed:

#!/bin/bash
# Also check the current deno.mdx file to see its full frontmatter
if [ -f "apps/docs/content/docs/guides/runtimes/deno.mdx" ]; then
  head -20 apps/docs/content/docs/guides/runtimes/deno.mdx
fi

Repository: prisma/web

Length of output: 963


Frontmatter is missing metaTitle and metaDescription — this is blocking your CI pipeline.

The pipeline error states: "Invalid frontmatter: metaTitle and metaDescription must be strings but were undefined." Looking at the Bun runtime guide, both fields are required and explicitly declared. Your current frontmatter uses title and description, but the documentation system requires metaTitle and metaDescription to be present.

🔧 Proposed fix
 ---
 title: Deno
 description: Learn how to use Prisma ORM in a Deno application with Prisma Postgres
+metaTitle: Deno
+metaDescription: Learn how to use Prisma ORM in a Deno application with Prisma Postgres
 url: /guides/runtimes/deno
 ---
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
---
title: Deno
description: Learn how to use Prisma ORM in a Deno application with Prisma Postgres
url: /guides/runtimes/deno
---
---
title: Deno
description: Learn how to use Prisma ORM in a Deno application with Prisma Postgres
metaTitle: Deno
metaDescription: Learn how to use Prisma ORM in a Deno application with Prisma Postgres
url: /guides/runtimes/deno
---
🧰 Tools
🪛 GitHub Actions: Links

[error] 1-1: Invalid frontmatter: metaTitle and metaDescription must be strings but were undefined. Lint:links step failed with exit code 1.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/docs/content/docs/guides/runtimes/deno.mdx` around lines 1 - 5, The
frontmatter is missing required meta fields; add metaTitle and metaDescription
string entries to the frontmatter (e.g., set metaTitle to the existing title
value "Deno" and metaDescription to the existing description "Learn how to use
Prisma ORM in a Deno application with Prisma Postgres") so that metaTitle and
metaDescription are defined as strings alongside title and description.

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