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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion .claude/skills/docs-writer/references/prisma-8.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Instead, append your section's redirect map to the commented block in `apps/docs

## Accuracy: test before you write

Every code sample must be executed against the published `@prisma/orm-*` packages before it lands, or clearly marked as conceptual. Scaffold throwaway apps with `create-prisma@next` non-interactive flags; use `bunx create-db` for PostgreSQL and `mongodb-memory-server` (replica set) for MongoDB. Key tested facts that older internal docs get wrong:
Every code sample must be executed against the published `@prisma/orm-*` packages before it lands, or clearly marked as conceptual. Scaffold throwaway apps with `create-prisma@latest` non-interactive flags; use `bunx create-db` for PostgreSQL and `mongodb-memory-server` (replica set) for MongoDB. Key tested facts that older internal docs get wrong:

- PostgreSQL model access is namespace-qualified: `db.orm.public.User`, `db.sql.public.user`. MongoDB uses flat lowercase plural roots (`db.orm.users`) and documents keep `_id`.
- `.update()` / `.delete()` affect one record; `updateAll` / `deleteAll` / `*Count` are the bulk forms. No `.count()` terminal; use `.aggregate(...)`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -394,4 +394,4 @@ In this tutorial, you learned how to integrate Atlas into an existing Prisma ORM

