Skip to content

docs(docs): added bun workspace guide#7469

Merged
aidankmcalister merged 6 commits intomainfrom
docs(docs)/bun-workspace-guide
Feb 5, 2026
Merged

docs(docs): added bun workspace guide#7469
aidankmcalister merged 6 commits intomainfrom
docs(docs)/bun-workspace-guide

Conversation

@aidankmcalister
Copy link
Member

@aidankmcalister aidankmcalister commented Feb 3, 2026

Linear: DR-6971

Summary by CodeRabbit

  • Documentation
    • Added a comprehensive guide on using Prisma ORM with Postgres in Bun workspaces monorepos — includes project structure, creating a shared database package, schema/client configuration, seeding, monorepo scripts, Next.js integration, environment handling, and tooling.
    • Added the new guide to the Guides sidebar.
    • Removed the "Postgres + Nuxt Starter" template link from the Vercel integration docs.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2026

Dangerous URL check

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

@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2026

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 3, 2026

Walkthrough

Adds a new Bun workspaces guide for using Prisma, registers the guide in the site sidebar, and removes a template link from the Vercel + Postgres integration doc.

Changes

Cohort / File(s) Summary
Bun workspaces guide
content/800-guides/460-bun-workspaces.mdx
New documentation file with step‑by‑step instructions for configuring Prisma and Postgres in a Bun workspaces monorepo, including project layout, shared Prisma package, schema/client setup, seeding, root scripts, and Next.js integration.
Navigation configuration
sidebars.ts
Added guides/bun-workspaces to the Development Tools guides list so the new guide appears in the site sidebar.
Vercel integration doc
content/250-postgres/350-integrations/200-vercel.mdx
Removed the "Postgres + Nuxt Starter" template link from the Templates list (single-line content deletion).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 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 directly summarizes the main change: adding a Bun workspace 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.


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

@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2026

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

github-actions bot commented Feb 3, 2026

🍈 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 2314
✅ Successful 2282
⏳ Timeouts 0
🔀 Redirected 4
👻 Excluded 26
❓ Unknown 0
🚫 Errors 1
⛔ Unsupported 1

Errors per input

Errors in 250-postgres/350-integrations/200-vercel.mdx

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Feb 3, 2026

Deploying docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 12dc30c
Status: ✅  Deploy successful!
Preview URL: https://a59eafa0.docs-51g.pages.dev
Branch Preview URL: https://docs-docs--bun-workspace-gui.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: 1

🤖 Fix all issues with AI agents
In `@content/800-guides/460-bun-workspaces.mdx`:
- Around line 100-108: The Prisma schema's datasource block (datasource db) is
missing the required url field; update the datasource db block in
prisma/schema.prisma to include a url that references the environment variable
(use env("DATABASE_URL")) so Prisma schema validation and CLI commands succeed.
🧹 Nitpick comments (1)
content/800-guides/460-bun-workspaces.mdx (1)

155-176: Align connection string examples with docs convention.

Use the template-literal pattern for env-based connection strings in adapter examples for consistency.

♻️ Suggested update (apply in both client.ts and seed.ts snippets)
-import { PrismaPg } from "@prisma/adapter-pg";
-
-const adapter = new PrismaPg({
-  connectionString: process.env.DATABASE_URL,
-});
+import { PrismaPg } from "@prisma/adapter-pg";
+
+const connectionString = `${process.env.DATABASE_URL}`;
+const adapter = new PrismaPg({
+  connectionString,
+});
Based on learnings, "In Prisma docs, when showing examples of instantiating driver adapters with connection strings from environment variables, use the template literal pattern `const connectionString = `${process.env.DATABASE_URL}`` for consistency across all database adapter examples (PostgreSQL, MySQL/MariaDB, etc.)."

Also applies to: 190-200

coderabbitai[bot]
coderabbitai bot previously approved these changes Feb 3, 2026
coderabbitai[bot]
coderabbitai bot previously approved these changes Feb 3, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2026

Images automagically compressed by Calibre's image-actions

Compression reduced images by 84.5%, saving 340.4 KB.

Filename Before After Improvement Visual comparison
static/img/guides/prisma-bun-workspaces-cover.png 402.9 KB 62.5 KB 84.5% View diff

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

🤖 Fix all issues with AI agents
In `@content/800-guides/460-bun-workspaces.mdx`:
- Around line 94-97: Update the description for prisma.config.ts to reflect
Prisma v7's generated template: state that the file imports "dotenv/config" and
uses env("DATABASE_URL") from the prisma/config module (not process.env),
replacing the prior claim that it "uses process.env and expects dotenv";
reference prisma.config.ts, the env("DATABASE_URL") call, and the
"dotenv/config" import so the text matches the actual output of prisma init
--db.
🧹 Nitpick comments (1)
content/800-guides/460-bun-workspaces.mdx (1)

160-162: Use the standard connectionString template-literal pattern in adapter examples.
Keeps consistency across docs and avoids mixing styles in adjacent snippets.

Proposed edit (client.ts and seed.ts)
-const adapter = new PrismaPg({
-  connectionString: process.env.DATABASE_URL,
-});
+const connectionString = `${process.env.DATABASE_URL}`;
+const adapter = new PrismaPg({
+  connectionString,
+});
@@
-const adapter = new PrismaPg({
-  connectionString: process.env.DATABASE_URL!,
-});
+const connectionString = `${process.env.DATABASE_URL}`;
+const adapter = new PrismaPg({
+  connectionString,
+});

Based on learnings: In Prisma docs, when showing examples of instantiating driver adapters with connection strings from environment variables, use the template literal pattern const connectionString = ${process.env.DATABASE_URL}`` for consistency across all database adapter examples (PostgreSQL, MySQL/MariaDB, etc.).

Also applies to: 196-198

@aidankmcalister aidankmcalister merged commit 81e7635 into main Feb 5, 2026
9 checks passed
@aidankmcalister aidankmcalister deleted the docs(docs)/bun-workspace-guide branch February 5, 2026 16:17
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