Skip to content

Commit c029607

Browse files
ankur-archclaude
andcommitted
Getting started: validation-round fixes from live path testing
- First deploy does not auto-create a project (PROJECT_SETUP_REQUIRED): agent prompts pass --create-project, prose now describes the picker - db.close() does not exist; the API is db.runtime().close() - Node floor is 24 (scaffold engines), not v20.19, across guides - bun/deno scaffold commands were missing --template minimal - Tutorial sample JSON gains the createdAt field the endpoint returns, plus PORT and CLAIM_URL notes - Stale template list on the compute deploy page; stale Post-model prompt suggestions; scaffold flag-order consistency - SEO: differentiate twin quickstart + v6 metas, product-focused ORM metaDescription, /next meta as hands-on hub, self-contained getting-started H1 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 287bca4 commit c029607

21 files changed

Lines changed: 61 additions & 60 deletions

File tree

apps/docs/content/docs/(index)/getting-started.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ If I have not told you which framework template to use, stop and ask.
5959
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.
6060
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.
6161
3. Update the seed and app code to query the schema, and verify locally with the dev script.
62-
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 --env .env` so DATABASE_URL reaches the deployment, and verify the deployed URL with curl.
62+
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.
6363
6464
Current docs: https://www.prisma.io/docs/getting-started.md and https://www.prisma.io/docs/llms.txt.
6565
```

apps/docs/content/docs/(index)/index.mdx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,9 @@ npx create-prisma@next
3939
cd my-app
4040
npm run db:init
4141
npm run db:seed
42+
# db:seed failing? See the one-line fix: prisma.io/docs/next/full-stack-tutorial
4243
npm run dev
43-
# Deploy to a live URL (free account, browser sign-in)
44+
# Deploy to a live URL (free account, browser sign-in) -- run after stopping dev
4445
npx @prisma/cli@latest app deploy --env .env`}>
4546

4647
```text
@@ -52,7 +53,7 @@ If I have not told you which framework, stop and ask before scaffolding. Valid -
5253
2. From the project directory, apply the starter contract and seed: `npm run db:init`, then `npm run db:seed`. If seeding fails with `Cannot read properties of undefined (reading 'where')`, change `db.orm.User` to `db.orm.public.User` in `src/prisma/seed.ts`, `src/prisma/users.ts`, and any route files that query `db.orm`, then rerun.
5354
3. Edit the starter contract under `src/prisma/` into a small schema for my use case, then run `npm run contract:emit` and plan and apply the migration: `npx prisma-next migration plan`, then `npx prisma-next migrate --yes`. Migration planning diffs the emitted contract, so the emit step is required.
5455
4. Update the seed script and the app routes to query the new schema, start `npm run dev` in the background, and verify with a request against the running app. For the `nest` template, if routes return 500s with `reading 'findAll'` in the logs, add explicit `@Inject()` tokens as shown in https://www.prisma.io/docs/guides/next/frameworks/nestjs.md.
55-
5. Deploy with Prisma Compute. First apply the framework's deploy requirement from the guide at https://www.prisma.io/docs/guides/next/frameworks/[guide].md, where [guide] is the template name except: template `next` → guide `nextjs`, `nest` → `nestjs`, `svelte` → `sveltekit`. The requirements: Next.js needs `output: "standalone"` in `next.config.ts` (without it the deployed app returns 504s), TanStack Start needs the nitro build plugin, Astro needs the `@astrojs/node` adapter plus `--env HOST=0.0.0.0`, and Elysia needs `--framework bun --entry src/index.ts` on the deploy command. If the template is `svelte`, skip this step; Compute does not support SvelteKit yet. Check `npx @prisma/cli@latest auth whoami`. 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 --env .env` so DATABASE_URL reaches the deployment, and verify the deployed URL with curl.
56+
5. Deploy with Prisma Compute. First apply the framework's deploy requirement from the guide at https://www.prisma.io/docs/guides/next/frameworks/[guide].md, where [guide] is the template name except: template `next` → guide `nextjs`, `nest` → `nestjs`, `svelte` → `sveltekit`. The requirements: Next.js needs `output: "standalone"` in `next.config.ts` (without it the deployed app returns 504s), TanStack Start needs the nitro build plugin, Astro needs the `@astrojs/node` adapter plus `--env HOST=0.0.0.0`, and Elysia needs `--framework bun --entry src/index.ts` on the deploy command. If the template is `svelte`, skip this step; Compute does not support SvelteKit yet. Check `npx @prisma/cli@latest auth whoami`. 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.
5657
5758
Use the installed Prisma Next skills and the current Prisma docs: https://www.prisma.io/docs/llms.txt (append `.md` to any docs URL for a markdown version).
5859
```
@@ -166,7 +167,7 @@ Deploy this app to Prisma Compute using `npx @prisma/cli@latest`.
166167
Compute supports Next.js (with `output: "standalone"` in its config), Nuxt, Astro, Hono, NestJS, TanStack Start, and plain Bun servers; for a Bun or Elysia server pass `--framework bun --entry <server file>`. If the app is none of these, stop and tell me.
167168
168169
1. Confirm I am signed in with `npx @prisma/cli@latest auth whoami`; if not, stop and ask me to run `npx @prisma/cli@latest auth login`.
169-
2. Run `npx @prisma/cli@latest app deploy` from the project directory. If the app reads env vars from `.env` (like DATABASE_URL), add `--env .env`. Add `--db` only if it needs a brand-new database; Compute then provisions Prisma Postgres and wires the connection string.
170+
2. Run `npx @prisma/cli@latest app deploy` from the project directory. If the app reads env vars from `.env` (like DATABASE_URL), add `--env .env`. If deploy fails with `PROJECT_SETUP_REQUIRED` (the directory is not pinned to a project yet), rerun with `--create-project <app-name>`, or `--project <id>` for an existing project. Add `--db` only if it needs a brand-new database; Compute then provisions Prisma Postgres and wires the connection string.
170171
3. Fetch the deployed URL with curl and confirm the app responds. If it does not, read `npx @prisma/cli@latest app logs` briefly (it streams; stop it after reading).
171172
172173
Current docs: https://www.prisma.io/docs/prisma-compute/deploy.md.

apps/docs/content/docs/(index)/next/full-stack-tutorial.mdx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Create a new Hono API with Prisma Next, seed it, and deploy it to Prisma Compute
2929
1. Scaffold: `npx create-prisma@next create my-app --template hono --provider postgres --prisma-postgres --yes` (or pass `--database-url "<url>"` instead of `--prisma-postgres` if I give you a connection string).
3030
2. In `my-app`, run `npm run db:init`, then `npm run db:seed`. If seeding fails with `Cannot read properties of undefined (reading 'where')`, change `db.orm.User` to `db.orm.public.User` in `src/prisma/seed.ts` and `src/prisma/users.ts`, then rerun.
3131
3. Start `npm run dev` in the background and verify `curl http://localhost:3000/users` returns the seeded users.
32-
4. Deploy: check `npx @prisma/cli@latest auth whoami`; if I am not signed in, stop and ask me to run `npx @prisma/cli@latest auth login`. Then run `npx @prisma/cli@latest app deploy --env .env` and verify the live URL's /users endpoint with curl.
32+
4. Deploy: check `npx @prisma/cli@latest auth whoami`; if I am not signed in, stop and ask me to run `npx @prisma/cli@latest auth login`. Then run `npx @prisma/cli@latest app deploy --create-project my-app --env .env` and verify the live URL's /users endpoint with curl.
3333
3434
Use the installed Prisma Next skills.
3535
```
@@ -50,7 +50,7 @@ Pick **Prisma Postgres** at the database prompt to have a database created for y
5050
cd my-app
5151
```
5252

