# Prisma Composer (/docs/composer)

> 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.

Build apps made of multiple services in TypeScript, then deploy services, databases, and the wiring between them with one command.

Location: Prisma Composer

Prisma Composer is a TypeScript framework for apps made of more than one piece. You declare each service and what it depends on, such as other services, databases, schedules, and secrets, compose them into a **Prisma App**, and deploy the whole thing to [Prisma Compute](https://www.prisma.io/docs/compute) and [Prisma Postgres](https://www.prisma.io/docs/postgres) with one command. There is no infrastructure configuration to write or maintain.

> [!NOTE]
> Early Access
> 
> Prisma Composer is in [Early Access](https://www.prisma.io/docs/console/more/feature-maturity#early-access). APIs and commands can change between releases. Until the unified `prisma` CLI ships, run Composer commands with `npx @prisma/cli@next composer <command>`.

## Get started [#get-started]

The fastest way to understand Composer is to build a small app with it. The quickstart takes you from an empty directory to two services calling each other over a typed contract, running on your machine.

- [Build your first Prisma App](https://www.prisma.io/docs/composer/getting-started): Two services, one typed contract, one command to run them together.

- [Port an app you already have](https://www.prisma.io/docs/composer/porting-an-app): Keep your server code and add the declarations around it.

## Built for agents [#built-for-agents]

Composer is designed to be driven by an AI coding agent. Before you or your agent write any code, add the Composer skill:

  

#### bun

```bash
bunx skills add prisma/composer
```

#### pnpm

```bash
pnpm dlx skills add prisma/composer
```

#### yarn

```bash
yarn dlx skills add prisma/composer
```

#### npm

```bash
npx skills add prisma/composer
```

Your agent now knows the whole API, including the ready-made Modules for scheduled jobs, blob storage, and event streams. Describe what you want, for example "a Next.js storefront calling an orders API with its own Postgres", and review TypeScript instead of infrastructure config.

Three properties make this reliable rather than plausible:

* **Modules snap together.** A capability arrives as a [Module](https://www.prisma.io/docs/composer/apps-and-modules) that owns its internals and exposes a typed port. Adding scheduled jobs or a blob store is a couple of lines of composition, not an integration your agent has to invent.
* **The compiler checks the wiring.** A dependency wired to the wrong producer, a missing RPC handler, or a config value of the wrong shape does not compile. Mistakes fail `tsc` in seconds, not a deploy ten minutes later.
* **Deploys are deterministic.** One command, no infrastructure config, and re-running it converges instead of drifting.

## Two rules shape everything [#two-rules-shape-everything]

* **Your code never reaches for its environment.** No `process.env`, no URLs. Every dependency arrives typed through one call, `service.load()`, which is why any environment (production, a staging copy, a test) is just a different set of injected values.
* **The framework never bundles or transforms your code.** You build with the bundler you already use; the deploy assembles what you built.

## What it looks like [#what-it-looks-like]

A service declares its dependencies as data; app code receives them from `service.load()`:

```ts
// service.ts, the declaration: pure data
export default compute({
  name: 'storefront',
  deps: { catalog: rpc(catalogContract) },   // "I call catalog's API"
  build: nextjs({ module: import.meta.url, appDir: '..' }),
});
```

```ts
// app code: load() returns a client typed by that contract
const { catalog } = service.load();
const { products } = await catalog.listProducts({});
```

The root module is the app. It provisions the pieces and wires the typed ports:

```ts
// module.ts
export default module('store', ({ provision }) => {
  const catalog = provision(catalogModule);      // owns its own Postgres
  const orders = provision(ordersModule, { deps: { catalog: catalog.rpc } });
  provision(storefrontService, { deps: { catalog: catalog.rpc, orders: orders.rpc } });
});
```

Running `npx @prisma/cli@next composer deploy module.ts` provisions all of it: the services on Prisma Compute, the databases on Prisma Postgres, and the authenticated connections between them.

## What to read next [#what-to-read-next]

* [Getting started](https://www.prisma.io/docs/composer/getting-started): build and run a two-service app from scratch.
* [Apps and Modules](https://www.prisma.io/docs/composer/apps-and-modules): how services, resources, and Modules compose into an app.
* [Services and contracts](https://www.prisma.io/docs/composer/services-and-contracts): typed RPC between services, with authentication and retries handled for you.
* [Databases](https://www.prisma.io/docs/composer/databases): give a service a Postgres database, plain or typed by a Prisma 8 contract.
* [Local development](https://www.prisma.io/docs/composer/local-development): run the whole app on your machine with no cloud credentials.
* [Deploying](https://www.prisma.io/docs/composer/deploying): production, isolated stages, CI, and teardown.
* [CLI reference](https://www.prisma.io/docs/composer/cli-reference): every Composer command and flag.
* [Limitations](https://www.prisma.io/docs/composer/limitations): what Composer does not do yet.

## Related pages

- [`Build faster with Prisma + AI`](https://www.prisma.io/docs/ai): Build faster with Prisma and AI coding tools like Cursor, Codex, and ChatGPT
- [`CLI Overview`](https://www.prisma.io/docs/cli): The Prisma CLI is the command-line interface for Prisma ORM. Use it to initialize projects, generate Prisma Client, manage databases, run migrations, and more
- [`Console`](https://www.prisma.io/docs/console): Learn how to use the Console to manage and integrate Prisma products into your application.
- [`Guides`](https://www.prisma.io/docs/guides): A collection of guides for various tasks and workflows
- [`Introduction to Prisma 8`](https://www.prisma.io/docs/v8): Prisma 8 is the next major version of Prisma ORM, available as a Release Candidate.