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

@saaslib/admin-panel

v0.1.4

Published

Admin panel for Saaslib apps

Downloads

63

Readme

@saaslib/admin-panel

Admin console for Saaslib apps, built with Next.js, Tailwind, and shadcn/ui on top of the @saaslib/nextjs hooks.

What it does

  • Manage users (roles, blocked state, email updates)
  • Review and manage subscriptions (upgrade, cancel, resume)
  • Explore owneable collections with safe CRUD helpers

Requirements

  • Node.js >= 18
  • A Saaslib backend using @saaslib/nestjs
  • Admin-only API routes (see setup below)

Environment variables

NEXT_PUBLIC_API_ENDPOINT=http://localhost:8000
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_...

NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY is optional unless you add Stripe UI features beyond the built-in admin actions.

Backend wiring (NestJS)

Expose admin endpoints by extending the new base controllers:

import { Controller } from '@nestjs/common'
import {
  AdminCollectionsService,
  BaseAdminUsersController,
  BaseAdminSubscriptionsController,
  EmailService,
} from '@saaslib/nestjs'
import { UserService } from './user.service'
import { SubscriptionService } from './subscription.service'
import { User } from './user.model'

@Controller('admin/users')
export class AdminUsersController extends BaseAdminUsersController<User> {
  constructor(userService: UserService, emailService: EmailService, adminCollections: AdminCollectionsService) {
    super(userService, emailService, adminCollections)
  }
}

@Controller('admin/subscriptions')
export class AdminSubscriptionsController extends BaseAdminSubscriptionsController<User> {
  constructor(subscriptionService: SubscriptionService, userService: UserService) {
    super(subscriptionService, userService)
  }
}

Add the controllers to your NestJS module. The base controllers enforce admin role checks via BaseUserRole.Admin.

Collections & plans

Collections are auto-discovered from OwneableEntityController instances in your backend. Subscription types are read from your Saaslib subscription configuration. If you want custom labels or column definitions, add optional overrides in packages/admin-panel/config/admin.config.ts.

Run locally

npm install
npm run dev --workspace @saaslib/admin-panel

Run as a package (consumer)

npx saaslib-admin-panel dev --api-endpoint http://localhost:8000

For local package development (no npm publish), add --force-copy so the runtime folder is refreshed on each start:

npx saaslib-admin-panel dev --api-endpoint http://localhost:8000 --force-copy

The CLI creates a lightweight .saaslib-admin-panel runtime folder in your project for Next.js to run outside of node_modules. This is managed automatically and does not require manual maintenance.