Skip to content

Commit 3335424

Browse files
authored
Merge branch 'main' into feat/mongo-migration-guide
2 parents 0497484 + e7c445a commit 3335424

38 files changed

Lines changed: 2271 additions & 299 deletions

File tree

Lines changed: 45 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,78 @@
11
---
2-
title: Choose a setup path
3-
description: Choose the fastest path to start using Prisma ORM, Prisma Postgres, or Prisma Compute in a new or existing TypeScript project.
2+
title: Prisma 7 setup paths
3+
description: Choose the fastest path to start using Prisma ORM 7, Prisma Postgres, or Prisma Compute in a new or existing TypeScript project.
44
url: /getting-started
5-
metaTitle: Prisma getting started
6-
metaDescription: Choose the fastest path to start using Prisma ORM, Prisma Postgres, or Prisma Compute in a new or existing TypeScript project.
5+
metaTitle: Prisma 7 getting started
6+
metaDescription: Choose the fastest Prisma 7 setup path. Quickstarts and existing-project guides for Prisma ORM 7, Prisma Postgres, and Prisma Compute, plus an agent prompt.
77
---
88

9-
Prisma gives you a few starting points depending on what you want to do first: deploy an app, create a database, use Prisma ORM locally, or add Prisma to an existing project.
9+
Prisma 7 is the current generally available release of Prisma ORM, and `npx prisma@latest init` installs it. This page collects the Prisma 7 starting points: start a new project, add Prisma to an existing one, then deploy.
1010

11-
## Choose your path
11+
:::note
1212

13-
### Deploy a full-stack app with a database
13+
Starting a new project? [Prisma Next](/next) is the recommended path for new apps. It is the next major version of Prisma ORM (soon Prisma 8), available now in Early Access. The [getting started page](/) covers it.
1414

15-
Use this path if you want to deploy a TypeScript app with Prisma Compute and run it alongside Prisma Postgres.
15+
:::
1616

17-
- [Deploy your first app](/prisma-compute/deploy) on [Prisma Compute](/compute), currently in Public Beta, to run it next to your Prisma Postgres database
17+
## Start a new project
1818

19-
### Start a new project
19+
The recommended path is the [Quickstart with Prisma Postgres](/prisma-orm/quickstart/prisma-postgres): it provisions a managed PostgreSQL database for you and gets you from install to first query in about five minutes.
2020

21-
Use this path if you are creating a new app and want to set up Prisma from the beginning.
21+
Working with a specific database instead?
2222

23-
- [Quickstart with Prisma Postgres](/prisma-orm/quickstart/prisma-postgres) for the fastest end-to-end path with a managed PostgreSQL database
24-
- [Quickstart with PostgreSQL](/prisma-orm/quickstart/postgresql) if you want to work with PostgreSQL
23+
- [Quickstart with PostgreSQL](/prisma-orm/quickstart/postgresql)
2524
- [Quickstart with SQLite](/prisma-orm/quickstart/sqlite) for a lightweight local setup
26-
- [Quickstart with MySQL](/prisma-orm/quickstart/mysql) if your application uses MySQL
27-
- [Quickstart with MongoDB](/prisma-orm/quickstart/mongodb) if your application uses MongoDB
25+
- [Quickstart with MySQL](/prisma-orm/quickstart/mysql)
26+
- [Quickstart with MongoDB](/prisma-orm/quickstart/mongodb)
2827

29-
### Add Prisma to an existing project
28+
## Add Prisma to an existing project
3029

31-
Use this path if you already have an application or database and want to add Prisma ORM.
30+
Use these guides if you already have an application or database and want to add Prisma ORM:
3231

3332
- [Add Prisma ORM to an existing PostgreSQL project](/prisma-orm/add-to-existing-project/postgresql)
3433
- [Add Prisma ORM to an existing MySQL project](/prisma-orm/add-to-existing-project/mysql)
3534
- [Add Prisma ORM to an existing SQLite project](/prisma-orm/add-to-existing-project/sqlite)
3635
- [Add Prisma ORM to an existing MongoDB project](/prisma-orm/add-to-existing-project/mongodb)
3736
- [Add Prisma ORM to an existing Prisma Postgres project](/prisma-orm/add-to-existing-project/prisma-postgres)
3837

39-
## What you will do
38+
## Deploy to Prisma Compute
4039

41-
Most Prisma ORM and Prisma Postgres guides follow the same basic flow:
40+
Once your app runs locally, [Prisma Compute](/compute) (currently in Public Beta) runs it next to your Prisma Postgres database:
4241

