Introduction

Comprehensive CRUD library for building RESTful APIs with Prisma

Last updated:

@visulima/crud

Build RESTful APIs with Prisma providing automatic CRUD operations, filtering, sorting, and pagination with Next.js support.

Key Features

  • Automatic CRUD - Generate complete CRUD endpoints from Prisma models
  • Filtering - Advanced filtering with query parameters
  • Sorting - Multi-field sorting support
  • Pagination - Built-in cursor and offset pagination
  • Next.js Integration - Ready-to-use Next.js API route handler
  • Type-Safe - Full TypeScript support with Prisma types
  • Customizable - Override default behavior per model

Quick Start

import { PrismaAdapter, nodeHandler } from "@visulima/crud/next";
import { prisma } from "./prisma-client";

const adapter = new PrismaAdapter({ prismaClient: prisma });

export default async (req, res) => {
    const handler = await nodeHandler(adapter);
    await handler(req, res);
};

Next Steps

Support

Contribute to our work and keep us going

Community is the heart of open source. The success of our packages wouldn't be possible without the incredible contributions of users, testers, and developers who collaborate with us every day.Want to get involved? Here are some tips on how you can make a meaningful impact on our open source projects.

Ready to help us out?

Be sure to check out the package's contribution guidelines first. They'll walk you through the process on how to properly submit an issue or pull request to our repositories.

Submit a pull request

Found something to improve? Fork the repo, make your changes, and open a PR. We review every contribution and provide feedback to help you get merged.

Good first issues

Simple issues suited for people new to open source development, and often a good place to start working on a package.
View good first issues