npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@prisma-idb/idb-client-generator

v0.35.1

Published

Generate types for idb from prisma schema

Readme

Prisma IndexedDB Client Generator

This library is a Prisma generator that creates a client with a similar syntax and behavior to the Prisma Client but is designed to operate with IndexedDB for local storage. It allows developers to interact with IndexedDB using a familiar Prisma-like API.

📖 Documentation🚀 Live Demo📦 npm Package🏗️ Main Repository

⚠️ Warning

This library is not fully ready yet. Check issue #52 for the current list of implemented features.

Features

  • Prisma-like syntax and API for IndexedDB.
  • Supports CRUD operations with structured data.
  • Integrates seamlessly with Prisma workflows.
  • Generates a client tailored to your Prisma schema.

Installation

npm install @prisma-idb/idb-client-generator

Usage

1. Add to Prisma Schema

Update your prisma.schema file to include the generator:

datasource db {
  provider = "postgresql"
  url      = env("DATABASE_URL")
}

generator client {
  provider = "prisma-client-js"
}

generator prismaIDB {
  provider = "idb-client-generator"
  output   = "./prisma-idb"
}

model User {
  id    Int    @id @default(autoincrement())
  name  String
  email String @unique
}

2. Generate the Client

Run the Prisma client generation command:

npx prisma generate

This will generate a client in your project.

3. Use the Client

Import the generated client and use it in your code:

import { PrismaIDBClient } from "./outputPath/prisma-idb-client";

async function main() {
  const idbClient = await PrismaIDBClient.createClient();

  await idbClient.user.create({
    data: { name: "Alice", email: "[email protected]" },
  });

  const users = await idbClient.user.findMany();
  console.log(users);
}

API

The API mimics Prisma Client's API for ease of use:

create

Insert a new record:

idbClient.modelName.create({
  data: {
    field: value,
  },
});

findMany

Retrieve all records:

idbClient.modelName.findMany();

findUnique

Retrieve a single record by unique key:

idbClient.modelName.findUnique({
  where: { key: value },
});

update

Update a record:

idbClient.modelName.update({
  where: { key: value },
  data: { key: newValue },
});

delete

Delete a record:

idbClient.modelName.delete({
  where: { key: value },
});

Resources

Contributing

We welcome contributions! Please see our CONTRIBUTING.md for guidelines on how to contribute to this project.

Security

If you discover a security vulnerability, please follow our SECURITY.md guidelines on reporting issues responsibly.

License

This project is licensed under the GNU Affero General Public License v3.0. See the LICENSE file for more details.

Acknowledgements

Special thanks to the open-source community for their contributions to the tools and libraries used in this project.