53-
The scaffold writes `DATABASE_URL` to `.env`, generates a Hono server in `src/index.ts` with `GET /` and `GET /users` routes, puts the Prisma Next setup under `src/prisma/`, and installs [Prisma Next skills](/ai/tools/skills) for your coding agent.
53+
The scaffold writes `DATABASE_URL` to `.env`, generates a Hono server in `src/index.ts` with `GET /` and `GET /users` routes, puts the Prisma Next setup under `src/prisma/`, and installs [Prisma Next skills](/ai/tools/skills) for your coding agent. If the database was provisioned without a signed-in CLI, `.env` also contains a `CLAIM_URL`; open it within 24 hours to claim the database into your account and keep it.
5454

5555
## 2. Initialize and seed the database
5656

@@ -78,17 +78,17 @@ Seeing `Cannot read properties of undefined (reading 'where')`? The current temp
7878
npm run dev
7979
```
8080

81-
The server starts on port 3000. Confirm the API serves the seeded rows from Prisma Postgres:
81+
The server starts on port 3000 (set `PORT` if something else is already using it). Confirm the API serves the seeded rows from Prisma Postgres:
8282

8383
```bash
8484
curl http://localhost:3000/users
8585
```
8686

8787
```json no-copy
8888
[
89-
{ "id": "1", "email": "alice@prisma.io", "username": "alice", "name": "Alice" },
90-
{ "id": "2", "email": "bob@prisma.io", "username": "bob", "name": "Bob" },
91-
{ "id": "3", "email": "carol@prisma.io", "username": "carol", "name": "Carol" }
89+
{ "id": "1", "email": "alice@prisma.io", "username": "alice", "name": "Alice", "createdAt": "2026-07-27T13:31:56.993Z" },
90+
{ "id": "2", "email": "bob@prisma.io", "username": "bob", "name": "Bob", "createdAt": "2026-07-27T13:31:57.021Z" },
91+
{ "id": "3", "email": "carol@prisma.io", "username": "carol", "name": "Carol", "createdAt": "2026-07-27T13:31:57.049Z" }
9292
]
9393
```
9494

@@ -102,7 +102,7 @@ Sign in once (it opens your browser):
102102
npx @prisma/cli@latest auth login
103103
```
104104

