# Get started with Prisma (/docs) > 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. Prisma is a complete TypeScript stack with one workflow: **build** your app and run all of it on your machine, then **deploy** it to the Prisma platform with one command. Check out the [full-stack tutorial](https://www.prisma.io/docs/full-stack-tutorial). ## Build Define the app in TypeScript and run everything locally before you ship. - **[Local development](https://www.prisma.io/docs/local-development)**: One command runs your whole app on your machine, with your services on Bun wired to local Postgres and local storage, and no cloud credentials. - **[Composer](https://www.prisma.io/docs/composer)**: Declare your services and the resources they depend on: databases, jobs, buckets, secrets. - **[ORM](https://www.prisma.io/docs/orm)**: Model your data and query it with type safety, end to end. ## Deploy One deploy provisions everything on the Prisma platform and connects it. - **[Compute](https://www.prisma.io/docs/compute)**: Hosting for your services, next to your data. - **[Storage](https://www.prisma.io/docs/storage)**: S3-compatible object storage inside your project. - **[Postgres](https://www.prisma.io/docs/postgres)**: Managed PostgreSQL, provisioned during setup. - **[Deploy](https://www.prisma.io/docs/prisma-compute/deploy)**: Ship from your terminal with Composer, from the Console, or on every push from a connected repository with a deploy workflow. Every branch gets its own environment. One CLI serves the whole stack: `npx prisma@latest` drives the ORM and the Prisma platform, from migrations and local dev to deploys, databases, and buckets, for you and your coding agent. See the [CLI reference](https://www.prisma.io/docs/cli). ## Prisma ORM Prisma ORM 8 works without the rest of the Prisma platform, with your own PostgreSQL or MongoDB database. Pick the page that matches where you are starting from. Each page also links the MongoDB version of the same steps. - [I'm creating a new app](https://www.prisma.io/docs/prisma-orm/quickstart/postgresql): Start from a template - [I have an app, but no database yet](https://www.prisma.io/docs/prisma-orm/quickstart/existing-app/postgresql): Add Prisma ORM, then create the tables - [I have a database already](https://www.prisma.io/docs/prisma-orm/add-to-existing-project/postgresql): Start from the tables you have - [I have a Prisma 7 app](https://www.prisma.io/docs/guides/upgrade-prisma-orm/postgresql): Move to Prisma ORM 8 in steps ## Pick your framework Every guide runs the same journey with the same commands: scaffold, connect Prisma Postgres, run a real query, and deploy. SvelteKit and Deno don't deploy to Compute yet; their guides stop at a verified local run. - [Next.js](https://www.prisma.io/docs/guides/frameworks/nextjs) - [Hono](https://www.prisma.io/docs/guides/frameworks/hono) - [TanStack Start](https://www.prisma.io/docs/guides/frameworks/tanstack-start) - [NestJS](https://www.prisma.io/docs/guides/frameworks/nestjs) - [Astro](https://www.prisma.io/docs/guides/frameworks/astro) - [Nuxt](https://www.prisma.io/docs/guides/frameworks/nuxt) - [SvelteKit](https://www.prisma.io/docs/guides/frameworks/sveltekit) - [Bun](https://www.prisma.io/docs/guides/runtimes/bun) - [Elysia](https://www.prisma.io/docs/guides/frameworks/elysia) - [Deno](https://www.prisma.io/docs/guides/runtimes/deno) If you're using Express or another Node.js server, pick your starting point in the Prisma ORM section above. ## Prisma ORM 7 Prisma ORM 7 remains fully supported. Scaffold it with `npx create-prisma@stable`, or add it to an existing project with `npx prisma@prev init`. It pairs with Prisma Postgres and Prisma Compute the same way. When you're ready, Prisma ORM 8 is the upgrade path. - [Prisma ORM 7 setup paths](https://www.prisma.io/docs/v7/getting-started): All database quickstarts, plus the agent prompt - [Prisma ORM 7 quickstart](https://www.prisma.io/docs/v7/prisma-orm/quickstart/prisma-postgres): With Prisma Postgres, 5 min ## Other setups If you already have an app or a database, or need a single Prisma product on its own, each path below has a guide to follow and a prompt to hand to your agent. **Existing project, your own database, or a single product on its own** ### Add Prisma to an existing project Follow the guide: [PostgreSQL guide](https://www.prisma.io/docs/prisma-orm/add-to-existing-project/postgresql) ```text Add Prisma ORM to this existing project. This flow is for PostgreSQL. If the project uses MongoDB, follow https://www.prisma.io/docs/prisma-orm/add-to-existing-project/mongodb.md instead; for other databases, stop and tell me. 1. Run `npx prisma@latest orm init --yes --target postgres --authoring psl` (the flags are required when the CLI cannot prompt). It writes `prisma.config.ts`, a starter contract and `db.ts` under `src/prisma/`, and installs dependencies. Then run `npx prisma skills sync` to install the Prisma ORM skills. 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 contract infer`, then `npx prisma contract emit`, then sign it with `npx prisma db sign`. If the database is empty, keep the starter contract and run `npx prisma 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/prisma-orm/add-to-existing-project/postgresql.md and the installed Prisma ORM skills. ``` ### Prisma ORM with your own PostgreSQL database Follow the guide: [Quickstart](https://www.prisma.io/docs/prisma-orm/quickstart/postgresql) ```text Create a new [framework] application with Prisma ORM against my existing PostgreSQL database. If I have not given you a connection string, stop and ask; do not invent one. Valid --template values: minimal (the default), next, hono, nuxt, astro, nest, svelte, tanstack-start, elysia. Check the Node.js version first: `node --version` must print 22.18 or newer on the 22 line, 24.11 or newer on the 24 line, or 26 or newer. For the nuxt template, it must print 22.22.3 or newer on the 22 line, 24.15 or newer on the 24 line, or 26 or newer, because Nuxt requires it. The npm that ships with your Node.js release works; on Node.js 22 that is npm 10. 1. Scaffold: `npm create prisma@latest -- my-app --template [framework] --provider postgres --yes`. 2. Export my connection string as `DATABASE_URL` in the shell; the generated scripts read the environment variable, not `.env`. From the project directory: `npm run db:init`, then start `npm run dev` in the background and verify the sample query returns data. Sample users are seeded automatically on the app's first query; there is no separate seed script. 3. Evolve the starter contract under `src/prisma/` into my schema, then run `npm run contract:emit`, `npx prisma migration plan`, and `npx prisma db migrate --yes`. Do not provision any hosted database. Use the installed Prisma ORM skills and https://www.prisma.io/docs/llms.txt for current docs. ``` ### Prisma ORM only (Prisma ORM 7) Follow the guide: [Quickstart](https://www.prisma.io/docs/v7/prisma-postgres/quickstart/prisma-orm) ```text Add Prisma ORM 7 to this project with my existing database. If I have not given you a database connection string and none exists in the project, stop and ask. 1. Run `npx prisma@prev init` (Prisma ORM 7). For an existing database, set DATABASE_URL in `.env` and introspect it with `npx prisma@prev db pull`; for a new schema, define models in `prisma/schema.prisma` and run `npx prisma@prev migrate dev --name init`. If migrate dev asks to reset the database, stop and ask me first. 2. Install the driver adapter for the database (Prisma ORM 7 requires one), e.g. `npm install @prisma/adapter-pg` for PostgreSQL, and pass it to `new PrismaClient({ adapter })`. Generate the client with `npx prisma@prev generate` and write one query in an existing code path. 3. Run the query (e.g. with `npx tsx`) and show me the output, the schema, and the query you added. Current docs: https://www.prisma.io/docs/orm/v7.md and https://www.prisma.io/docs/llms.txt. ``` ### Prisma Postgres only Follow the guide: [create-db guide](https://www.prisma.io/docs/postgres/npx-create-db) ```text Create a Prisma Postgres database for this project. 1. Run `npx create-db@latest`. It creates a temporary Prisma Postgres database without an account and prints a connection string plus a claim URL. 2. Put the connection string in `.env` as DATABASE_URL and wire it into whichever of Prisma ORM, Kysely, Drizzle, TypeORM, or node-postgres the project already uses (detect it from package.json; if none, ask me). Verify the connection with one trivial query such as `select 1`. 3. Remind me to open the claim URL to keep the database in my Prisma workspace. Current docs: https://www.prisma.io/docs/postgres.md. ``` ### Prisma Compute only Follow the guide: [Deploy guide](https://www.prisma.io/docs/prisma-compute/deploy) ```text Deploy this app to Prisma Compute using `npx prisma@latest`. Compute runs apps declared with Prisma Composer: your server code plus a small TypeScript declaration. Port the app following https://www.prisma.io/docs/composer/porting-an-app.md. SvelteKit and Deno are not supported yet; if the app is one of those, stop and tell me. 1. Install `@prisma/composer` and `@prisma/composer-prisma-cloud`, and install `prisma` as a dev dependency. Do not pin `effect`: Composer pins it. Only if another dependency pins a different `effect` and `prisma.config.ts` fails with `CLI.CONFIG_UNREADABLE`, add the override from https://www.prisma.io/docs/composer/deploying#when-prismaconfigts-fails-on-an-effect-version-conflict. Then install the Composer skill with `npx prisma skills sync`, and use it. 2. Declare the app: a `service.ts` with `compute({ name, deps, build })`, a `module.ts` that provisions it, and a `prisma.config.ts` whose `composer` section lists the extensions and the state store (`definePrismaConfig` from `prisma/config`, `defineConfig as composer` from `@prisma/composer/config`). Read the port from `service.port()` and bind 0.0.0.0. Replace other `process.env` reads with the service input schema, binding credentials like DATABASE_URL with `envSecret`. Composer does not build: produce one self-contained entry file per service (for example `esbuild --bundle --platform=node --format=esm --outfile=dist/server.mjs`), or use the framework build adapter (Next.js needs the `nextjs` adapter and `output: "standalone"`). 3. Verify locally: run the build, then `npx prisma dev module.ts --detach`, curl each service at the URL `npx prisma dev url ` prints, then run `npx prisma dev stop`. 4. Confirm I am signed in with `npx prisma auth whoami`; if not, stop and ask me to run `npx prisma auth login` (it opens a browser). 5. Deploy: run the build, then `npx prisma deploy module.ts` with the app's env values (like DATABASE_URL) exported in the shell; the first deploy copies input values up to the deployment. Verify the printed public URL with curl. Current docs: https://www.prisma.io/docs/composer/porting-an-app.md and https://www.prisma.io/docs/prisma-compute/deploy.md. ``` If you're using MongoDB, follow the [MongoDB quickstart](https://www.prisma.io/docs/prisma-orm/quickstart/mongodb) or [add Prisma ORM to an existing MongoDB app](https://www.prisma.io/docs/prisma-orm/add-to-existing-project/mongodb). If you work with [Kysely](https://www.prisma.io/docs/prisma-postgres/quickstart/kysely), [Drizzle](https://www.prisma.io/docs/prisma-postgres/quickstart/drizzle-orm), or [TypeORM](https://www.prisma.io/docs/prisma-postgres/quickstart/typeorm), follow the Prisma Postgres quickstart for that tool. ## Browse the docs This page hides the full navigation to keep the first run focused. These links open the full docs for each product. - [Prisma ORM](https://www.prisma.io/docs/orm): Prisma ORM 8, with Prisma ORM 7 docs - [Prisma Postgres](https://www.prisma.io/docs/postgres): The managed database - [Prisma Compute](https://www.prisma.io/docs/compute): Hosting and branching - [CLI reference](https://www.prisma.io/docs/cli): Every command and flag - [Guides](https://www.prisma.io/docs/guides): Frameworks and workflows - [AI tools](https://www.prisma.io/docs/ai): Skills, MCP, and prompts