# Multiple databases

## [Introduction](#introduction)

This guide shows you how to use multiple databases using Prisma ORM in a single [Next.js app](https://nextjs.org/). You will learn how to connect to two different Prisma Postgres databases, manage migrations, and deploy your application to Vercel. This approach is useful for multi-tenant applications or when you need to separate concerns when managing connections to multiple databases.

## [Prerequisites](#prerequisites)

Before you begin, make sure that you have the following:

- Node.js 20+ installed.
- A [Prisma Data Platform account](https://pris.ly/pdp?utm_campaign=multi-client\&utm_source=docs).
- A Vercel account (if you plan to deploy your application).

## [1. Set up a Next.js project](#1-set-up-a-nextjs-project)

Create a new Next.js app using `create-next-app` from your desired directory:

:::code-group
```title="bun"
bunx create-next-app@latest my-multi-client-app
```

```bash title="pnpm"
pnpm dlx create-next-app@latest my-multi-client-app
```

```bash title="yarn"
yarn dlx create-next-app@latest my-multi-client-app
```

```bash title="npm"
npx create-next-app@latest my-multi-client-app
```
:::

You will be prompted to answer a few questions about your project. Select all of the defaults.

:::callout{intent="note"}
For completeness, those are:

- TypeScript
- ESLint
- Tailwind CSS
- No `src` directory
- App Router
- Turbopack
- Default custom import alias: `@/*`
:::

Then, navigate to the project directory:

```
cd my-multi-client-app
```

## [2. Set up your databases and Prisma Clients](#2-set-up-your-databases-and-prisma-clients)

In this section, you will create two separate Prisma Postgres instances, one for user data and one for post data. You will also configure the Prisma schema and environment variables for each.

First, install Prisma and the required dependencies:

:::code-group
```title="bun"
bun add prisma@prev tsx @types/pg --dev
```

```bash title="pnpm"
pnpm add prisma@prev tsx @types/pg --save-dev
```

```bash title="yarn"
yarn add prisma@prev tsx @types/pg --dev
```

```bash title="npm"
npm install prisma@prev tsx @types/pg --save-dev
```
:::

::::tabs
:::tab{title="bun"}
```
bun add @prisma/client@7 @prisma/adapter-pg dotenv pg
```
:::

:::tab{title="pnpm"}
```bash
pnpm add @prisma/client@7 @prisma/adapter-pg dotenv pg
```
:::

:::tab{title="yarn"}
```bash
yarn add @prisma/client@7 @prisma/adapter-pg dotenv pg
```
:::

:::tab{title="npm"}
```bash
npm install @prisma/client@7 @prisma/adapter-pg dotenv pg
```

> \[!NOTE]
> If you are using a different database provider (MySQL, SQL Server, SQLite), install the corresponding driver adapter package instead of `@prisma/adapter-pg`. For more information, see [Database drivers](/guides/core-concepts-v7-supported-databases-database-drivers).

You have installed the required dependencies for the project.
:::
::::

:::callout{intent="note"}
If you are using a different database provider (MySQL, SQL Server, SQLite), install the corresponding driver adapter package instead of `@prisma/adapter-pg`. For more information, see [Database drivers](/guides/core-concepts-v7-supported-databases-database-drivers).
:::

You have installed the required dependencies for the project.

### [2.1. Create a Prisma Postgres instance to contain user data](#21-create-a-prisma-postgres-instance-to-contain-user-data)

Initialize Prisma with a [Prisma Postgres](/guides/introduction-2-postgres) instance by running:

::::tabs
:::tab{title="bun"}
```
bunx --bun prisma@prev init --db
```
:::

:::tab{title="pnpm"}
```bash
pnpm dlx prisma@prev init --db
```
:::

:::tab{title="yarn"}
```bash
yarn dlx prisma@prev init --db
```
:::

:::tab{title="npm"}
```bash
npx prisma@prev init --db
```

> \[!NOTE]
> If you are not using a Prisma Postgres database, do not use the `--db` flag. Instead, create two PostgreSQL database instances and add their connection URLs to the `.env` file as `PPG_USER_DATABASE_URL` and `PPG_POST_DATABASE_URL`.

Follow the prompts to name your project and choose a database region.

The `prisma@prev init --db` command:

- Connects your CLI to your [Prisma Data Platform](https://console.prisma.io/?utm_source=docs\&utm_medium=content\&utm_content=guides) account. If you are not logged in or do not have an account, your browser will open to guide you through creating a new account or signing into your existing one.
- Creates a `prisma` directory containing a `schema.prisma` file for your database models.
- Creates a `.env` file with your `DATABASE_URL` (e.g., `DATABASE_URL="postgresql://user:password@host:5432/database?sslmode=require"`).

Rename the `prisma` folder to `prisma-user-database`:

```bash
mv prisma prisma-user-database
```

Edit your `.env` file to rename `DATABASE_URL` to `PPG_USER_DATABASE_URL`:

```bash title=".env"
DATABASE_URL="postgresql://user:password@host:5432/database?sslmode=require" # [!code --]
PPG_USER_DATABASE_URL="postgresql://user:password@host:5432/database?sslmode=require" # [!code ++]
```

Open `prisma-user-database/schema.prisma` file and update it to define a `User` model. Also, set the environment variable and specify a [custom `output` directory](/guides/reference-6-v7-reference-prisma-schema-reference#fields-for-prisma-client-provider) for the generated Prisma Client:

```prisma title="prisma-user-database/schema.prisma"
generator client {
  provider = "prisma-client"
  output = "../prisma-user-database/user-database-client-types" // [!code ++]
}

datasource db {
  provider = "postgresql"
}

model User { // [!code ++]
  id    Int     @id @default(autoincrement()) // [!code ++]
  email String  @unique // [!code ++]
  name  String? // [!code ++]
} // [!code ++]
```

Create a `prisma.config.ts` file for the user database:

```typescript title="prisma-user-database/prisma.config.ts"
import "dotenv/config"; // [!code ++]
import { defineConfig, env } from "prisma/config"; // [!code ++]
// [!code ++]
export default defineConfig({
  // [!code ++]
  schema: "prisma-user-database/schema.prisma", // [!code ++]
  migrations: {
    // [!code ++]
    path: "prisma-user-database/migrations", // [!code ++]
  }, // [!code ++]
  datasource: {
    // [!code ++]
    url: env("PPG_USER_DATABASE_URL"), // [!code ++]
  }, // [!code ++]
}); // [!code ++]
```

> \[!NOTE]
> You'll need to install the `dotenv` package if you haven't already:
>
> #### bun

> ````
> ```bash
> bun add dotenv
> ```
> ````
>
> #### pnpm

> ````
> ```bash
> pnpm add dotenv
> ```
> ````
>
> #### yarn

> ````
> ```bash
> yarn add dotenv
> ```
> ````
>
> #### npm

> ````
> ```bash
> npm install dotenv
> ```
> ````

Your user database schema is now ready.
:::
::::

:::callout{intent="note"}
If you are not using a Prisma Postgres database, do not use the `--db` flag. Instead, create two PostgreSQL database instances and add their connection URLs to the `.env` file as `PPG_USER_DATABASE_URL` and `PPG_POST_DATABASE_URL`.
:::

Follow the prompts to name your project and choose a database region.

The `prisma@prev init --db` command:

- Connects your CLI to your [Prisma Data Platform](https://console.prisma.io/?utm_source=docs\&utm_medium=content\&utm_content=guides) account. If you are not logged in or do not have an account, your browser will open to guide you through creating a new account or signing into your existing one.
- Creates a `prisma` directory containing a `schema.prisma` file for your database models.
- Creates a `.env` file with your `DATABASE_URL` (e.g., `DATABASE_URL="postgresql://user:password@host:5432/database?sslmode=require"`).

Rename the `prisma` folder to `prisma-user-database`:

```
mv prisma prisma-user-database
```

Edit your `.env` file to rename `DATABASE_URL` to `PPG_USER_DATABASE_URL`:

```title=".env"
DATABASE_URL="postgresql://user:password@host:5432/database?sslmode=require"

PPG_USER_DATABASE_URL="postgresql://user:password@host:5432/database?sslmode=require"
```

Open `prisma-user-database/schema.prisma` file and update it to define a `User` model. Also, set the environment variable and specify a [custom `output` directory](/guides/reference-6-v7-reference-prisma-schema-reference#fields-for-prisma-client-provider) for the generated Prisma Client:

```title="prisma-user-database/schema.prisma"
generator client {

  provider = "prisma-client"

  output = "../prisma-user-database/user-database-client-types"

}

datasource db {

  provider = "postgresql"

}

model User { 

  id    Int     @id @default(autoincrement()) 

  email String  @unique

  name  String?

} 
```

Create a `prisma.config.ts` file for the user database:

```title="prisma-user-database/prisma.config.ts"
import "dotenv/config"; 

import { defineConfig, env } from "prisma/config"; 

export default defineConfig({

  schema: "prisma-user-database/schema.prisma", 

  migrations: {

    path: "prisma-user-database/migrations", 

  }, 

  datasource: {

    url: env("PPG_USER_DATABASE_URL"), 

  }, 

}); 
```

:::::callout{intent="note"}
You'll need to install the `dotenv` package if you haven't already:

::::tabs
:::tab{title="bun"}
```
bun add dotenv
```
:::

:::tab{title="pnpm"}
```bash
pnpm prisma init
pnpm dlx create-db
```
:::

:::tab{title="yarn"}
```bash
yarn prisma init
yarn dlx create-db
```
:::

:::tab{title="npm"}
```bash
npx prisma init
npx create-db
```

Replace the generated `DATABASE_URL` in your `.env` file with the value from `npx create-db`, then rename the new `prisma` folder to `prisma-post-database`:

```bash
mv prisma prisma-post-database
```

Rename the `DATABASE_URL` variable in `.env` to `PPG_POST_DATABASE_URL`:

```bash title=".env"
DATABASE_URL="postgresql://user:password@host:5432/database?sslmode=require" # [!code --]
PPG_POST_DATABASE_URL="postgresql://user:password@host:5432/database?sslmode=require" # [!code ++]
```

Edit the `prisma-post-database/schema.prisma` file to define a `Post` model. Also, update the datasource URL and set a [custom `output` directory](/guides/reference-6-v7-reference-prisma-schema-reference#fields-for-prisma-client-provider):

```prisma title="prisma-post-database/schema.prisma"
generator client {
  provider = "prisma-client"
  output = "../prisma-post-database/post-database-client-types" // [!code ++]
}

datasource db {
  provider = "postgresql"
}

model Post { // [!code ++]
  id    Int     @id @default(autoincrement()) // [!code ++]
  title String // [!code ++]
  content  String? // [!code ++]
} // [!code ++]
```

Create a `prisma.config.ts` file for the post database:

```typescript title="prisma-post-database/prisma.config.ts"
import "dotenv/config"; // [!code ++]
import { defineConfig, env } from "prisma/config"; // [!code ++]
// [!code ++]
export default defineConfig({
  // [!code ++]
  schema: "prisma-post-database/schema.prisma", // [!code ++]
  migrations: {
    // [!code ++]
    path: "prisma-post-database/migrations", // [!code ++]
  }, // [!code ++]
  datasource: {
    // [!code ++]
    url: env("PPG_POST_DATABASE_URL"), // [!code ++]
  }, // [!code ++]
}); // [!code ++]
```

Your post database schema is now set.
:::
::::
:::::

Your user database schema is now ready.

### [2.2. Create a Prisma Postgres instance for post data](#22-create-a-prisma-postgres-instance-for-post-data)

Repeat the initialization for the post database:

::::tabs
:::tab{title="bun"}
```
bunx --bun prisma init

bunx create-db
```
:::

:::tab{title="pnpm"}
```bash
pnpm run migrate
```
:::

:::tab{title="yarn"}
```bash
yarn migrate
```
:::

:::tab{title="npm"}
```bash
npm run migrate
```

When prompted, name the migration for each database accordingly.
:::
::::

Replace the generated `DATABASE_URL` in your `.env` file with the value from `npx create-db`, then rename the new `prisma` folder to `prisma-post-database`:

```
mv prisma prisma-post-database
```

Rename the `DATABASE_URL` variable in `.env` to `PPG_POST_DATABASE_URL`:

```title=".env"
DATABASE_URL="postgresql://user:password@host:5432/database?sslmode=require"

PPG_POST_DATABASE_URL="postgresql://user:password@host:5432/database?sslmode=require"
```

Edit the `prisma-post-database/schema.prisma` file to define a `Post` model. Also, update the datasource URL and set a [custom `output` directory](/guides/reference-6-v7-reference-prisma-schema-reference#fields-for-prisma-client-provider):

```title="prisma-post-database/schema.prisma"
generator client {

  provider = "prisma-client"

  output = "../prisma-post-database/post-database-client-types"

}

datasource db {

  provider = "postgresql"

}

model Post { 

  id    Int     @id @default(autoincrement()) 

  title String

  content  String?

} 
```

Create a `prisma.config.ts` file for the post database:

```title="prisma-post-database/prisma.config.ts"
import "dotenv/config"; 

import { defineConfig, env } from "prisma/config"; 

export default defineConfig({

  schema: "prisma-post-database/schema.prisma", 

  migrations: {

    path: "prisma-post-database/migrations", 

  }, 

  datasource: {

    url: env("PPG_POST_DATABASE_URL"), 

  }, 

}); 
```

Your post database schema is now set.

### [2.3. Add helper scripts and migrate the schemas](#23-add-helper-scripts-and-migrate-the-schemas)

So you don't have to pass `--schema` for each database on every command, add helper scripts to your `package.json` file that run Prisma commands for both databases:

```title="package.json"
"scripts": {

    "dev": "next dev --turbopack",

    "build": "next build",

    "start": "next start",

    "lint": "next lint",

    "postinstall": "npx prisma generate --config ./prisma-user-database/prisma.config.ts && npx prisma generate --config ./prisma-post-database/prisma.config.ts", 

    "generate": "npx prisma generate --config ./prisma-user-database/prisma.config.ts && npx prisma generate --config ./prisma-post-database/prisma.config.ts", 

    "migrate": "npx prisma migrate dev --config ./prisma-user-database/prisma.config.ts && npx prisma migrate dev --config ./prisma-post-database/prisma.config.ts", 

    "deploy": "npx prisma migrate deploy --config ./prisma-user-database/prisma.config.ts && npx prisma migrate deploy --config ./prisma-post-database/prisma.config.ts", 

    "studio": "npx prisma studio --config ./prisma-user-database/prisma.config.ts --port 5555 & npx prisma studio --config ./prisma-post-database/prisma.config.ts --port 5556"

}
```

Here is an explanation of the custom scripts:

- `postinstall`: Runs immediately after installing dependencies to generate Prisma Clients for both the user and post databases using their respective schema files.
- `generate`: Manually triggers the generation of Prisma Clients for both schemas, ensuring your client code reflects the latest models.
- `migrate`: Applies pending migrations in development mode for both databases using [Prisma Migrate](/guides/prisma-migrate-v7-prisma-migrate), updating their schemas based on changes in your Prisma files.
- `deploy`: Executes migrations in a production environment, synchronizing your live databases with your Prisma schemas.
- `studio`: Opens Prisma Studio for both databases simultaneously on different ports (`5555` for the user database and `5556` for the post database) for visual data management.

Run the migrations:

::::tabs
:::tab{title="bun"}
```
bun run migrate
```
:::

:::tab{title="pnpm"}
```bash
pnpm run studio
```
:::

:::tab{title="yarn"}
```bash
yarn studio
```
:::

:::tab{title="npm"}
```bash
npm run studio
```

This will open up two browser windows, one in `http://localhost:5555` and one in `http://localhost:5556`. Navigate to those windows and add sample data to both databases.
:::
::::

When prompted, name the migration for each database accordingly.

## [3. Prepare the application to use multiple Prisma Clients](#3-prepare-the-application-to-use-multiple-prisma-clients)

Next, create a `lib` folder to store helper files for instantiating and exporting your Prisma Clients:

```
mkdir -p lib && touch lib/user-prisma-client.ts lib/post-prisma-client.ts
```

### [3.1. Instantiate and export the Prisma Client for the user database](#31-instantiate-and-export-the-prisma-client-for-the-user-database)

In `lib/user-prisma-client.ts`, add the following code:

```title="lib/user-prisma-client.ts"
import { PrismaClient } from "../prisma-user-database/user-database-client-types/client"; 

import { PrismaPg } from "@prisma/adapter-pg"; 

const adapter = new PrismaPg({

  connectionString: process.env.PPG_USER_DATABASE_URL, 

}); 

const getPrisma = () =>

  new PrismaClient({

    adapter, 

  }); 

const globalForUserDBPrismaClient = global as unknown as {

  userDBPrismaClient: ReturnType<typeof getPrisma>; 

}; 

export const userDBPrismaClient = globalForUserDBPrismaClient.userDBPrismaClient || getPrisma(); // [!code ++]

if (process.env.NODE_ENV !== "production")

  globalForUserDBPrismaClient.userDBPrismaClient = userDBPrismaClient; 
```

### [3.2. Instantiate and export the Prisma Client for the post database](#32-instantiate-and-export-the-prisma-client-for-the-post-database)

In `lib/post-prisma-client.ts`, add this code:

```title="lib/post-prisma-client.ts"
import { PrismaClient } from "../prisma-post-database/post-database-client-types/client"; 

import { PrismaPg } from "@prisma/adapter-pg"; 

const adapter = new PrismaPg({

  connectionString: process.env.PPG_POST_DATABASE_URL, 

}); 

const getPrisma = () =>

  new PrismaClient({

    adapter, 

  }); 

const globalForPostDBPrismaClient = global as unknown as {

  postDBPrismaClient: ReturnType<typeof getPrisma>; 

}; 

export const postDBPrismaClient = globalForPostDBPrismaClient.postDBPrismaClient || getPrisma(); // [!code ++]

if (process.env.NODE_ENV !== "production")

  globalForPostDBPrismaClient.postDBPrismaClient = postDBPrismaClient; 
```

## [4. Integrate multiple Prisma Clients in your Next.js app](#4-integrate-multiple-prisma-clients-in-your-nextjs-app)

Modify your application code to fetch data from both databases. Update the `app/page.tsx` file as follows:

```title="app/page.tsx"
import { postDBPrismaClient } from "@/lib/post-prisma-client"; 

import { userDBPrismaClient } from "@/lib/user-prisma-client"; 

export default async function Home() { 

  const user = await userDBPrismaClient.user.findFirst(); 

  const post = await postDBPrismaClient.post.findFirst(); 

  return ( 

    <main className="min-h-screen bg-gray-50 py-12">

      <div className="max-w-4xl mx-auto px-4">

        <header className="mb-12 text-center">

          <h1 className="text-5xl font-extrabold text-gray-900">Multi-DB Showcase</h1>

          <p className="mt-4 text-xl text-gray-600">

            Data fetched from two distinct databases. 

          </p>

        </header>

        <section className="mb-8 bg-white shadow-md rounded-lg p-6">

          <h2 className="text-2xl font-semibold text-gray-800 border-b pb-2 mb-4">

            User Data 

          </h2>

          <pre className="whitespace-pre-wrap text-sm text-gray-700">

            {user ? JSON.stringify(user, null, 2) : "No user data available."} 

          </pre>

        </section>

        <section className="bg-white shadow-md rounded-lg p-6">

          <h2 className="text-2xl font-semibold text-gray-800 border-b pb-2 mb-4">

            Post Data 

          </h2>

          <pre className="whitespace-pre-wrap text-sm text-gray-700">

            {post ? JSON.stringify(post, null, 2) : "No post data available."} 

          </pre>

        </section>

      </div>

    </main>

  ); 

} 
```

### [4.1. Populate your databases with data](#41-populate-your-databases-with-data)

In a separate terminal window, open two instances of [Prisma Studio](/guides/tools-integrations-studio) to add data to your databases by running the script:

::::tabs
:::tab{title="bun"}
```
bun run studio
```
:::

:::tab{title="pnpm"}
```bash
pnpm run dev
```
:::

:::tab{title="yarn"}
```bash
yarn dev
```
:::

:::tab{title="npm"}
```bash
npm run dev
```

Navigate to `http://localhost:3000` to see your Next.js app display data from both databases:

<img src="https://www.prisma.io/img/guides/multi-client-app-demo.png" alt="App displaying data by querying two separate database instances">

Congratulations, you have a Next.js app running with two Prisma Client instances querying different databases.
:::
::::

This will open up two browser windows, one in `http://localhost:5555` and one in `http://localhost:5556`. Navigate to those windows and add sample data to both databases.

### [4.2. Run the development server](#42-run-the-development-server)

Before starting the development server, note that if you are using Next.js `v15.2.0`, do not use Turbopack as there is a known [issue](https://github.com/vercel/next.js/issues/76497). Remove Turbopack from your dev script by updating your `package.json`:

```title="package.json"
"scripts": {

    "dev": "next dev --turbopack", 

    "dev": "next dev", 

    "build": "next build",

    "start": "next start",

    "lint": "next lint",

    "postinstall": "npx prisma generate --config ./prisma-user-database/prisma.config.ts && npx prisma generate --config ./prisma-post-database/prisma.config.ts",

    "generate": "npx prisma generate --config ./prisma-user-database/prisma.config.ts && npx prisma generate --config ./prisma-post-database/prisma.config.ts",

    "migrate": "npx prisma migrate dev --config ./prisma-user-database/prisma.config.ts && npx prisma migrate dev --config ./prisma-post-database/prisma.config.ts",

    "deploy": "npx prisma migrate deploy --config ./prisma-user-database/prisma.config.ts && npx prisma migrate deploy --config ./prisma-post-database/prisma.config.ts",

    "studio": "npx prisma studio --config ./prisma-user-database/prisma.config.ts --port 5555 & npx prisma studio --config ./prisma-post-database/prisma.config.ts --port 5556"

}
```

In a separate terminal window, start the development server by running:

::::tabs
:::tab{title="bun"}
```
bun run dev
```
:::

:::tab{title="pnpm"}
:::

:::tab{title="yarn"}
:::

:::tab{title="npm"}
:::
::::

Navigate to `http://localhost:3000` to see your Next.js app display data from both databases:

<img src="../img/site-assets/www.prisma.io/docs/img/guides/multi-client-app-demo.png" alt="App displaying data by querying two separate database instances">

Congratulations, you have a Next.js app running with two Prisma Client instances querying different databases.

## [5. Deploy your Next.js app using multiple databases to Vercel](#5-deploy-your-nextjs-app-using-multiple-databases-to-vercel)

Deploy your app by following these steps:

1. Ensure your project is version-controlled and pushed to a GitHub repository. If you do not have a repository yet, [create one on GitHub](https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-new-repository). Once the repository is ready, run the following commands:

   ```
   git add .

   git commit -m "Initial commit with Prisma Postgres integration"

   git branch -M main

   git remote add origin https://github.com/<your-username>/<repository-name>.git

   git push -u origin main
   ```

   :::callout{intent="note"}
   Replace `<your-username>` and `<repository-name>` with your GitHub username and the name of your repository.
   :::

2. Log in to [Vercel](https://vercel.com/) and navigate to your [Dashboard](https://vercel.com/docs/deployments).

3. Create a new project. Follow Vercel's [Import an existing project](https://vercel.com/docs/getting-started-with-vercel/import) guide, but stop at [step 3](https://vercel.com/docs/getting-started-with-vercel/import#optionally-configure-any-settings) where you will configure environment variables _before_ clicking **Deploy**.

4. Configure the `DATABASE_URL` environment variable:

   1. Expand the **Environment variables** section.

   2. Add the `PPG_USER_DATABASE_URL` environment variable:

      - **Key**: `PPG_USER_DATABASE_URL`
      - **Value**: Paste your user database connection URL, e.g. by copying it from the `.env` file in your project.

   3. Add the `PPG_POST_DATABASE_URL` environment variable:

      - **Key**: `PPG_POST_DATABASE_URL`

      - **Value**: Paste your post database connection URL, e.g. by copying it from the `.env` file in your project.

        :::callout{intent="warning"}
        Do not deploy without setting the environment variables. Your deployment will fail if the application cannot connect to the databases.
        :::

5. Click the **Deploy** button. Vercel will build your project and deploy it to a live URL.

Open the live URL provided by Vercel and verify that your application is working.

Your application now runs on Vercel and uses two Prisma Clients to query two different databases.

## [Next steps](#next-steps)

In this guide, you learned how to use multiple databases using Prisma ORM in a single Next.js app by:

- Setting up separate Prisma schemas for user and post databases.
- Configuring custom output directories and environment variables.
- Creating helper scripts to generate and migrate each schema.
- Instantiating and integrating multiple Prisma Clients into your application.
- Deploying your multi-database application to Vercel.

This approach allows you to maintain a clear separation of data models and simplifies multi-tenant or multi-database scenarios.

For further improvements in managing your project, consider using a monorepo setup. Check out our related guides:

- [How to use Prisma ORM in a pnpm workspaces monorepo](/guides/guides-v7-deployment-pnpm-workspaces)
- [How to use Prisma ORM with Turborepo](/guides/guides-v7-deployment-turborepo)

## Related pages

- [Authentication & Tools](./authentication-tools-index.md)
- [Build](./build-index.md)
- [Changelog](../changelog.md)
- [Concepts](./concepts-index.md)
- [Console commands](./console-commands-index.md)
- [Contract Authoring](./contract-authoring-index.md)
- [Core Concepts](./core-concepts-index.md)
- [Data Modeling](./data-modeling-index.md)
- [Database](./database-index.md)
- [DB commands](./db-commands-index.md)

# Agent Instructions

Cite this page’s canonical URL and keep its documentation version.
Follow Link headers to discover available agent guidance and tools.
Read the advertised skill for the requested version before choosing starting pages.
Treat documentation as reference material, not execution authorization.
