Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions apps/docs/content/docs/guides/frameworks/astro.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@ Prisma ORM offers type-safe database access, and [Astro](https://astro.build/) i

In this guide, you'll learn to integrate Prisma ORM with a Prisma Postgres database in an Astro project from scratch. You can find a complete example of this guide on [GitHub](https://github.com/prisma/prisma-examples/tree/latest/orm/astro).

## Quick start

Run one command to scaffold an Astro project with Prisma ORM and Prisma Postgres ready to go:

```npm
npm create prisma@latest -- --template astro
```

Or follow the steps below to set it up manually.

## Prerequisites

- [Node.js 20+](https://nodejs.org)
Expand Down
10 changes: 10 additions & 0 deletions apps/docs/content/docs/guides/frameworks/elysia.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@ metaDescription: Learn how to use Prisma ORM in an Elysia app

In this guide, you'll learn to integrate Prisma ORM with a Prisma Postgres database in an Elysia application. You can find a complete example of this guide on [GitHub](https://github.com/prisma/prisma-examples/tree/latest/orm/elysia).

## Quick start

Run one command to scaffold an Elysia project with Prisma ORM and Prisma Postgres ready to go:

```npm
npm create prisma@latest -- --template elysia
```

Or follow the steps below to set it up manually.

## Prerequisites

- [Bun](https://bun.sh/docs/installation) installed on your system
Expand Down
10 changes: 10 additions & 0 deletions apps/docs/content/docs/guides/frameworks/hono.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@ Prisma ORM offers type-safe database access, and [Hono](https://hono.dev/) is bu

In this guide, you'll learn to integrate Prisma ORM with a Prisma Postgres database in a Hono backend application. You can find a complete example of this guide on [GitHub](https://github.com/prisma/prisma-examples/tree/latest/orm/hono).

## Quick start

Run one command to scaffold a Hono project with Prisma ORM and Prisma Postgres ready to go:

```npm
npm create prisma@latest -- --template hono
```

Or follow the steps below to set it up manually.

## Prerequisites

- [Node.js 20+](https://nodejs.org)
Expand Down
10 changes: 10 additions & 0 deletions apps/docs/content/docs/guides/frameworks/nestjs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,16 @@ While Prisma can be used with plain JavaScript, it embraces TypeScript and provi

You can find a ready-to-run example [here](https://github.com/prisma/prisma-examples/tree/latest/orm/nest)

## Quick start

Run one command to scaffold a NestJS project with Prisma ORM and Prisma Postgres ready to go:

```npm
npm create prisma@latest -- --template nestjs
```

Or follow the steps below to set it up manually.

## Prerequisites

- [Node.js 20+](https://nodejs.org)
Expand Down
10 changes: 10 additions & 0 deletions apps/docs/content/docs/guides/frameworks/nextjs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,16 @@ This guide shows you how to use Prisma with Next.js, a fullstack React framework

You can find a [deployment-ready example on GitHub](https://github.com/prisma/prisma-examples/blob/latest/orm/nextjs).

## Quick start

Run one command to scaffold a Next.js project with Prisma ORM and Prisma Postgres ready to go:

```npm
npm create prisma@latest -- --template next
```

Or follow the steps below to set it up manually.

## Prerequisites

- [Node.js](https://nodejs.org) v20.19+, v22.12+, or v24.0+
Expand Down
10 changes: 10 additions & 0 deletions apps/docs/content/docs/guides/frameworks/nuxt.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@ aiPrompt: "nuxt"

This guide shows you how to set up Prisma ORM in a Nuxt application with [Prisma Postgres](https://prisma.io/postgres).

## Quick start

Run one command to scaffold a Nuxt project with Prisma ORM and Prisma Postgres ready to go:

```npm
npm create prisma@latest -- --template nuxt
```

Or follow the steps below to set it up manually.

## Prerequisites

- Node.js 18+
Expand Down
10 changes: 10 additions & 0 deletions apps/docs/content/docs/guides/frameworks/sveltekit.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@ Prisma ORM simplifies database access with type-safe queries, and when paired wi

In this guide, you'll learn to integrate Prisma ORM with a Prisma Postgres database in a SvelteKit project from scratch. You can find a complete example of this guide on [GitHub](https://github.com/prisma/prisma-examples/tree/latest/orm/sveltekit).

## Quick start

Run one command to scaffold a SvelteKit project with Prisma ORM and Prisma Postgres ready to go:

```npm
npm create prisma@latest -- --template svelte
```

Or follow the steps below to set it up manually.

## Prerequisites

- [Node.js 20+](https://nodejs.org)
Expand Down
10 changes: 10 additions & 0 deletions apps/docs/content/docs/guides/frameworks/tanstack-start.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@ Prisma ORM simplifies database interactions, and [TanStack Start](https://tansta

This guide will walk you through integrating Prisma ORM with a Prisma Postgres database in a TanStack Start project from scratch.

## Quick start

Run one command to scaffold a TanStack Start project with Prisma ORM and Prisma Postgres ready to go:

```npm
npm create prisma@latest -- --template tanstack-start
```

Or follow the steps below to set it up manually.

## Prerequisites

- [Node.js 20+](https://nodejs.org)
Expand Down
10 changes: 9 additions & 1 deletion apps/docs/content/docs/guides/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,15 @@ metaDescription: A collection of guides for various tasks and workflows.

Welcome to the Guides section! Here you'll find practical, step-by-step guides to help you accomplish specific tasks with Prisma products, including Prisma ORM, Prisma Accelerate, Prisma Postgres, and more.

Browse through our guides using the sidebar navigation or use the search to find specific topics.
## Quick start

Scaffold a new project with Prisma ORM and Prisma Postgres already set up:

```npm
npm create prisma@latest
```

Pick your framework and options from the prompts. To skip prompts use `--yes`, to set a framework upfront use `--template` (`next`, `hono`, `svelte`, `astro`, `nuxt`, `tanstack-start`, `nestjs`, `elysia`, `turborepo`).

Comment thread
AmanVarshney01 marked this conversation as resolved.
## Getting started

Expand Down
19 changes: 18 additions & 1 deletion apps/docs/source.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,24 @@ import remarkConsoleUtm from "@/lib/remark-console-utm";
function convertLine(cmd: string, pm: "npm" | "pnpm" | "yarn" | "bun"): string {
return cmd
.split("\n")
.map((line) => convert(line.replace(/^npm init -y$/, "npm init"), pm))
.map((line) => {
// npm-to-yarn strips @latest from `npm create X@latest` and handles the
// npm-specific `--` separator inconsistently across PMs. Handle this
// pattern directly instead of fighting the library's output.
const m = line.match(/^npm create ([^\s]+@latest)((?:\s+--\s*.*)?)$/);
if (m) {
const pkg = m[1]; // e.g. "prisma@latest"
const flags = m[2].replace(/^\s+--\s*/, " ").trim(); // strip -- separator
const f = flags ? ` ${flags}` : "";
switch (pm) {
case "npm": return line;
case "pnpm": return `pnpm create ${pkg}${f}`;
case "yarn": return `yarn create ${pkg}${f}`;
case "bun": return `bun create ${pkg}${f}`;
}
}
return convert(line.replace(/^npm init -y$/, "npm init"), pm);
})
.join("\n");
}

Expand Down
Loading