Check out the [example repo](https://github.com/prisma/prisma-atlas/) if you want to have a quick look at the final result of this tutorial.

Looking ahead: [Prisma 8](https://www.prisma.io/docs/orm) is a TypeScript-native rewrite of Prisma ORM, built for AI coding agents and now available as a Release Candidate. Until it reaches general availability, Prisma 7 stays the production choice. To try it, run `npm create prisma@next` or read the [Prisma 8 docs](https://pris.ly/pn-ea).
Looking ahead: [Prisma 8](https://www.prisma.io/docs/orm) is a TypeScript-native rewrite of Prisma ORM, built for AI coding agents and now available as a Release Candidate. Until it reaches general availability, Prisma 7 stays the production choice. To try it, run `npm create prisma@latest` or read the [Prisma 8 docs](https://pris.ly/pn-ea).
Original file line number Diff line number Diff line change
Expand Up @@ -260,4 +260,4 @@ No. TypedSQL types each query at generate time, so the SQL text must be static.

TypedSQL gives you raw SQL with the type safety of the Prisma Client API: write a query in `prisma/sql`, run `npx prisma generate --sql` against a live database, and call the generated function with `$queryRawTyped` for fully typed results. On Prisma ORM 7 it stays behind the `typedSql` Preview flag, works with the `prisma-client` generator's custom output directory, and fits any PostgreSQL or modern MySQL setup, including [Prisma Postgres](https://www.prisma.io/docs/postgres). The [TypedSQL documentation](https://www.prisma.io/docs/orm/prisma-client/using-raw-sql/typedsql) covers the full reference, including argument annotations and database support.

Looking ahead: [Prisma 8](https://www.prisma.io/docs/orm) is a TypeScript-native rewrite of Prisma ORM, built for AI coding agents and now available as a Release Candidate. Until it reaches general availability, Prisma 7 stays the production choice. To try it, run `npm create prisma@next` or read the [Prisma 8 docs](https://pris.ly/pn-ea).
Looking ahead: [Prisma 8](https://www.prisma.io/docs/orm) is a TypeScript-native rewrite of Prisma ORM, built for AI coding agents and now available as a Release Candidate. Until it reaches general availability, Prisma 7 stays the production choice. To try it, run `npm create prisma@latest` or read the [Prisma 8 docs](https://pris.ly/pn-ea).
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,4 @@ Caching remains one of the genuinely hard problems of software engineering. Cach

With caching built into [Prisma Postgres](https://www.prisma.io/docs/postgres/database/caching) on a per-query basis, the implementation part stops being the hard part, and you can spend the time on the decisions instead. Create a database with `npx create-db`, add a `cacheStrategy` to your hottest query, and measure the difference.

Looking ahead: [Prisma 8](https://www.prisma.io/docs/orm) is a TypeScript-native rewrite of Prisma ORM, built for AI coding agents and now available as a Release Candidate. Until it reaches general availability, Prisma 7 stays the production choice. To try it, run `npm create prisma@next` or read the [Prisma 8 docs](https://pris.ly/pn-ea).
Looking ahead: [Prisma 8](https://www.prisma.io/docs/orm) is a TypeScript-native rewrite of Prisma ORM, built for AI coding agents and now available as a Release Candidate. Until it reaches general availability, Prisma 7 stays the production choice. To try it, run `npm create prisma@latest` or read the [Prisma 8 docs](https://pris.ly/pn-ea).
Original file line number Diff line number Diff line change
Expand Up @@ -1280,4 +1280,4 @@ No. Calling `$extends` returns a new, extended client instance and leaves the or

Extensions are how you teach Prisma Client the conventions of your codebase: the 15 patterns above are starting points, and the [examples repo](https://github.com/prisma/prisma-client-extensions) keeps runnable versions of each. They work the same against any Postgres, including a [Prisma Postgres](https://www.prisma.io/docs/postgres) database you can create in seconds with `npx create-db`.

Looking ahead: [Prisma 8](https://www.prisma.io/docs/orm) is a TypeScript-native rewrite of Prisma ORM, built for AI coding agents and now available as a Release Candidate. Until it reaches general availability, Prisma 7 stays the production choice. To try it, run `npm create prisma@next` or read the [Prisma 8 docs](https://pris.ly/pn-ea).
Looking ahead: [Prisma 8](https://www.prisma.io/docs/orm) is a TypeScript-native rewrite of Prisma ORM, built for AI coding agents and now available as a Release Candidate. Until it reaches general availability, Prisma 7 stays the production choice. To try it, run `npm create prisma@latest` or read the [Prisma 8 docs](https://pris.ly/pn-ea).
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ authors:
metaTitle: "Deploy Prisma Apps with create-prisma"
metaDescription: "create-prisma now scaffolds Compute-ready Prisma apps with prisma.compute.ts, compute:deploy, Prisma Postgres, and Prisma Skills add-ons."
heroImagePath: "/create-prisma-deploy-prisma-compute/imgs/hero.svg"
heroImageAlt: "Scaffold a deploy-ready app with create-prisma: bun create prisma@latest, then choose a template, generate a typed config, and add Postgres and Skills."
heroImageAlt: "Scaffold a deploy-ready app with create-prisma: bun create prisma@stable, then choose a template, generate a typed config, and add Postgres and Skills."
metaImagePath: "/create-prisma-deploy-prisma-compute/imgs/meta.png"
excerpt: "create-prisma now scaffolds Compute-ready Prisma apps with prisma.compute.ts, compute:deploy, Prisma Postgres, and Prisma Skills add-ons."
series: prisma-compute
Expand All @@ -29,7 +29,7 @@ Run the initializer, pick a Compute-ready template, and the generated project ca
- a `compute:deploy` script for later deploys

```bash
bun create prisma@latest
bun create prisma@stable
```

![Terminal output from create-prisma showing Prisma Compute setup](/create-prisma-deploy-prisma-compute/imgs/create-prisma-terminal.png)
Expand Down
12 changes: 6 additions & 6 deletions apps/blog/content/blog/introducing-create-prisma/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ You know what you want to build, so you pick a framework and a database, but bef
Today, we're introducing `create-prisma`, a CLI that creates a new app with Prisma already set up.

```bash
npm create prisma@latest
npm create prisma@stable
```

Pick a template, pick a database, and start with a working Prisma app.
Expand All @@ -39,15 +39,15 @@ Next.js, Nuxt, SvelteKit, Hono, NestJS, TanStack Start, and Turborepo do not all
Create a Hono API with PostgreSQL:

```bash
npm create prisma@latest --name my-api --template hono --provider postgresql
npm create prisma@stable -- --name my-api --template hono --provider postgresql
cd my-api
npm run dev
```

Or create a Turborepo where Prisma lives in a shared database package:

```bash
npm create prisma@latest --name my-monorepo --template turborepo --provider postgresql
npm create prisma@stable -- --name my-monorepo --template turborepo --provider postgresql
```

Templates are available for Hono, Elysia, NestJS, Next.js, SvelteKit, Astro, Nuxt, TanStack Start, and Turborepo.
Expand All @@ -70,7 +70,7 @@ By default, it also includes a small `User` model, seed data, and an example que
If you choose PostgreSQL and do not provide a `DATABASE_URL`, `create-prisma` can create a Prisma Postgres database for you:

```bash
npm create prisma@latest \
npm create prisma@stable -- \
--name my-app \
--template next \
--provider postgresql \
Expand All @@ -86,7 +86,7 @@ Databases created this way are temporary for 24 hours until claimed. That makes
`create-prisma` can also set up Prisma tools for your editor and AI coding agents:

```bash
npm create prisma@latest \
npm create prisma@stable -- \
--name my-app \
--template next \
--provider postgresql \
Expand All @@ -100,7 +100,7 @@ These add-ons can install Prisma skills for coding agents, configure the Prisma
Try `create-prisma` today:

```bash
npm create prisma@latest
npm create prisma@stable
```

You can find the project on GitHub at [github.com/prisma/create-prisma](https://pris.ly/create-prisma-gh).
Original file line number Diff line number Diff line change
Expand Up @@ -845,4 +845,4 @@ In this chapter, you learned how to implement JWT authentication in your NestJS

This wraps up the series. Across five chapters, you built a REST API with NestJS 11 and Prisma ORM 7, added input validation, error handling, relational data and authentication; every piece verified on the current stack. From here, good next steps are [The Ultimate Guide to Testing with Prisma](https://www.prisma.io/blog/series/testing-with-prisma) for test coverage, the [Prisma Migrate docs](https://www.prisma.io/docs/orm/prisma-migrate/getting-started) for evolving your schema, and Prisma Postgres as the database for your production deployment.

Looking ahead: [Prisma 8](https://www.prisma.io/docs/orm) is a TypeScript-native rewrite of Prisma ORM, built for AI coding agents and now available as a Release Candidate. Until it reaches general availability, Prisma 7 stays the production choice. To try it, run `npm create prisma@next` or read the [Prisma 8 docs](https://pris.ly/pn-ea).
Looking ahead: [Prisma 8](https://www.prisma.io/docs/orm) is a TypeScript-native rewrite of Prisma ORM, built for AI coding agents and now available as a Release Candidate. Until it reaches general availability, Prisma 7 stays the production choice. To try it, run `npm create prisma@latest` or read the [Prisma 8 docs](https://pris.ly/pn-ea).
Original file line number Diff line number Diff line change
Expand Up @@ -404,4 +404,4 @@ In this chapter you learned how to handle Prisma errors, like the `P2002` unique

In the [next part](/nestjs-prisma-relational-data-7D056s1kOabc) of this series, you will add a `User` model and learn how to handle relational data in your API. If you want to go deeper on the Prisma side first, the [Prisma getting started guide](https://www.prisma.io/docs/getting-started), [Prisma Migrate docs](https://www.prisma.io/docs/orm/prisma-migrate/getting-started), and Prisma Postgres are the best next resources for taking the app from tutorial to production-ready workflow.

Looking ahead: [Prisma 8](https://www.prisma.io/docs/orm) is a TypeScript-native rewrite of Prisma ORM, built for AI coding agents and now available as a Release Candidate. Until it reaches general availability, Prisma 7 stays the production choice. To try it, run `npm create prisma@next` or read the [Prisma 8 docs](https://pris.ly/pn-ea).
Looking ahead: [Prisma 8](https://www.prisma.io/docs/orm) is a TypeScript-native rewrite of Prisma ORM, built for AI coding agents and now available as a Release Candidate. Until it reaches general availability, Prisma 7 stays the production choice. To try it, run `npm create prisma@latest` or read the [Prisma 8 docs](https://pris.ly/pn-ea).
Original file line number Diff line number Diff line change
Expand Up @@ -921,4 +921,4 @@ In this chapter, you learned how to model relational data in a NestJS applicatio

In the [next part](/nestjs-prisma-authentication-7D056s1s0k3l) of this series, you will secure these endpoints by adding JWT authentication to the API, and replace the plain text passwords with properly hashed ones. If you want to go deeper on relations first, the [Prisma relations docs](https://www.prisma.io/docs/orm/prisma-schema/data-model/relations) cover one-to-many and other relation types in depth, and Prisma Postgres is an easy way to stand up the database layer for follow-on work.

Looking ahead: [Prisma 8](https://www.prisma.io/docs/orm) is a TypeScript-native rewrite of Prisma ORM, built for AI coding agents and now available as a Release Candidate. Until it reaches general availability, Prisma 7 stays the production choice. To try it, run `npm create prisma@next` or read the [Prisma 8 docs](https://pris.ly/pn-ea).
Looking ahead: [Prisma 8](https://www.prisma.io/docs/orm) is a TypeScript-native rewrite of Prisma ORM, built for AI coding agents and now available as a Release Candidate. Until it reaches general availability, Prisma 7 stays the production choice. To try it, run `npm create prisma@latest` or read the [Prisma 8 docs](https://pris.ly/pn-ea).
Original file line number Diff line number Diff line change
Expand Up @@ -1025,4 +1025,4 @@ One of the main takeaways from this tutorial is how easy it is to build a REST A

In the [next part](/nestjs-prisma-validation-7D056s1kOla1) of this series, you will add input validation and transformation to this API. If you want to go deeper on the Prisma side first, start with the [Prisma getting started guide](https://www.prisma.io/docs/getting-started), learn more about [Prisma Migrate](https://www.prisma.io/docs/orm/prisma-migrate/getting-started), or create a Prisma Postgres database for your next NestJS project.

Looking ahead: [Prisma 8](https://www.prisma.io/docs/orm) is a TypeScript-native rewrite of Prisma ORM, built for AI coding agents and now available as a Release Candidate. Until it reaches general availability, Prisma 7 stays the production choice. To try it, run `npm create prisma@next` or read the [Prisma 8 docs](https://pris.ly/pn-ea).
Looking ahead: [Prisma 8](https://www.prisma.io/docs/orm) is a TypeScript-native rewrite of Prisma ORM, built for AI coding agents and now available as a Release Candidate. Until it reaches general availability, Prisma 7 stays the production choice. To try it, run `npm create prisma@latest` or read the [Prisma 8 docs](https://pris.ly/pn-ea).
Original file line number Diff line number Diff line change
Expand Up @@ -385,4 +385,4 @@ You might have noticed that NestJS heavily relies on decorators. This is a very

In the [next part](/nestjs-prisma-error-handling-7D056s1kOop2) of this series, you will learn how to handle errors in a NestJS and Prisma application, including the database errors that validation alone can't catch. If you want to go deeper on the Prisma side first, the [Prisma getting started guide](https://www.prisma.io/docs/getting-started) and [Prisma Migrate docs](https://www.prisma.io/docs/orm/prisma-migrate/getting-started) are good next steps, and Prisma Postgres is an easy way to stand up the database layer for follow-on work.

Looking ahead: [Prisma 8](https://www.prisma.io/docs/orm) is a TypeScript-native rewrite of Prisma ORM, built for AI coding agents and now available as a Release Candidate. Until it reaches general availability, Prisma 7 stays the production choice. To try it, run `npm create prisma@next` or read the [Prisma 8 docs](https://pris.ly/pn-ea).
Looking ahead: [Prisma 8](https://www.prisma.io/docs/orm) is a TypeScript-native rewrite of Prisma ORM, built for AI coding agents and now available as a Release Candidate. Until it reaches general availability, Prisma 7 stays the production choice. To try it, run `npm create prisma@latest` or read the [Prisma 8 docs](https://pris.ly/pn-ea).
Original file line number Diff line number Diff line change
Expand Up @@ -119,4 +119,4 @@ You need pooling, but not necessarily a separate pooler. Prisma Postgres include
</Accordion>
</Accordions>

Looking ahead: [Prisma 8](https://www.prisma.io/docs/orm) is a TypeScript-native rewrite of Prisma ORM, built for AI coding agents and now available as a Release Candidate. Until it reaches general availability, Prisma 7 stays the production choice. To try it, run `npm create prisma@next` or read the [Prisma 8 docs](https://pris.ly/pn-ea).
Looking ahead: [Prisma 8](https://www.prisma.io/docs/orm) is a TypeScript-native rewrite of Prisma ORM, built for AI coding agents and now available as a Release Candidate. Until it reaches general availability, Prisma 7 stays the production choice. To try it, run `npm create prisma@latest` or read the [Prisma 8 docs](https://pris.ly/pn-ea).
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ If you've ever picked up a new framework, you know how long it takes to climb a
One command scaffolds a new project with Prisma 8, including a [family of skills](https://www.prisma.io/docs/ai/tools/skills) which make your agent an instant expert.

```bash
npm create prisma@next
npm create prisma@latest
```

The learning curve disappears and you can start working on something meaningful straight away. Like sitting beside someone who knows their stuff, learn the framework by watching your agent execute your instructions. When you have a question, ask your agent. It knows the answer.
Expand Down Expand Up @@ -199,7 +199,7 @@ Prisma 8 brings **Prisma's world-class DX to your agent**, so you can focus on b
To [try it today](https://www.prisma.io/docs/v8/quickstart/postgresql) in a fresh project, run:

```bash
npm create prisma@next
npm create prisma@latest
```

To add Prisma 8 to an existing project, run:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ We've shared [our benchmark repo](https://pris.ly/pn-benchmarks), so you can run
There are two ways to [get started](https://www.prisma.io/docs/v8/quickstart/postgresql). To spin up a complete template app, scaffold one with:

```shell
bunx create-prisma@next
bunx create-prisma@latest
```

This sets you up with a [Prisma Postgres](https://www.prisma.io/postgres) database and can deploy the app to [Prisma Compute](https://www.prisma.io/compute), our serverless runtime for Prisma apps, so you can see the bundle-size and cold-start benefits above end to end.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ Here is the workflow, from an empty directory. The screenshots in this post come
### Step 1: Create a project

```bash
npm create prisma@next
npm create prisma@latest
```

Answer the prompts (PostgreSQL, PSL, your package manager) or skip them:

```bash
npm create prisma@next -- my-app --yes --provider postgres --authoring psl --template minimal
npm create prisma@latest -- my-app --yes --provider postgres --authoring psl --template minimal
```

This scaffolds a contract at `src/prisma/contract.prisma`. Then create a [Prisma Postgres](https://www.prisma.io/docs/postgres) database with `npx create-db@latest` and export the connection string it prints as `DATABASE_URL` (the CLI reads the environment variable, not `.env`). The database is temporary for 24 hours; `create-db` also prints a claim URL to keep it.
Expand Down Expand Up @@ -237,7 +237,7 @@ From the database, not from your repo. Prisma 8 writes one row per applied migra
## Try it

```bash
npm create prisma@next
npm create prisma@latest
```

Model something, apply two migrations, and open **Migrations**. Tell us what you'd want in the timeline next on [Discord](https://pris.ly/discord).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ The fastest way to understand searchable encryption is to run it. You don't need
### 1. Create a Prisma 8 app

```sh
npx create-prisma@next
npx create-prisma@latest
```

This gives you a fresh project with the contract-first workflow already wired up: a `contract.prisma` describing your models, and a migration loop that plans and applies the changes needed to match it.
Expand Down
Loading
Loading