Skip to content

docs(docs): added prisma next overview#7568

Open
aidankmcalister wants to merge 4 commits intomainfrom
docs/prisma-next-overview
Open

docs(docs): added prisma next overview#7568
aidankmcalister wants to merge 4 commits intomainfrom
docs/prisma-next-overview

Conversation

@aidankmcalister
Copy link
Member

@aidankmcalister aidankmcalister commented Feb 26, 2026

Summary by CodeRabbit

  • New Features
    • Added Mermaid diagram rendering support in docs (MDX component and rendering plugin).
  • Chores
    • Added Mermaid library as a documentation dependency.
  • Documentation
    • Added a comprehensive Prisma Next guide covering goals, architecture, workflows, examples, glossary and diagrams.
    • Added two new documentation entries to the ORM pages list.

@vercel
Copy link

vercel bot commented Feb 26, 2026

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

Project Deployment Actions Updated (UTC)
blog Ready Ready Preview, Comment Feb 27, 2026 4:13pm
docs Ready Ready Preview, Comment Feb 27, 2026 4:13pm
eclipse Ready Ready Preview, Comment Feb 27, 2026 4:13pm

Request Review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 26, 2026

Walkthrough

Adds Mermaid diagram support to the docs (dependency, MDX plugin, client-side Mermaid React component), registers the component for MDX, and adds a new "Prisma Next" docs page plus two placeholder entries in the ORM meta.json pages array.

Changes

Cohort / File(s) Summary
Documentation Metadata
apps/docs/content/docs/orm/meta.json
Inserted two placeholder page entries at the start of the pages array: "---TEMP Prisma Next---" and "...temp-next".
Package & MDX config
apps/docs/package.json, apps/docs/source.config.ts
Added mermaid dependency and wired remarkMdxMermaid into the MDX remarkPlugins list; also normalized badge string quotes in source.config.ts.
Mermaid component
apps/docs/src/components/mermaid.tsx
New client-side React component that dynamically imports Mermaid, caches imports/renders, guards SSR, initializes theme-aware config, and renders diagrams as SVG. Exports Mermaid({ chart }).
MDX component mapping
apps/docs/src/mdx-components.tsx
Imported and registered the new Mermaid component in the MDX components map so it can be used inside MDX files.
Documentation content
apps/docs/content/docs/orm/temp-next/index.mdx
Added a large new MDX page describing "Prisma Next" with frontmatter, examples, architecture discussion, and a Mermaid lifecycle diagram.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the primary change: adding a Prisma Next overview documentation page.

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


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

@argos-ci
Copy link

argos-ci bot commented Feb 26, 2026

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

Build Status Details Updated (UTC)
default (Inspect) ⚠️ Changes detected (Review) 1 removed Feb 27, 2026, 4:20 PM

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

🧹 Nitpick comments (2)
apps/docs/content/docs/orm/temp-next/how-prisma-next-works.mdx (1)

50-50: Prefer extensionless type import for copy-paste resilience.

Using ./contract.d can be resolution-sensitive in some TypeScript setups. ./contract is usually more portable when the file is contract.d.ts.

