⚠️ This docs site and backframe.js are still under construction.
Documentation
Plugins & Adapters
@backframe/adapter-prisma

The Prisma adapter for Backframe is a simple wrapper around the actual Prisma ORM that makes it possible for other plugins and internal Backframe tools to communicate with your database. It is not intended to be used directly.

Installation

pnpm add @backframe/adapter-prisma

Usage

Once installed, you will need to pass your Prisma client to the adapter and then pass the adapter to the Backframe config object. The best place to do this is inside the bf.config.ts file.

// bf.config.ts
import { PrismaAdapter } from "@backframe/adapter-prisma";
import { defineConfig } from "@backframe/core";
import { PrismaClient } from "@prisma/client";
 
const client = new PrismaClient();
const database = new PrismaAdapter(client);
 
export default defineConfig({
  interfaces: {
    rest: {},
  },
  database,
});

And that's it! You can now use the Prisma adapter with Backframe.