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

@ranajit-karmakar/serviceforge-prisma

v1.1.4

Published

An industrialized, high-performance Prisma ORM boilerplate and utility toolkit containing connection pooling, strict base controllers, global middlewares, and unified authentication handlers mapped for scalable microservice architectures.

Readme

ServiceForge Prisma

NPM Version License

An industrialized, high-performance Prisma ORM utility toolkit specifically designed for scalable microservice architectures.

@ranajit-karmakar/serviceforge-prisma acts as a centralized data-access and routing framework. Instead of re-writing boilerplate CRUD endpoints across dozens of Node/Express microservices, pull in this package to instantly inherit:

  • Connection Pooling: Safely manages PrismaClient as a singleton to prevent TCP port exhaustion when 15+ microservices attempt to query identical Mongo/PostgreSQL clusters.
  • Strict Base Controllers: Extensible router handlers strictly typed against your models capable of instantly processing pagination, sorting, and bulk manipulations out-of-the-box.
  • Global Middlewares: Centralized Express request parsers injecting standardized response interceptors via schemas using Zod (validateMiddleware), and intercepting Prisma error codes to sanitize errors cleanly (errorMiddleware).
  • Unified Authentication Logic: Cross-service JWT extraction and enforcement strategies guaranteeing session signatures are parsed correctly domain-wide.

Quick Start

Installation

npm install @ranajit-karmakar/serviceforge-prisma @prisma/client

1. Initialize Prisma

Leverage the singleton pattern to ensure you aren't leaking connections when scaling container pods.

import { PrismaClientManager } from "@ranajit-karmakar/serviceforge-prisma";
const prisma = PrismaClientManager.getInstance().getClient();

2. Scaffold a REST Endpoint instantly

Eliminate try-catch chains and duplicate logic. Build your entities rapidly:

// user.controller.ts
import { BaseController } from "@ranajit-karmakar/serviceforge-prisma";
import { userService } from "./user.service.js"; // Standard extension of BaseService

export class UserController extends BaseController {
    constructor() {
        super(userService, "User");
    }
}

const userController = new UserController();

// Automatically mapped natively 
router.post("/", userController.handleCreate);
router.get("/:id", userController.handleFindById);
router.post("/list", userController.handleList);

3. Guarantee Standard Shapes globally

Inject our operational response pipelines onto all custom routers:

import { ApiResponse, AppError, catchAsync } from "@ranajit-karmakar/serviceforge-prisma";

export const performCustomAction = catchAsync(async (req, res, next) => {
    if (!req.user) {
        throw new AppError("Invalid Permissions", 401);
    }
    
    // Dispatches standard: { success, message, result, timestamp }
    return ApiResponse.success(res, "Successful Operation", data, 200);
});

Why ServiceForge?

Microservices often fall into the trap of drifting standardizations. Some teams might return { data: [...] } while others return { payload: [...] }. Some services handle Prisma unique constraint violations natively returning 400 Bad Requests, while others crash entirely resulting in 500s.

serviceforge-prisma behaves as the central enforcer resolving these drifts natively by encapsulating them inside an industrial ORM wrapper package.


License

MIT © 2026 Ranajit Karmakar