Skip to content

Commit

Permalink
Merge branch 'main' into refine-neon-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ankur-arch authored Sep 10, 2024
2 parents c58c092 + e500af5 commit 9f122b0
Show file tree
Hide file tree
Showing 6 changed files with 214 additions and 92 deletions.
6 changes: 3 additions & 3 deletions content/700-optimize/200-getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Prisma Optimize is intended for use in local environments. Learn more in the [FA
## 1. Launch Optimize

1. Log in to your [Prisma Data Platform account](https://console.prisma.io/optimize?utm_source=docs&utm_medium=optimize-page).
2. <a href="/platform/about#accessing-the-optimize-dashboard" target="_blank">Follow the instructions</a> to access and launch Prisma Optimize.
2. <a href="/docs/platform/about#accessing-the-optimize-dashboard" target="_blank">Follow the instructions</a> to access and launch Prisma Optimize.

## 2. Add Optimize to your application

Expand Down Expand Up @@ -54,7 +54,7 @@ npm install @prisma/client@latest @prisma/extension-optimize

### 2.3. Add the Optimize API Key to your `.env` file

<a href="/platform/about#generating-an-optimize-api-key" target="_blank">Generate a Prisma Optimize API key</a> and add it to your `.env` file:
<a href="/docs/platform/about#generating-an-optimize-api-key" target="_blank">Generate a Prisma Optimize API key</a> and add it to your `.env` file:

```bash
OPTIMIZE_API_KEY="YOUR_OPTIMIZE_API_KEY"
Expand All @@ -69,7 +69,7 @@ import { PrismaClient } from "@prisma/client";
import { withOptimize } from "@prisma/extension-optimize";

const prisma = new PrismaClient().$extends(
withOptimize({ token: process.env.OPTIMIZE_API_KEY }),
withOptimize({ apiKey: process.env.OPTIMIZE_API_KEY }),
);
```

Expand Down
4 changes: 2 additions & 2 deletions content/700-optimize/700-known-limitations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ When using the [Optimize client extension](https://www.npmjs.com/package/@prisma
const prisma = new PrismaClient()
.$extends(
withOptimize({
token: process.env.OPTIMIZE_API_KEY,
apiKey: process.env.OPTIMIZE_API_KEY,
}),
)
.$extends(withAccelerate());
Expand All @@ -50,4 +50,4 @@ Raw queries are visible in MongoDB, though the parameters passed to them are not

## Driver adapter compatibility

Prisma Optimize is not yet compatible with [driver adapters](/orm/overview/databases/database-drivers#driver-adapters). However, as a workaround, you can run your queries locally using the regular Prisma Client along with Prisma Optimize to inspect and improve query performance.
Prisma Optimize is not yet compatible with [driver adapters](/orm/overview/databases/database-drivers#driver-adapters). However, as a workaround, you can run your queries locally using the regular Prisma Client along with Prisma Optimize to inspect and improve query performance.
6 changes: 5 additions & 1 deletion src/css/all.css
Original file line number Diff line number Diff line change
Expand Up @@ -761,10 +761,14 @@
content: "\e473";
}

.fa-magnifying-glass-chart:before {
.fa-magnifying-glass-chart::before {
content: "\e522";
}

.fa-message-bot::before {
content: "\e3b8";
}

.fa-chevron-down::before {
content: "\f078";
}
Expand Down
174 changes: 112 additions & 62 deletions src/data/indexData.ts
Original file line number Diff line number Diff line change
@@ -1,95 +1,110 @@
export const ProductLinkData = {
porm: {
title: "Build with Prisma ORM",
icon: "database",
title: "Start building with Prisma ORM",
//eyebrow: "Build",
description:
"Open source Node.js and TypeScript ORM with an intuitive data model, automated migrations, type-safety, and auto-completion.",
"Node.js and TypeScript ORM with an intuitive data model, automated migrations, type-safety, and auto-completion. <br><br>Combine it with <b>Prisma Studio</b> to explore and manipulate your data.",
links: [
{
url: "/getting-started",
title: "Getting started",
url: "/orm",
title: "ORM",
},
{
url: "https://github.com/prisma/prisma-examples",
title: "Example projects",
external: true,
url: "/orm/tools/prisma-studio",
title: "Studio",
},
],
},
poptimize: {
title: "Optimize your database queries",
//eyebrow: "Fortify",
description: "Use <b>Prisma Optimize</b> to generate insights and get recommendations to improve your database queries, making your application run faster.",
links: [
{
url: "/optimize",
title: "Optimize",
},
],
},
pdp: {
title: "Grow as your app evolves",
icon: "triangle",
title: "Grow and evolve your application",
//eyebrow: "Grow",
description:
"Expand your application capabilities with global database caching, connection pooling, and real-time database subscriptions.",
"Scale your database connections and cache your database results at the edge with <b>Prisma Accelerate</b>. <br><br>Add <b>Prisma Pulse</b> to your app to react to database changes with type-safe model subscriptions.",
links: [
{
url: "/accelerate",
title: "Prisma Accelerate",
title: "Accelerate",
},
{
url: "/pulse",
title: "Prisma Pulse",
title: "Pulse",
},
],
},
};

export const ORMCardLinkData = {
components: {
title: "ORM Components",
title: "ORM Components and Reference",
description: "Learn about the building blocks of Prisma ORM.",
links: [
{
url: "/orm/prisma-schema",
title: "Prisma Schema",
},
{
url: "/orm/tools/prisma-cli",
title: "Prisma CLI",
url: "/orm/reference/prisma-schema-reference",
title: "Schema reference",
},
{
url: "/orm/prisma-client",
title: "Prisma Client",
},
{
url: "/orm/tools/prisma-studio",
title: "Prisma Studio",
url: "/orm/reference/prisma-client-reference",
title: "Client API reference",
},
{
url: "/orm/tools/prisma-cli",
title: "Prisma CLI",
},
{
url: "/orm/reference/prisma-cli-reference",
title: "Prisma CLI reference",
},
{
url: "/orm/prisma-migrate",
title: "Prisma Migrate",
},
{
url: "/orm/reference/error-reference",
title: "Error message reference",
},
],
},

reference: {
title: "Reference",
description: "Understand the usage and API surface of our products.",
title: "Platform Reference",
description: "Understand the usage and API surface of our platform products built on top of Prisma ORM.",
links: [
{
url: "/orm/reference/prisma-client-reference",
title: "Client API reference",
},
{
url: "/orm/reference/prisma-cli-reference",
title: "Prisma CLI reference",
},
{
url: "/orm/reference/prisma-schema-reference",
title: "Schema reference",
},
{
url: "/accelerate/api-reference",
title: "Accelerate API reference",
},
{
url: "/orm/reference/error-reference",
title: "Error message reference",
},

{
url: "/pulse/api-reference",
title: "Pulse API reference",
},
{
url: "/platform",
title: "Platform",
},
{
url: "/platform/platform-cli/commands",
title: "Platform CLI commands",
},
],
},
};
Expand All @@ -101,13 +116,6 @@ export const ORMGeneralLinkData = [
url: "/orm/prisma-client/queries/crud",
icon: "fa-solid fa-arrow-right-arrow-left",
},
{
title: `Prisma ORM in your stack`,
description:
"Use Prisma ORM to build a GraphQL or REST API, or as part of a fullstack application.",
url: "/orm/overview/prisma-in-your-stack",
icon: "fa-solid fa-server",
},
{
title: `Adopting Prisma ORM`,
description: "Migrate to Prisma ORM from other ORMs.",
Expand All @@ -122,36 +130,78 @@ export const ORMGeneralLinkData = [
icon: "fa-solid fa-book",
},
{
title: `Accelerate`,
description: "Set up connection pooling and global caching in your app with Accelerate.",
url: "/accelerate/getting-started",
icon: "fa-solid fa-bolt",
title: `Platform CLI commands`,
description:
"Learn how to access the Platform using the integrated commands in the Prisma CLI.",
url: "/platform/platform-cli/commands",
icon: "fa-solid fa-terminal",
},
];

export const GeneralLinks_Build = [
{
title: `Pulse`,
description: "React to changes in your database with Pulse.",
url: "/pulse/getting-started",
icon: "fa-solid fa-signal-stream",
title: `CRUD`,
description: "How to perform CRUD operations with your generated Prisma Client API. ",
url: "/orm/prisma-client/queries/crud",
icon: "fa-solid fa-arrow-right-arrow-left",
},
{
title: `Adopting Prisma ORM`,
description: "Migrate to Prisma ORM from other ORMs.",
url: "/orm/more/migrating-to-prisma",
icon: "fa-solid fa-download",
},
{
title: `Deployment guides`,
description:
"Deploy Node.js applications with Prisma Client to platforms like Vercel, AWS Lambda, Netlify and Heroku.",
url: "/orm/prisma-client/deployment",
icon: "fa-solid fa-book",
},


];

export const GeneralLinks_Fortify = [
{
title: `Optimize`,
description: "Debug database queries and use recommendations to improve query performance.",
title: `Set up Optimize`,
description: "Start analyzing your queries and generate insights to improve your queries.",
url: "/optimize/getting-started",
icon: "fa-solid fa-magnifying-glass-chart",
},
{
title: `Platform`,
description:
"Explore how to use the Platform to easily manage your projects and collaborate within your team.",
url: "/platform/about",
title: `Recommendations`,
description: "Explore the different recommendations such as indexing issues, excessive data retrieval, and inefficient query patterns.",
url: "/optimize/recommendations",
icon: "fa-solid fa-chart-simple",
},
{
title: `Platform CLI commands`,
description:
"Learn how to access the Platform using the integrated commands in the Prisma CLI.",
url: "/platform/platform-cli/commands",
icon: "fa-solid fa-terminal",
title: `Prisma AI`,
description: "Understand the recommendations easier by asking our AI follow-up questions.",
url: "/optimize/prisma-ai",
icon: "fa-solid fa-message-bot",
},
];


export const GeneralLinks_Grow = [
{
title: `Connection pooling`,
description: "Adjust pool size, configure timeouts, and enable autoscaling to improve performance.",
url: "/accelerate/connection-pooling",
icon: "fa-solid fa-bolt",
},
{
title: `Database caching`,
description: "How to improve query performance by configuring cache behavior using TTL and SWR.",
url: "/accelerate/caching",
icon: "fa-solid fa-bolt",
},
{
title: `React to database changes`,
description: "Use Pulse to stream database events to your app in real-time. ",
url: "/pulse/getting-started",
icon: "fa-solid fa-signal-stream",
},
];

Expand Down
Loading

0 comments on commit 9f122b0

Please sign in to comment.