💡 Suggested tweak
-import type { Contract } from './contract.d';
+import type { Contract } from './contract';
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/docs/content/docs/orm/temp-next/how-prisma-next-works.mdx` at line 50,
Update the import to use an extensionless type specifier to avoid resolution
issues: replace the import reference that mentions './contract.d' in the file
(the line importing type Contract) with './contract' so the type import targets
the extensionless module (e.g., contract.d.ts) and is more portable across
TypeScript resolver configurations.
apps/docs/src/components/mermaid.tsx (1)

38-41: Use securityLevel: "strict" to harden security defaults.

While Mermaid diagrams in this codebase come from trusted documentation files, setting securityLevel: "loose" unnecessarily allows HTML tag rendering and click interactions in diagram content. Combining this with dangerouslySetInnerHTML at line 57 creates an unnecessary surface. Switching to "strict" (which encodes HTML and disables interactive callbacks) follows defense-in-depth principles and doesn't impact the diagram rendering since the current diagrams don't rely on these features.

Suggested fix
   mermaid.initialize({
     startOnLoad: false,
-    securityLevel: "loose",
+    securityLevel: "strict",
     fontFamily: "inherit",
     themeCSS: "margin: 1.5rem auto 0;",
     theme: resolvedTheme === "dark" ? "dark" : "default",
   });
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/docs/src/components/mermaid.tsx` around lines 38 - 41, Change the
mermaid initialization to use a stricter security posture: in the
mermaid.initialize call (the object that currently sets startOnLoad,
securityLevel, fontFamily, etc.) replace securityLevel: "loose" with
securityLevel: "strict" so HTML in diagrams is encoded and interactive callbacks
are disabled; ensure this is applied where mermaid.initialize is invoked and
verify any usage that injects diagram HTML (e.g., the component that uses
dangerouslySetInnerHTML for rendered diagrams) still functions without relying
on loose HTML rendering.
🤖 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/src/components/mermaid.tsx`:
- Around line 13-14: In the Mermaid component render logic, replace the implicit
early return when the mounted flag is false with an explicit return null;
specifically, in the block that currently does "if (!mounted) return;" change it
so the component returns null when !mounted before returning <MermaidContent
chart={chart} /> to follow React best practices and satisfy lint/type checks.
- Around line 46-49: The per-component caching using cachePromise with key
`${chart}-${resolvedTheme}` causes reused SVGs and ID collisions; change the
render so each instance calls mermaid.render independently rather than using the
shared cache. Replace the use(cachePromise(`${chart}-${resolvedTheme}`, ...))
call in mermaid.tsx with a per-instance promise that directly invokes
mermaid.render(id, chart.replaceAll("\\n", "\n")) (i.e., remove cachePromise and
its key), ensuring each component instance renders its own SVG and receives
unique internal IDs from mermaid.render.

---

Nitpick comments:
In `@apps/docs/content/docs/orm/temp-next/how-prisma-next-works.mdx`:
- Line 50: Update the import to use an extensionless type specifier to avoid
resolution issues: replace the import reference that mentions './contract.d' in
the file (the line importing type Contract) with './contract' so the type import
targets the extensionless module (e.g., contract.d.ts) and is more portable
across TypeScript resolver configurations.

In `@apps/docs/src/components/mermaid.tsx`:
- Around line 38-41: Change the mermaid initialization to use a stricter
security posture: in the mermaid.initialize call (the object that currently sets
startOnLoad, securityLevel, fontFamily, etc.) replace securityLevel: "loose"
with securityLevel: "strict" so HTML in diagrams is encoded and interactive
callbacks are disabled; ensure this is applied where mermaid.initialize is
invoked and verify any usage that injects diagram HTML (e.g., the component that
uses dangerouslySetInnerHTML for rendered diagrams) still functions without
relying on loose HTML rendering.

ℹ️ Review info

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 05aeef6 and 4d618e7.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (8)
  • apps/docs/content/docs/orm/meta.json
  • apps/docs/content/docs/orm/temp-next/how-prisma-next-works.mdx
  • apps/docs/content/docs/orm/temp-next/what-is-prisma-next.mdx
  • apps/docs/content/docs/orm/temp-next/why-prisma-next.mdx
  • apps/docs/package.json
  • apps/docs/source.config.ts
  • apps/docs/src/components/mermaid.tsx
  • apps/docs/src/mdx-components.tsx

@ArthurGamby
Copy link
Contributor

Nice work.
just a small nit.
Do we care about responsive or not ? (yet)
Love that mermaid feature but it was already limit on my laptop screen for full visibility, on mobile it's def too small

Screenshot 2026-02-27 at 15 31 24

Comment on lines 2 to 6
title: What is Prisma Next?
description: Define Prisma Next clearly and lock core terms for the rest of the docs.
url: /orm/temp-next/what-is-prisma-next
metaTitle: "What is Prisma Next contract-driven data access with verification"
metaDescription: "Learn what Prisma Next is and how Data Contracts, Contract Artifacts, and Verification-First Workflow enforce verified execution."
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want to display this description in the page ?

Image

Copy link
Member Author

Choose a reason for hiding this comment

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

We do, just an oversight with a poor description lol. I can get that updated.

Regarding the mermaid diagram (i can't reply to it's comment for some reason, so doing it here), I'll edit it to make it fit better. Ideally we'll create a mermaid eclipse component

I'm working on some large content changes for this PR so who knows if it'll even stay

coderabbitai[bot]
coderabbitai bot previously approved these changes Feb 27, 2026
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.

🧹 Nitpick comments (1)
apps/docs/content/docs/orm/temp-next/index.mdx (1)

13-13: Consider clarifying the phrasing.

The phrase "being built in the open as direction and architecture" reads a bit awkwardly. Consider rephrasing to something like "being built in the open as an architectural direction" or "being built in the open to explore direction and architecture" for improved clarity.

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

In `@apps/docs/content/docs/orm/temp-next/index.mdx` at line 13, The sentence
"Prisma Next is being built in the open as direction and architecture" is
awkward; update the copy in apps/docs/content/docs/orm/temp-next/index.mdx by
replacing that phrase with a clearer alternative such as "being built in the
open as an architectural direction" or "being built in the open to explore
direction and architecture" so the meaning reads naturally and unambiguously.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@apps/docs/content/docs/orm/temp-next/index.mdx`:
- Line 13: The sentence "Prisma Next is being built in the open as direction and
architecture" is awkward; update the copy in
apps/docs/content/docs/orm/temp-next/index.mdx by replacing that phrase with a
clearer alternative such as "being built in the open as an architectural
direction" or "being built in the open to explore direction and architecture" so
the meaning reads naturally and unambiguously.

