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

@crowdedkingdoms/construct

v0.3.10

Published

The Construct framework: the Crowded Kingdoms game platform layer (hosted sign-in, World Stores, voice/webcam/chat, Crowdy Studio dock, app and grid mods, grid programs) and engine loop, shared by the-construct starter and the games built on it. Ships Typ

Readme

@crowdedkingdoms/construct

The Construct framework: the Crowded Kingdoms platform layer and engine loop that the-construct starter and the games built on it share.

| Layer | What it does | |---|---| | engine/ | GameLoop, SceneRouter, Input, Controls, the GameScene contract | | platform/ | Hosted sign-in and app entry (AuthService, NetworkManager), GameSession, World Stores presence and the pose codec, chat, voice, webcam, envScope storage | | platform/exec/, platform/model/ | The game's world hub on ck-exec (WorldHub, one connection per page as NetworkManager.worldHub) and ModelService, which reads the pulse, programs and progression from it | | platform/studio/ | The Crowdy Studio dock (a project runs as a ck-exec mod and its CLIENT half), grid claims and the world hub's claim registry (GridService), the CLIENT halves of the grid the player stands in (GridClientHalves, over CrowdyJS's ExecClientHalves) and the host calls they reach, the agent's player host | | grid/ | JS grid programs (GridProgramRunner): player JavaScript with the full CrowdyJS SDK, sandboxed, relayed with a grid-scoped token | | node/ | security-headers (site, /dsh/, /grid-program.html), vite-plugins, construct-copy-dsh | | sandbox/boot | The grid program sandbox bootstrap |

It ships TypeScript source for Vite (it uses ?worker&url and import.meta.env). Peer dependencies: @crowdedkingdoms/crowdyjs 18 (0.3.0 and later, 18.0.1 from 0.3.1; the 0.2 line peers on 17) and, for the Studio agent pane, @crowdedkingdoms/crowdy-dsh 0.4+. On a prerelease tier the ranges name each X.Y.Z line they admit, because npm matches a prerelease only against a comparator on the same X.Y.Z. A game can take a new CrowdyJS line only once a construct release names it (until then npm install refuses the pin with ERESOLVE); npm lets an unnamed crowdy-dsh line through with a warning, but keep that pin on a named line too.

Installing it

Releases are on npm under one dist-tag per tier, and a game pins the exact version of its own tier, as it pins CrowdyJS:

npm install --save-exact @crowdedkingdoms/construct   # X.Y.Z on latest

dev is X.Y.Z-dev.N, test is X.Y.Z-test.N, and prod is X.Y.Z on latest. Each is published by the-construct's publish-construct.yml from a construct/<tier>/vX.Y.Z tag on a commit already in that tier's branch.

Using it in a game

ModelService and GridService call a world hub on ck-exec with the endpoints the starter's exec/construct serves (world, programs, progress, claims, record_claim, release_claim). The defaults name the starter's hub, type world key main; a game whose hub has another name says so at boot:

import { configureWorldHub, GameSession, GameLoop } from '@crowdedkingdoms/construct';

configureWorldHub({ nodeType: 'realm', key: 'main' });
  • Set VITE_GAME_NAME for the Studio dock and boot card.
  • Serve grid-program.html (a one-line page whose module imports @crowdedkingdoms/construct/sandbox/boot) and add it to build.rollupOptions.input.
  • In vite.config.ts:
import { constructHeaderPlugins } from '@crowdedkingdoms/construct/node/vite-plugins';
import {
  dshSecurityHeaders,
  gridProgramSecurityHeaders,
  securityHeaders,
} from '@crowdedkingdoms/construct/node/security-headers';

plugins: constructHeaderPlugins({
  dshHeaders: dshSecurityHeaders({ apiOrigins: [apiOrigin] }),
  gridProgramHeaders: gridProgramSecurityHeaders(),
}),
  • construct-copy-dsh (in predev / prebuild) copies the agent harness into public/dsh/.

Setup scripts

@crowdedkingdoms/construct/platform/onboarding/steps provisions an app (org, app, access tier, redirect URIs, grid claim policy, your ck-exec code (deployExec: execBuild + execDeploy), Studio Common Files, agent policy). Pass your own exec (manifest, crates, and a client holding your session on the app's datacenter) and commonFiles.