Skip to content

Prisma

Prisma is best known for Prisma ORM, a TypeScript ORM that generates a typed client from your schema. Its data platform adds Prisma Postgres, a serverless database, and Prisma Compute, which runs the apps that use it.

New to Prisma? Start with What is Prisma?.

A project with a database, and an app deployed next to it:

alchemy.run.ts
const project = yield* Prisma.Project("app", { region: "us-east-1" });
const app = yield* Prisma.Compute("api", {
project,
path: "./app",
build: "auto",
healthCheck: { path: "/api/health" },
});

The app receives the database’s DATABASE_URL automatically. From any other runtime, bind a connection with Prisma.Connect and hand its URL to Prisma ORM, Effect SQL or Drizzle:

src/worker.ts
const db = yield* Prisma.Connect(connection);
const sql = yield* SQL.Postgres({ url: db.databaseUrl });

Want to build? The tutorial deploys a project, an Effect API, Postgres and a Vite frontend, one step at a time. Start with Setup to connect your workspace.

Looking for something specific? Every section of these docs is listed below, and every resource is in the generated API reference.