ℹ️ Review info

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4d618e7 and 8983903.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (2)
  • apps/docs/content/docs/orm/temp-next/index.mdx
  • apps/docs/source.config.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/docs/source.config.ts

coderabbitai[bot]
coderabbitai bot previously approved these changes Feb 27, 2026
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: 3

🤖 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/orm/temp-next/index.mdx`:
- Line 42: Update the compound adjective in the sentence containing "ORM style"
to the hyphenated form "ORM-style" so the phrase reads "You can use a
model-first ORM-style query flow:"; locate and change the instance in the text
node where that sentence is defined (the sentence starting "You can use a
model-first...") in the index.mdx content.
- Line 6: Update the metaDescription string so lifecycle terms are
comma-separated for readability: change "Schema Data Contract Database Signing
and Verified Runtime Queries" to "Schema Data Contract, Database Signing, and
Verified Runtime Queries" within the metaDescription value so search/result
snippets scan more clearly.
- Around line 137-145: Shorten the long mermaid node labels in the flowchart
(nodes A, B, C, D) to avoid clipping on small viewports—e.g., change B from "2.
Data Contract" to "2. Contract", C from "3. Database Signing" to "3. DB
Signing", and D from "4. Verified Runtime Queries" to "4. Verified Queries"—and
add a short legend or sentence immediately above or below the diagram that maps
the short terms to the full phrases ("Contract = Data Contract", "DB Signing =
Database Signing", "Verified Queries = Verified Runtime Queries") so readers
still see full meanings.

ℹ️ Review info

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8983903 and d1e219c.

📒 Files selected for processing (1)
  • apps/docs/content/docs/orm/temp-next/index.mdx

description: Prisma Next is a new foundation for Prisma ORM with contract-driven architecture and verification-first workflows.
url: /orm/temp-next
metaTitle: What is Prisma Next? (Overview)
metaDescription: Learn what Prisma Next is, why it exists, and how Schema Data Contract Database Signing and Verified Runtime Queries work together.
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 | 🟡 Minor

Improve meta description readability for search/result snippets.

Line [6] currently runs core terms together; comma-separating the lifecycle terms makes this much easier to scan.

✏️ Proposed wording tweak
-metaDescription: Learn what Prisma Next is, why it exists, and how Schema Data Contract Database Signing and Verified Runtime Queries work together.
+metaDescription: Learn what Prisma Next is, why it exists, and how Schema, Data Contract, Database Signing, and Verified Runtime Queries work together.
📝 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
metaDescription: Learn what Prisma Next is, why it exists, and how Schema Data Contract Database Signing and Verified Runtime Queries work together.
metaDescription: Learn what Prisma Next is, why it exists, and how Schema, Data Contract, Database Signing, and Verified Runtime Queries work together.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/docs/content/docs/orm/temp-next/index.mdx` at line 6, Update the
metaDescription string so lifecycle terms are comma-separated for readability:
change "Schema Data Contract Database Signing and Verified Runtime Queries" to
"Schema Data Contract, Database Signing, and Verified Runtime Queries" within
the metaDescription value so search/result snippets scan more clearly.


