From b227b3dfa04ffd2cf1daefe94240dfd02848188c Mon Sep 17 00:00:00 2001 From: Taesu <166604494+bytaesu@users.noreply.github.com> Date: Sun, 30 Nov 2025 02:21:21 +0900 Subject: [PATCH] docs: update the db adapter content and keep the format consistent (#6402) Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- docs/content/docs/adapters/drizzle.mdx | 10 +++++----- docs/content/docs/adapters/mongo.mdx | 9 ++++++--- docs/content/docs/adapters/prisma.mdx | 11 ++++++----- 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/docs/content/docs/adapters/drizzle.mdx b/docs/content/docs/adapters/drizzle.mdx index 04101a1c58..99fb1b8ab2 100644 --- a/docs/content/docs/adapters/drizzle.mdx +++ b/docs/content/docs/adapters/drizzle.mdx @@ -4,12 +4,12 @@ description: Integrate Better Auth with Drizzle ORM. --- Drizzle ORM is a powerful and flexible ORM for Node.js and TypeScript. It provides a simple and intuitive API for working with databases, and supports a wide range of databases including MySQL, PostgreSQL, SQLite, and more. -Read more here: [Drizzle ORM](https://orm.drizzle.team/). + +Before getting started, make sure you have Drizzle installed and configured. For more information, see [Drizzle Documentation](https://orm.drizzle.team/docs/overview/) ## Example Usage -Make sure you have Drizzle installed and configured. -Then, you can use the Drizzle adapter to connect to your database. +You can use the Drizzle adapter to connect to your database as follows. ```ts title="auth.ts" import { betterAuth } from "better-auth"; @@ -150,6 +150,6 @@ export const auth = betterAuth({ }); ``` -## Performance Tips +## Additional Information -If you're looking for performance improvements or tips, take a look at our guide to performance optimizations. +- If you're looking for performance improvements or tips, take a look at our guide to performance optimizations. diff --git a/docs/content/docs/adapters/mongo.mdx b/docs/content/docs/adapters/mongo.mdx index 178959d544..5bb519726d 100644 --- a/docs/content/docs/adapters/mongo.mdx +++ b/docs/content/docs/adapters/mongo.mdx @@ -4,12 +4,12 @@ description: Integrate Better Auth with MongoDB. --- MongoDB is a popular NoSQL database that is widely used for building scalable and flexible applications. It provides a flexible schema that allows for easy data modeling and querying. -Read more here: [MongoDB](https://www.mongodb.com/). + +Before getting started, make sure you have MongoDB installed and configured. For more information, see [MongoDB Documentation](https://www.mongodb.com/docs/) ## Example Usage -Make sure you have MongoDB installed and configured. -Then, you can use the mongodb adapter. +You can use the MongoDB adapter to connect to your database as follows. ```ts title="auth.ts" import { betterAuth } from "better-auth"; @@ -46,3 +46,6 @@ export const auth = betterAuth({ experimental: { joins: true } }); ``` +## Additional Information + +- If you're looking for performance improvements or tips, take a look at our guide to performance optimizations. \ No newline at end of file diff --git a/docs/content/docs/adapters/prisma.mdx b/docs/content/docs/adapters/prisma.mdx index 29fa6516ed..b94153e113 100644 --- a/docs/content/docs/adapters/prisma.mdx +++ b/docs/content/docs/adapters/prisma.mdx @@ -4,12 +4,12 @@ description: Integrate Better Auth with Prisma. --- Prisma ORM is an open-source database toolkit that simplifies database access and management in applications by providing a type-safe query builder and an intuitive data modeling interface. -Read more [here](https://www.prisma.io/). + +Before getting started, make sure you have Prisma installed and configured. For more information, see [Prisma Documentation](https://www.prisma.io/docs/) ## Example Usage -Make sure you have Prisma installed and configured. -Then, you can use the Prisma adapter to connect to your database. +You can use the Prisma adapter to connect to your database as follows. ```ts title="auth.ts" import { betterAuth } from "better-auth"; @@ -26,7 +26,7 @@ export const auth = betterAuth({ ``` - If you have configured a custom output directory in your `schema.prisma` file (e.g., `output = "../src/generated/prisma"`), make sure to import the Prisma client from that location instead of `@prisma/client`. Learn more about custom output directories in the [Prisma documentation](https://www.prisma.io/docs/guides/nextjs#21-install-prisma-orm-and-create-your-first-models). + Starting from Prisma 7, the `output` path field is required. If you have configured a custom output path in your `schema.prisma` file (e.g., `output = "../src/generated/prisma"`), make sure to import the Prisma client from that location instead of `@prisma/client`. For more information, see [here](https://www.prisma.io/docs/orm/prisma-client/setup-and-configuration/generating-prisma-client#the-location-of-prisma-client). ## Schema generation & migration @@ -80,4 +80,5 @@ export const auth = betterAuth({ ## Additional Information -If you're looking for performance improvements or tips, take a look at our guide to performance optimizations. +- If you're looking for performance improvements or tips, take a look at our guide to performance optimizations. +- [How to use Prisma ORM with Better Auth and Next.js](https://www.prisma.io/docs/guides/betterauth-nextjs) \ No newline at end of file