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

@game-hub/kernel

v1.4.0

Published

The Game Hub kernel: the tiny set of primitives every game and both hosts share — GameError, MoveRecord, Viewer, record(), makeSeating, the end-state union, runBotLoop, and the GameModule/GameClient contracts. Its major version IS the host↔game contract v

Readme

@game-hub/kernel

The tiny shared core of Game Hub, a self-hosted board-game platform: the primitives every game package and both hosts (backend + UI shell) build against, and nothing else.

What's in it

  • .GameError, MoveRecord, Viewer, record(), makeSeating, GameEndState, the GameModule/ModuleContext contract (with structural host interfaces, so the kernel imports no host), KERNEL_CONTRACT_VERSION, and the seeded-setup helpers shuffle(items, rng?) / mulberry32(seed) (1.2.0 — an engine and its tests need these, so they are not on ./bot).
  • ./botrunBotLoop and the bot-driver helpers, written entirely against the generic contract surface.
  • ./client — the GameClient/BoardProps contract the UI shell loads a game's board through, plus the transport DTOs a client names (GamePayload, GameIdentity, GameMessage). Type-only React usage; React is not a runtime dependency.

The shared chrome a board renders inside (turn banner, activity feed, end screen, buttons) is a separate package, @game-hub/ui-kit — it needs React at runtime, which this package deliberately never does.

The contract version

The package's major version is the kernel contract version. A game module declares kernelContract (import KERNEL_CONTRACT_VERSION, never a literal); a host refuses to register a game built against a different contract. Additive optional hooks are minor bumps; any change to a required member's meaning is a major.

Writing a game

A game is one npm package with four subpath exports — ./engine (pure rules), ./module (backend seam), ./client (UI seam), ./bot (optional AI) — peer-depending on this kernel. The full recipe, seam rules, and conformance expectations live in the platform repo's docs/game-creation.md and docs/design-patterns.md.

Game engines built on this kernel are pure: no Date, no Math.random, no mutation — randomness is injected at setup and per action, so every game is deterministic and replayable.