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

@triplebooks/ledger-packs

v0.9.1

Published

Open-source TripleBooks ledger posting rule packs (DSL) and content-hashed manifest

Readme

@triplebooks/ledger-packs

Open-source TripleBooks ledger posting rule packs — DSL posting rules, content hashing, and a committed manifest.

This package is data + hashing only. It does not apply rules to a database or evaluate the DSL. The TripleBooks platform (and any other host) loads pack dslSource strings and evaluates them with its own ledger engine against a chart-of-accounts role map.

Install

npm install @triplebooks/ledger-packs
# or
pnpm add @triplebooks/ledger-packs

What's included

| Layer | Examples | | ----- | -------- | | KERNEL | Core plumbing | | STANDARD | GAAP accrual, tax cash, management, fund events, personal finance, trust | | INDUSTRY | Real estate, construction, retail, manufacturing, SaaS, healthcare, … | | MODULE | Inventory, projects, manufacturing WIP, fleet, cap table, lending, … |

Each pack exports a stable slug and rules[] (LedgerRuleSeed). getLedgerPackDefinitions() attaches a deterministic contentHash per pack. The committed ledger-packs.json hashes the ordered pack set for apply idempotency.

Quick use

import {
  getLedgerPackDefinitions,
  loadBundledLedgerPacksManifest,
  hashPackDefinition,
} from "@triplebooks/ledger-packs";

const packs = getLedgerPackDefinitions();
const manifest = loadBundledLedgerPacksManifest();
// Apply `packs` + `manifest` with your own persistence layer.

Pack format

type LedgerRuleSeed = {
  name: string;
  eventType: string;
  basis?: string | null;
  priority?: number;
  postingTemplate: Record<string, unknown>;
  dslSource: string; // Ledger DSL `rule "…" { on "event" … post { … } }`
};

DSL account("role.path") references chart-of-accounts roles (not GL account IDs). Hosts must resolve roles to accounts before posting. Event type slugs and payload keys are a de facto contract — bump pack versions when they change.

Develop

pnpm install
pnpm test
pnpm build:manifest   # regenerate ledger-packs.json + history/
pnpm check:manifest   # CI gate

After editing any file under src/packs/, src/registry.ts, or src/pack-meta.ts, run pnpm build:manifest and commit ledger-packs.json (and history/ if a new snapshot was written).

License

Apache License 2.0 — see LICENSE.

Relationship to TripleBooks platform

In the TripleBooks monorepo, @triplebooks/ledger-bundle (private) depends on this package, adds private platform-only packs (e.g. SaaS billing), and applies the shipped bundle into tenant databases. This public package intentionally has no database or control-plane dependencies.