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-express-admin

v0.5.5

Published

A Django-like admin panel for Express and Prisma, with optional built-in admin authentication

Readme

Prisma Express Admin

Rebranded as PanelJS. New work lives at paneljs (paneljs, @paneljs/express, @paneljs/prisma). This package remains as a compatibility name; prefer PanelJS for new projects.

A Django-admin-like admin panel for Express and Prisma. It introspects your Prisma schema, exposes protected scalar CRUD routes, and serves a schema-driven operations UI.

Requirements

  • Node.js ^20.19 || ^22.12 || >=24.0 (or Bun >=1.3)
  • Express 4 or 5
  • Prisma and @prisma/client 7.5.x
  • Your application's generated Prisma client and schema.prisma

The first release supports Prisma 7.5.x only. Prisma internals are version coupled, so keep prisma, @prisma/client, and Prisma Express Admin in that same supported range. Upgrade them together after a supported version is announced; the changelog records every tested Prisma version.

Install

npm install prisma-express-admin express @prisma/client
npm install --save-dev prisma

Generate your Prisma client as usual, then pass that client to the admin. The library never uses a client generated by this repository.

Use

import express from "express";
import { createAdmin } from "prisma-express-admin";
import { prisma } from "./prisma.js";

const app = express();

const admin = createAdmin({
  prisma,
  auth: {
    getCurrentUser: async (req) => {
      // Adapt this to your session, JWT, or API-key authentication.
      const user = await getAdminUserFromRequest(req);
      return user
        ? {
            id: user.id,
            email: user.email,
            role: user.role,
            isSuperAdmin: user.isSuperAdmin,
          }
        : null;
    },
  },
});

admin
  .register("User")
  .register("Post", { listDisplay: ["title", "published", "createdAt"] });

await admin.mount(app);

app.listen(3000);

Open http://localhost:3000/admin. Every admin API request requires either the configured external adapter or built-in admin authentication. Built-in mode provides /admin/login, database-backed admin sessions, and a createsuperuser command. See the authentication guide.

Schema file

At mount time, Prisma Express Admin reads prisma/schema.prisma relative to your application's current working directory. Include that schema file in your deployment artifact. If your schema is elsewhere, configure it explicitly:

const admin = createAdmin({
  prisma,
  schemaPath: "db/schema.prisma",
  auth: { getCurrentUser },
});

Current scope

This MVP provides authenticated, permission-aware, tenant-scoped scalar CRUD, search, filters, pagination, relation display fields in lists, safe single-field foreign-key selection for belongsTo relations in create/edit forms, and permission/scoped custom actions on selected list records. Audit logging is available through an optional consumer-provided append-only writer. Nested writes, many-to-many editing, and file uploads are not available yet. See the docs site and the HTTP API reference for the complete route and validation contract.

Documentation

The consumer docs site lives in docs/ and is built with VitePress.

bun run docs:dev

Open the printed localhost URL. Start at Getting started, then Wire it into your app.

Developing this repository

The library source is in src/. The runnable dogfood application is fully self-contained in examples/basic/, including its schema, local PostgreSQL service, generated client, and sample data.

bun install
bun run example:db:up
export DATABASE_URL=postgresql://postgres:postgres@localhost:5435/prisma_express_admin_basic
bun run example:db:generate
bun run example:db:push
bun run example:seed
bun run dev

Open http://localhost:3000/admin to use the local example. Its authentication adapter is intentionally development-only; see the example README for the complete walkthrough.

Useful checks:

bun run typecheck
bun run test:unit
bun run build
bun run docs:dev
npm pack --dry-run

After starting PostgreSQL and running bun run db:push, run bun run test:integration for the database-backed scope suite.

Marketing landing page

Preview the product landing page with bun run landing, then open http://localhost:4173.