idb-client-generator is a Prisma generator that produces a fully client-side ORM backed by IndexedDB, with the same API as the real Prisma Client: same models, same operations, same argument shapes. The idea is apps built on Prisma can go offline-first without giving up the developer experience, you write the same .create(), .findMany(), .update() calls you already know, just running in the browser instead of against a server.
Getting the API to actually match Prisma's meant generating types dynamically off a project's own Prisma schema at build time, instead of hand-writing a fixed set of models. Wrote about the harder part of that separately in My best TypeScript work, which turned out to be testing: verifying that every query type produces identical results across the real Prisma client and this one, with full type safety on the test calls themselves.
const idbClient = await PrismaIDBClient.createClient();
await idbClient.user.create({
data: { name: "Alice", email: "alice@example.com" },
});
const users = await idbClient.user.findMany();
It lives under its own GitHub org and domain (prisma-idb.dev) rather than as a script buried in some other repo, since it's meant to be used as a real dependency.


