Prisma Next IDB
PSL-authored IndexedDB with typed accessors and explicit migrations
Prisma Next IDB is a preview IndexedDB client built on Prisma Next contracts.
You write a .prisma schema. Prisma Next reads it directly, emits a typed contract, plans migrations, and gives the browser a runtime client that applies those migrations before opening the database.
model User {
id String @id
name String
email String? @unique
todos Todo[]
}
model Todo {
id String @id
title String
done Boolean
userId String
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
}Why it exists
Prisma Next IDB is the migration-first path. It uses Prisma Next's planner architecture, drivers, adapters, and contract spaces instead of generator-only codegen.
That gives this version a better foundation for schema evolution: migration packages are reviewed, committed, bundled, and applied in order. It also now has its own bidirectional sync engine, built on the same contract-space foundation rather than bolted on afterward.
Current shape
- Schema source: PSL, read directly by Prisma Next
- Runtime: browser IndexedDB
- Client style: chainable typed accessors, not Prisma Client's object-argument API
- Migrations: explicit packages under
migrations/app, with extension packages (like sync) contributing their own independently-versioned migration spaces - Sync: optional, via
@prisma-next-idb/sync-extension-idband@prisma-next-idb/sync-server