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

@naisys/erp

v3.0.3

Published

NAISYS ERP - Web UI for AI-driven order and work management

Readme

@naisys/erp (server)

← Back to ERP | ← Back to main README

Fastify server for the NAISYS ERP. Owns the ERP database (Prisma + SQLite), serves the REST API, hosts the bundled React client, and exposes an agent-facing HATEOAS API discoverable at runtime.

This is the npm-published half of @naisys/erp — the bundled client lives in ../client/ at dev time and gets copied into client-dist/ for publish.

Running

Standalone:

npm install @naisys/erp
npx naisys-erp

See the ERP README for the full configuration (NAISYS_FOLDER, SERVER_PORT, SUPERVISOR_AUTH, PUBLIC_READ) and feature list.

Dev mode (from monorepo):

npm run dev --workspace=@naisys/erp

Structure

  • erpServer.ts — Fastify bootstrap (cookies, CORS, multipart, rate limit, static client, swagger/scalar API ref)
  • erpRoutes.ts — route registration entry point
  • routes/ — per-resource routes (orders, operations, steps, fields, items, etc.) with co-located HATEOAS action/link builders
  • services/ — business logic kept out of routes
  • database/ — Prisma client wiring, schema-version check, migration deploy
  • hateoas.ts / schemaRegistry.ts / route-helpers.ts — generic HATEOAS helpers, per-endpoint schema discovery, slim-response helpers
  • middleware/ — auth, permission gating
  • tests/ — Vitest API tests and Playwright UI E2E

API design

  • HATEOAS-driven discoverable REST API — see doc 012
  • Disabled actions include a reason so agents understand the gate
  • Batch endpoints, slim responses on mutations, per-endpoint schema (not bulk OpenAPI)
  • Zod-validated multipart input with type coercion and hints
  • Hash-based attachment storage for step fields

Auth

  • Local ERP auth, or shared session/passkey auth with supervisor when SUPERVISOR_AUTH=true (see doc 007)
  • Agent API keys for cross-app calls

Scripts

  • npm run devtsx watch against src/erpServer.ts
  • npm run build — Prisma generate + tsc
  • npm run bundle — copy the built client into client-dist/ for publish
  • npm run start — run dist/erpServer.js
  • npm test — Vitest + Playwright

License

MIT