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

hexon-engine-z

v1.0.0

Published

Intent-driven execution engine for orchestrating backend business logic via deterministic flows and isolated effects.

Readme

🔷 hexon-engine-z

NPM Downloads

LIVE EXAMPLE

hexon-engine-z is a framework-agnostic intent execution engine for deterministic business logic for backend & application logic.

Hexon is about deterministic business flows, not services calling services.


Why hexon-engine-z

  • Intent → Flow → Effect architecture
  • No throw in business logic (Result-based)
  • Deterministic async orchestration
  • Short-circuit execution
  • Side-effect isolation
  • Framework-agnostic core
  • First-class observability hooks
  • Easy adapter to NestJS / Fastify / Express
  • Execution order is explicit and traceable

Installation

npm install hexon-engine-z

Mental Model

HTTP / RPC / Queue / Cron
        ↓
     Adapter
        ↓
   hexon-engine (core)
        ↓
 Business Flow / Effects / Infrastructure

Basic Usage

import { createEngine, Ok, Err } from "hexon-engine-z"

const engine = createEngine({
  intents(reg) {
    reg.register({
      name: "ping",
      flow: async (flow, input) => {
        const res = await flow.run("log", input)
        if (!res.ok) return res
        return Ok({ pong: true })
      }
    })
  },

  effects(reg) {
    reg.register("log", async ({ input }) => {
      console.log("PING:", input)
      return Ok()
    })
  }
})

await engine.emit("ping", "hello")

Example: Create Order (Real Backend Flow)

engine.emit("createOrder", {
  userId: "u1",
  qty: 2,
  amount: 100
})

Flow:

  1. Reserve inventory
  2. Charge payment
  3. Save order
  4. Emit events
  5. Short-circuit on failure

Real-world business flow

import { createEngine, Ok, Err } from "hexon-engine-z"

export const engine = createEngine({
  intents(reg) {
    reg.register({
      name: "createOrder",
      validate(input) {
        if (!input.userId) return Err("Missing userId")
        return Ok()
      },
      flow: async (flow, input) => {
        const inv = await flow.run("reserveInventory", input)
        if (!inv.ok) return inv

        const pay = await flow.run("chargePayment", input)
        if (!pay.ok) return pay

        flow.state.paymentId = pay.data.id

        return flow.run("saveOrder", input)
      }
    })
  },

  effects(reg) {
    reg.register("reserveInventory", async ({ input }) => {
      if (input.qty > 10) return Err(new Error("Out of stock"))
      return Ok()
    })

    reg.register("chargePayment", async ({ input }) => {
      return Ok({ id: "pay_123" })
    })

    reg.register("saveOrder", async ({ state }) => {
      return Ok({ orderId: "order_001", paymentId: state.paymentId })
    })
  }
})

Philosophy

  • Explicit over implicit
  • Orchestration over service-to-service calls
  • No magic global state
  • Effects are isolated
  • Business logic is testable

What hexon-engine-z is NOT

  • ❌ Not a framework
  • ❌ Not a service container
  • ❌ Not a state manager
  • ❌ Not CQRS / Event Sourcing

Hexon complements frameworks — it does not replace them.


License

MIT