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

zenstack-aurex

v0.1.1

Published

Aurex Plugin for ZenStack

Readme

ZenStack Aurex Plugin

Deterministic, namespace-aware Aurex ID generation for ZenStack v3.

This plugin integrates Aurex as the default ID strategy for your ZenStack models, generating compact, human-readable, checksum-protected identifiers with embedded namespace support.


Overview

This plugin:

  • Generates deterministic prefix mappings per model
  • Produces a manifest file (prefix contract)
  • Enforces collision-safe prefix inference
  • Uses a single global variant (Aurex16 or Aurex24)

No per-model configuration is required.


Installation

npm install zenstack-aurex

Usage

1️⃣ Configure the plugin in your schema.zmodel

plugin aurex {
  provider = "zenstack-aurex"

  variant = "A16"              // A16 or A24 (default: A16)

  output  = "../src/generated"

  updateManifest = false      // Not implemented yet (v0.0.1)
}

2️⃣ Define your models

Use the helper type:

model User with Aurex {
  // Other fields
}

type Aurex is a helper type that expands to a compatible id String @id @db.Char(aurexVariant()) @aurex field.


Important Behavior

✅ Only models using @aurex on the id field are injected.

Models that have at least one field using @aurex will automatically:

  • Receive a deterministic prefix
  • Be included in the manifest
  • Use the configured global variant

Optional: Model-Level Configuration

You may override the inferred prefix:

model User with Aurex {
  // ...

  @@aurex(prefix: "US")
}

@@aurex is optional.

If omitted, the prefix will be inferred using model name hashing.


Manifest File

The plugin generates a contract file:

const manifest = {
  "variant": "A16",
  "models": [
    {
        idFields: ["id"];
        name: "User";
        prefix: "FA";
    }
  ]
};
export default manifest;

This file ensures:

  • Stable prefix assignments
  • Reproducible builds
  • Explicit breaking changes (Not implemented yet (v0.0.1))

(Not implemented yet (v0.0.1)) If a prefix changes and updateManifest = false, generation fails.

To approve changes:

updateManifest = true // Not implemented yet (v0.0.1)

Runtime Integration

In your application:

import manifest from "../aurex-manifest.ts";
import { AurexPlugin } from "zenstack-aurex";

db.$use(new AurexPlugin(manifest));

The runtime plugin:

  • Injects Aurex IDs during create
  • (Not implemented yet) Optionally validates provided IDs
  • (Not implemented yet) Ensures checksum correctness

Variant

Variant is global:

variant = "A16"

Available options:

  • A16 → Aurex16 (65 bits entropy, Luhn checksum)
  • A24 → Aurex24 (90 bits entropy, CRC-20 checksum)

Per-model variants are intentionally not supported.


Design Goals

  • Compact identifiers
  • Human-readable
  • Embedded namespace
  • Built-in checksum
  • Deterministic prefix mapping
  • Versioned prefix contract
  • Safe schema evolution

Error Conditions

The plugin fails generation if:

  • Prefix collision detected
  • (Not implemented yet (v0.0.1)) Manifest changes without approval
  • Invalid variant is provided
  • Invalid prefix override is declared

All failures are explicit and intentional.


Why Aurex?

Aurex is a structured alternative to UUID for systems where humans interact with identifiers.

It provides:

  • Smaller printable footprint
  • Checksum validation
  • Namespace awareness
  • Deterministic formatting

License

MIT