105-
Deploy from the project directory. The `--env .env` flag passes your `DATABASE_URL` to the deployment, so the live API talks to the same database:
105+
Deploy from the project directory. The first deploy asks you to pick or create a project; pass `--create-project my-app` to skip the prompt (agents and CI need it, since there is no interactive picker). The `--env .env` flag passes your `DATABASE_URL` to the deployment, so the live API talks to the same database:
106106

107107
```npm
108108
npx @prisma/cli@latest app deploy --env .env
@@ -124,7 +124,7 @@ https://<your-app>.ewr.prisma.build
124124
curl https://<your-app>.ewr.prisma.build/users
125125
```
126126

127-
The same three users come back, now served from production next to your database. The first deploy creates a project, pins the directory to it in a gitignored `.prisma/local.json`, and promotes to production automatically.
127+
The same three users come back, now served from production next to your database. The first deploy pins the directory to your project in a gitignored `.prisma/local.json` and promotes to production automatically.
128128

129129
## Next steps
130130

apps/docs/content/docs/(index)/next/getting-started.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Choose a setup path
2+
title: Choose a Prisma Next setup path
33
description: Choose the fastest path to try Prisma Next in a new or existing project.
44
url: /next/getting-started
55
metaTitle: Prisma Next getting started

apps/docs/content/docs/(index)/next/index.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Introduction to Prisma Next
33
description: Prisma Next is the next major version of Prisma ORM, available in Early Access.
44
url: /next
55
metaTitle: Introduction to Prisma Next
6-
metaDescription: Prisma Next is the next major version of Prisma ORM, available in Early Access.
6+
metaDescription: Start here for Prisma Next, the Early Access rebuild of Prisma ORM. Quickstarts, framework guides, and agent prompts.
77
badge: early-access
88
hideSidebar: true
99
---
@@ -50,7 +50,7 @@ If I have not told you which framework, stop and ask before scaffolding. Valid -
5050
2. From the project directory, apply the starter contract and seed: `npm run db:init`, then `npm run db:seed`. If seeding fails with `Cannot read properties of undefined (reading 'where')`, change `db.orm.User` to `db.orm.public.User` in `src/prisma/seed.ts`, `src/prisma/users.ts`, and any route files that query `db.orm`, then rerun.
5151
3. Edit the starter contract under `src/prisma/` into a small schema for my use case, then run `npm run contract:emit` and plan and apply the migration: `npx prisma-next migration plan`, then `npx prisma-next migrate --yes`. Migration planning diffs the emitted contract, so the emit step is required.
5252
4. Update the seed script and the app routes to query the new schema, start `npm run dev` in the background, and verify with a request against the running app. For the `nest` template, if routes return 500s with `reading 'findAll'` in the logs, add explicit `@Inject()` tokens as shown in https://www.prisma.io/docs/guides/next/frameworks/nestjs.md.
53-
5. Deploy with Prisma Compute. First apply the framework's deploy requirement from the guide at https://www.prisma.io/docs/guides/next/frameworks/[guide].md, where [guide] is the template name except: template `next` → guide `nextjs`, `nest` → `nestjs`, `svelte` → `sveltekit`. The requirements: Next.js needs `output: "standalone"` in `next.config.ts` (without it the deployed app returns 504s), TanStack Start needs the nitro build plugin, Astro needs the `@astrojs/node` adapter plus `--env HOST=0.0.0.0`, and Elysia needs `--framework bun --entry src/index.ts` on the deploy command. If the template is `svelte`, skip this step; Compute does not support SvelteKit yet. Check `npx @prisma/cli@latest auth whoami`. 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 --env .env` so DATABASE_URL reaches the deployment, and verify the deployed URL with curl.
53+
5. Deploy with Prisma Compute. First apply the framework's deploy requirement from the guide at https://www.prisma.io/docs/guides/next/frameworks/[guide].md, where [guide] is the template name except: template `next` → guide `nextjs`, `nest` → `nestjs`, `svelte` → `sveltekit`. The requirements: Next.js needs `output: "standalone"` in `next.config.ts` (without it the deployed app returns 504s), TanStack Start needs the nitro build plugin, Astro needs the `@astrojs/node` adapter plus `--env HOST=0.0.0.0`, and Elysia needs `--framework bun --entry src/index.ts` on the deploy command. If the template is `svelte`, skip this step; Compute does not support SvelteKit yet. Check `npx @prisma/cli@latest auth whoami`. 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.
5454
5555
Use the installed Prisma Next skills and the current Prisma docs: https://www.prisma.io/docs/llms.txt (append `.md` to any docs URL for a markdown version).
5656
```

apps/docs/content/docs/(index)/prisma-compute/deploy.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ It asks for a template, a database provider, and a few options, then asks **"Dep
6969

7070
So your deployed app has a database from its first request.
7171

72-
To skip the prompts, pass your choices as flags. Compute deploys are available for the `hono`, `elysia`, `next`, and `tanstack-start` templates:
72+
To skip the prompts, pass your choices as flags. Compute deploys are available for every template except `svelte` (that is `hono`, `elysia`, `nest`, `next`, `astro`, `nuxt`, `tanstack-start`, and `turborepo`):
7373

7474
```npm
7575
npx create-prisma@latest --name my-api --template hono --provider postgresql --deploy
@@ -88,7 +88,7 @@ npx @prisma/cli@latest app deploy
8888
In one pass, the CLI:
8989