Prisma Next is designed to keep developer ergonomics while improving control.

You can use a model-first ORM style query flow:
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 | 🟡 Minor

Use the compound modifier form: “ORM-style”.

Line [42] should hyphenate the compound adjective.

✏️ Proposed fix
-You can use a model-first ORM style query flow:
+You can use a model-first ORM-style query flow:
📝 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
You can use a model-first ORM style query flow:
You can use a model-first ORM-style query flow:
🧰 Tools
🪛 LanguageTool

[grammar] ~42-~42: Use a hyphen to join words.
Context: ... control. You can use a model-first ORM style query flow: ```ts const users = a...

(QB_NEW_EN_HYPHEN)

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

In `@apps/docs/content/docs/orm/temp-next/index.mdx` at line 42, Update the
compound adjective in the sentence containing "ORM style" to the hyphenated form
"ORM-style" so the phrase reads "You can use a model-first ORM-style query
flow:"; locate and change the instance in the text node where that sentence is
defined (the sentence starting "You can use a model-first...") in the index.mdx
content.

Comment on lines +137 to +145
```mermaid
flowchart TB
A("1. Schema")
B("2. Data Contract")
C("3. Database Signing")
D("4. Verified Runtime Queries")

A --> B --> C --> D
```
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 | 🟠 Major

Diagram labels are likely too wide for smaller viewports.

Given reported visibility issues, these node labels should be shortened in-diagram and mapped to full terms in nearby text to avoid clipping/shrinking on laptop/mobile.

📉 Proposed responsive-friendly diagram text
 ```mermaid
 flowchart TB
   A("1. Schema")
-  B("2. Data Contract")
-  C("3. Database Signing")
-  D("4. Verified Runtime Queries")
+  B("2. Contract")
+  C("3. DB Signing")
+  D("4. Verified Queries")
 
   A --> B --> C --> D

+Lifecycle terms: Contract = Data Contract, DB Signing = Database Signing, Verified Queries = Verified Runtime Queries.

</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

Verify each finding against the current code and only fix it if needed.

In @apps/docs/content/docs/orm/temp-next/index.mdx around lines 137 - 145,
Shorten the long mermaid node labels in the flowchart (nodes A, B, C, D) to
avoid clipping on small viewports—e.g., change B from "2. Data Contract" to "2.
Contract", C from "3. Database Signing" to "3. DB Signing", and D from "4.
Verified Runtime Queries" to "4. Verified Queries"—and add a short legend or
sentence immediately above or below the diagram that maps the short terms to the
full phrases ("Contract = Data Contract", "DB Signing = Database Signing",
"Verified Queries = Verified Runtime Queries") so readers still see full
meanings.


</details>

<!-- fingerprinting:phantom:poseidon:hawk -->

<!-- This is an auto-generated comment by CodeRabbit -->

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.

2 participants