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

@hkgdevx/xplug

v0.1.1

Published

XPlug – A lifecycle-driven plugin engine for Express & Node.js, enabling modular, extensible, and plugin-based architectures.

Downloads

24

Readme

XPlug

The deterministic, zero-dependency lifecycle-driven framework for mapping sprawling Express backend ecosystems safely natively via Plugins.

npm version CI License

XPlug solves the problem of "Framework Rot" where massive Express applications slowly drift into tightly coupled balls of mud. Rather than explicitly writing global routing configurations, Database initialization logic, and Auth layers into one sequential index.ts file — XPlug forces your developers to bundle logic into self-containing Plugins.

XPlug natively verifies their dependency structures (e.g., throwing a Hard Crash if Auth tries to load before Database), merges configuration schemas dynamically, and triggers isolated lifecycles synchronously across all extensions securely.

Core Features

  • Topological Sorting: Explicitly declare string arrays inside dependencies and optionalDependencies and XPlug builds a flawless structural Directed Acyclic Graph (DAG) before onBoot runs to ensure features load strictly deterministically.
  • Duck-Typed Configuration Assertions: Merge default parameters securely via Native Runtime checks (using Zod or Joi schemas locally) to enforce that host applications pass strictly configured properties down to plugins.
  • Custom App Lifecycles: Emit domain events seamlessly like .emit('onOrderCreated', orderPayload) and allow downstream third-party plugins to execute arbitrary Hooks precisely responding to application traffic.
  • Express Route/Middleware Adapters: Hook directly into Express mountRoutes mapping API endpoints uniformly with fallback default routeBasePaths resolving overlaps dynamically.

Documentation Index

The /docs directory is explicitly crafted outlining the API parameters exhaustively to learn the core modules:

  1. Architecture Overview (Start here!)
  2. Plugin Manager
  3. Lifecycle Registry
  4. Filesystem Discovery & Diagnostics
  5. CLI Scaffolding
  6. Express Integrations

Example Host Application

import express from 'express';
import { createPluginSystem } from 'xplug';
import { authPlugin } from './plugins/auth';
import { databasePlugin } from './plugins/db';

const app = express();

/** Bind XPlug Engine strictly allocating Allowed lifecycles */
const system = createPluginSystem({
 app,
 lifecycles: ['onDatabaseBoot', 'onAuthBoot', 'beforeListen']
});

system.register(authPlugin);
system.register(databasePlugin);

async function start() {
 // 1. Dependency resolver confirms Auth loads after DB.
 await system.init(); 

 // 2. Safely triggers respective Lifecycle phases
 await system.runLifecycle('onDatabaseBoot');
 await system.runLifecycle('onAuthBoot');

 // 3. Mounts the combined isolated Router endpoints dynamically!
 await system.mountRoutes();

 app.listen(3000, () => {
 console.log("Modular Host Framework booted seamlessly!");
 });
}
start();

Roadmap

  1. Phase 1 [Complete]: Core Execution Engine
  2. Phase 2 [Complete]: Express Framework Integration
  3. Phase 3 [Complete]: Strict Typings / Errors
  4. Phase 4 [Complete]: Filesystem Discovery
  5. Phase 5 [Complete]: Schema Configurations
  6. Phase 6 [Complete]: Dashboards, Sandboxes, & Toggles
  7. Production Roadmap: fastify framework adapter layers, Browser-based dynamic GUI debugging plugins, and remote CDN plugin registry polling.