43-
1. Define a database connection and data model in your [Prisma schema](/orm/prisma-schema/overview).
44-
2. Set up your database, either with [Prisma Postgres](/postgres) or another supported database.
45-
3. Install Prisma CLI and [Prisma Client](/orm/prisma-client).
46-
4. Run `prisma generate` to create a type-safe client for your schema.
47-
5. Create or introspect your database.
48-
6. Start sending queries from your application.
42+
1. Sign in with `npx @prisma/cli@latest auth login`.
43+
2. Run `npx @prisma/cli@latest app deploy` from your app directory to get a live URL, adding `--env .env` so environment variables like `DATABASE_URL` reach the deployment.
44+
3. `--env .env` applies to that one deployment. Persist variables for future deploys with `npx @prisma/cli@latest project env add --file .env --role production`; see [environment variables](/compute/environment-variables).
45+
4. Keep deploying from the CLI, or [connect GitHub](/compute/github) to deploy on push.
4946

50-
Then you can deploy your app to [Prisma Compute](/compute). The flow is:
47+
The [deploy guide](/prisma-compute/deploy) covers build settings, frameworks, and troubleshooting.
5148

52-
1. Sign in with `npx @prisma/cli@latest auth login`.
53-
2. Run `npx @prisma/cli@latest app deploy` from your app directory to get a live URL.
54-
3. Connect your app to [Prisma Postgres](/postgres) or another database with [environment variables](/compute/environment-variables).
55-
4. Redeploy to apply the environment variables.
56-
5. Keep deploying from the CLI, or [connect GitHub](/compute/github) to deploy on push.
49+
## Use with your agent
50+
51+
To hand the full Prisma 7 stack to your coding agent, copy this prompt. The commands below install Prisma 7, not Prisma Next:
52+
53+
<AgentPrompt>
54+
55+
```text
56+
Set up the Prisma 7 stack: Prisma ORM 7, Prisma Postgres, and Prisma Compute.
57+
58+
If I have not told you which framework template to use, stop and ask.
59+
60+
1. Scaffold a new app non-interactively: `npx create-prisma@latest --name my-app --template [next|hono|nuxt|astro|nest|svelte|tanstack-start|elysia|turborepo] --provider postgresql --no-deploy`. Or add Prisma 7 to an existing app with `npx prisma@latest init --db`, which provisions a Prisma Postgres database; before that, check `npx @prisma/cli@latest auth whoami` and stop and ask me to run `auth login` if I am not signed in, because provisioning can open a browser.
61+
2. From the project directory, define a small schema in `prisma/schema.prisma`, then run `npx prisma migrate dev --name init` and `npx prisma generate`. If migrate dev asks to reset the database, stop and ask me first.
62+
3. Update the seed and app code to query the schema, and verify locally with the dev script.
63+
4. Deploy with Prisma Compute: check `npx @prisma/cli@latest auth whoami` first. If I am not signed in, stop and ask me to run `npx @prisma/cli@latest auth login`, because that step opens a browser. Then run `npx @prisma/cli@latest app deploy --create-project my-app --env .env` so DATABASE_URL reaches the deployment, and verify the deployed URL with curl.
64+
65+
Current docs: https://www.prisma.io/docs/getting-started.md and https://www.prisma.io/docs/llms.txt.
66+
```
67+
68+
</AgentPrompt>
5769

5870
## Next steps
5971

6072
After setup, these pages are usually the next ones people need:
6173

6274
- [Prisma Client overview](/orm/prisma-client)
63-
- [Generating Prisma Client](/orm/prisma-client/setup-and-configuration/generating-prisma-client)
6475
- [Prisma Migrate getting started](/orm/prisma-migrate/getting-started)
6576
- [Prisma schema overview](/orm/prisma-schema/overview)
66-
67-
## If you want the fastest path
68-
69-
- [Quickstart with Prisma Postgres](/prisma-orm/quickstart/prisma-postgres) if you want Prisma to provision the database layer for you
70-
- [Open Prisma Studio](/studio/getting-started) if you want to inspect and edit data visually once your app is running
71-
- [Review pricing](https://www.prisma.io/pricing) if you're evaluating Prisma Postgres or other paid workflows for a team
77+
- [Open Prisma Studio](/studio/getting-started) to inspect and edit data visually
78+
- [Review pricing](https://www.prisma.io/pricing) if you're evaluating Prisma Postgres for a team

0 commit comments

Comments
 (0)