9090
1. **Detects your framework** from your project files, whether that is Next.js, Nuxt, Astro, Hono, NestJS, TanStack Start, or a plain Bun server. To choose it yourself, pass `--framework` (use `--framework bun` for a Bun or Elysia server).
91-
2. **Sets up a project** the first time you deploy from this directory, then writes [`.prisma/local.json`](/compute/getting-started#link-an-existing-project) to pin the directory to that project. That file is a gitignored local cache, not committed config. If your team already has a project, [link it first](/compute/getting-started#link-an-existing-project).
91+
2. **Sets up a project** the first time you deploy from this directory: it asks you to pick or create one (pass `--create-project <name>` to skip the prompt, which non-interactive runs need), then writes [`.prisma/local.json`](/compute/getting-started#link-an-existing-project) to pin the directory to that project. That file is a gitignored local cache, not committed config. If your team already has a project, [link it first](/compute/getting-started#link-an-existing-project).
9292
3. **Resolves the target branch.** Inside a Git repository, the CLI uses your current Git branch name; otherwise it falls back to `main`. Pass `--branch <name>` to choose explicitly. Because each branch is its own isolated environment, this decides where the deploy lands.
9393
4. **Builds and uploads your app**, provisions it, and prints a live URL.
9494

apps/docs/content/docs/(index)/prisma-orm/quickstart/prisma-postgres.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ datasource db {
126126
Create a Prisma Postgres database and replace the generated `DATABASE_URL` in your `.env` file with the `postgres://...` connection string from the CLI output:
127127

128128
```npm
129-
npx create-db
129+
npx create-db@latest
130130
```
131131

132132
## 5. Define your data model

apps/docs/content/docs/(index)/prisma-postgres/quickstart/prisma-orm.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
title: Prisma ORM
33
description: Create a new TypeScript project from scratch by connecting Prisma ORM to Prisma Postgres and generating a Prisma Client for database access
44
url: /prisma-postgres/quickstart/prisma-orm
5-
metaTitle: 'Quickstart: Prisma ORM with Prisma Postgres (5 min)'
6-
metaDescription: Create a new TypeScript project from scratch by connecting Prisma ORM to Prisma Postgres and generating a Prisma Client for database access.
5+
metaTitle: 'Quickstart: Prisma Postgres with Prisma ORM (5 min)'
6+
metaDescription: Set up Prisma Postgres in a new TypeScript project with Prisma ORM. Create the database, connect, and run your first type-safe queries.
77
---
88

99
[Prisma Postgres](/postgres) is a fully managed PostgreSQL database that scales to zero and integrates smoothly with both Prisma ORM and Prisma Studio. In this guide, you will learn how to set up a new TypeScript project from scratch, connect it to Prisma Postgres using Prisma ORM, and generate a Prisma Client for easy, type-safe access to your database.

apps/docs/content/docs/compute/getting-started.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ Now `npm run deploy` does the same thing.
7272

7373
## Link an existing project
7474

75-
On your first deploy, the CLI creates a project for you. If your team already has one, link to it before you deploy instead:
75+
On your first deploy, the CLI asks you to pick or create a project; pass `--create-project <name>` to skip the prompt. If your team already has one, link to it before you deploy instead:
7676

7777
```npm
7878
npx @prisma/cli@latest project link my-app

0 commit comments

Comments
 (0)