# Choose a Prisma 8 setup path (/docs/v8/getting-started)

> For the complete Prisma documentation index, see [llms.txt](https://www.prisma.io/docs/llms.txt). A markdown version of any docs page is available by appending `.md` to its URL.

Choose the fastest path to try Prisma 8 in a new or existing project.

Location: V8 > Choose a Prisma 8 setup path

Start with a quickstart if you want Prisma 8 to create the app. Use the existing-project path if you already have an app and database.

## Start a new project [#start-a-new-project]

  

#### bun

```bash
bunx create-prisma@next
```

#### pnpm

```bash
pnpm dlx create-prisma@next
```

#### yarn

```bash
yarn dlx create-prisma@next
```

#### npm

```bash
npx create-prisma@next
```

- [Full-stack tutorial](https://www.prisma.io/docs/v8/full-stack-tutorial): The whole journey in one sitting: scaffold, Prisma Postgres, first query, and a Prisma Compute deploy.

- [Quickstart with PostgreSQL](https://www.prisma.io/docs/v8/quickstart/postgresql): Create the app, pick Prisma Postgres (provisioned for you) or your own PostgreSQL, seed data, and run the first query.

- [Quickstart with MongoDB](https://www.prisma.io/docs/v8/quickstart/mongodb): Create the app, choose MongoDB, start or connect to MongoDB, seed data, and run the first query.

```text
Create a new [framework] application with Prisma 8, seed it, and run it locally.

If I have not told you which framework, stop and ask before scaffolding. Valid --template values: next, hono, nuxt, astro, nest, svelte, tanstack-start, elysia.

1. Scaffold the app: `npx create-prisma@next create my-app --template [framework] --provider postgres --prisma-postgres --yes`. The `--prisma-postgres` flag provisions a Prisma Postgres database. If I give you a connection string, pass `--database-url "<url>"` instead of `--prisma-postgres`.
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.
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/cli@next migration plan`, then `npx @prisma/cli@next migrate --yes`. Migration planning diffs the emitted contract, so the emit step is required.
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/v8/frameworks/nestjs.md.

Use the installed Prisma 8 skills and the current Prisma docs: https://www.prisma.io/docs/llms.txt (append `.md` to any docs URL for a markdown version).
```

## Add to an existing project [#add-to-an-existing-project]

  

#### bun

```bash
bunx @prisma/cli@next orm init
```

#### pnpm

```bash
pnpm dlx @prisma/cli@next orm init
```

#### yarn

```bash
yarn dlx @prisma/cli@next orm init
```

#### npm

```bash
npx @prisma/cli@next orm init
```

- [Add to PostgreSQL](https://www.prisma.io/docs/v8/add-to-existing-project/postgresql): Add Prisma 8 to an existing PostgreSQL app and infer a starter contract from the live schema.

- [Add to MongoDB](https://www.prisma.io/docs/v8/add-to-existing-project/mongodb): Add Prisma 8 to an existing MongoDB app and model the collections you want to query first.

```text
Add Prisma 8 to this existing project.

This flow is for PostgreSQL. If the project uses MongoDB, follow https://www.prisma.io/docs/v8/add-to-existing-project/mongodb.md instead; for other databases, stop and tell me.

1. Run `npx @prisma/cli@next orm init`. It writes `prisma-next.config.ts`, a starter contract and `db.ts` under `src/prisma/`, and installs Prisma 8 skills for you.
2. Set `DATABASE_URL` in `.env` to my database. If I did not give you one, create a Prisma Postgres database with `npx create-db@latest`, put its connection string in `.env`, and show me the claim URL it prints so I can keep the database.
3. If the database already has tables, infer the contract from it: `npx @prisma/cli@next contract infer`, then `npx @prisma/cli@next contract emit`, then sign it with `npx @prisma/cli@next db sign`. If the database is empty, keep the starter contract and run `npx @prisma/cli@next db init`.
4. Write one query with the generated `db` client in an existing code path, run it, and show me the returned rows.

Follow https://www.prisma.io/docs/v8/add-to-existing-project/postgresql.md and the installed Prisma 8 skills.
```

## After setup [#after-setup]

* Use the generated app scripts for the first run.
* Open `prisma-next.md` or the installed Prisma 8 skills when you want agent-ready guidance inside the project.
* Change the starter contract when you are ready to model your own data.
* Open the [Prisma 8 overview](https://www.prisma.io/docs/orm/v8) when you want the concepts behind the setup.

## Related pages

- [`Build and deploy the full Prisma stack`](https://www.prisma.io/docs/v8/full-stack-tutorial): A single tutorial from empty directory to live URL, with Prisma 8, Prisma Postgres, and Prisma Compute.