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

payload-clienthub

v0.0.6

Published

Payload CMS plugin for client management, service tracking, and invoicing.

Downloads

76

Readme

payload-clienthub

Automatic monthly invoicing with PDF generation, Swiss QR Bill support, and multi-language email delivery for Payload CMS.

npm version License: MIT

Overview

payload-clienthub adds a full invoicing workflow to Payload -- clients, services, and invoices are managed as collections. Recurring services are automatically detected when due, rendered as localized PDF invoices (with Swiss QR Bill support), and emailed to each client. A single endpoint processes all clients at once, so you can wire it up to a scheduler and forget about it.

Features

  • Client & service management -- track clients, contacts, and one-time/monthly/yearly services.
  • PDF invoices -- generated with itemized line items, company branding, and Swiss QR Bill payment slips for CH-based companies.
  • Multi-language -- invoices and emails are localized in DE, FR, IT, and EN.
  • Batch endpoint -- one endpoint processes all clients at once; authenticate with a shared secret to call it from any scheduler.

Installation

pnpm add payload-clienthub

Usage

// payload.config.ts
import { buildConfig } from 'payload';
import { clienthubPlugin } from 'payload-clienthub';

export default buildConfig({
  // ...
  plugins: [
    clienthubPlugin({
      cronSecret: process.env.CRON_SECRET!,
    }),
  ],
});

Trigger invoice generation for all clients by calling the batch endpoint (e.g. from a monthly scheduler):

curl -H "Authorization: Bearer $CRON_SECRET" \
  https://your-app.com/api/plugin-invoices/process-all-clients

Options

| Option | Type | Default | Description | |--------|------|---------|-------------| | cronSecret | string | — | Required. Shared secret used to authenticate batch requests via the Authorization: Bearer header. | | clientsCollectionSlug | CollectionSlug | 'clients' | Slug for the auto-created clients collection. | | servicesCollectionSlug | CollectionSlug | 'services' | Slug for the auto-created services collection. | | invoicesCollectionSlug | CollectionSlug | 'invoices' | Slug for the auto-created invoices collection. | | invoicePdfsCollectionSlug | CollectionSlug | 'invoice-pdfs' | Slug for the auto-created invoice PDFs upload collection. | | onError | (error: Error, context: { operation: string; metadata?: Record<string, unknown> }) => void | console.error | Custom error handler called when PDF generation or email delivery fails. |

Contributing

This plugin lives in the payload-plugins monorepo.

Development

pnpm install

# watch this plugin for changes
pnpm --filter payload-clienthub dev

# run the Payload dev app (in a second terminal)
pnpm --filter sandbox dev

The sandbox/ directory is a Next.js + Payload app that imports plugins via workspace:* — use it to test changes locally.

Code quality

  • Formatting & linting — handled by Biome, enforced on commit via husky + lint-staged.
  • Commits — must follow Conventional Commits with a valid scope (e.g. fix(payload-clienthub): ...).
  • Changesets — please include a changeset in your PR by running pnpm release.

Issues & PRs

Bug reports and feature requests are welcome — open an issue.

License

MIT