Leap makes it easy to use ORMs like Prisma. Just describe your data design, and Leap generates the integration.

How it works

  1. Describe your data layer in a prompt, including the specifics from the example prompt below
  2. Leap generates the integration
  3. On build Prisma generates migration files and Leap generates the database client
LLM results vary, but we’ve had success getting Prisma set up and working on the first try—including schema definitions, client imports, and connection handling.

Example prompt

Each Encore service must import the db and create its own instance of a PrismaClient, e.g:
import db from "../dbs/main";
import { PrismaClient } from "../dbs/main/gen/client";
export const prisma = new PrismaClient({ datasources: { db: {url: db.connectionString}}});
Migration files will be automatically generated by Prisma on build.
The client will be automatically generated on build and placed in the ./main/gen/client module