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

@seij/extension-platform

v0.1.1

Published

A minimal, focused system for managing extensions and services in a TypeScript application. Used for building modular monolith frontends in TypeScript.

Downloads

356

Readme

Extension Platform

A minimal, focused system for managing extensions and services in a TypeScript application. Used for building modular monolith frontends in TypeScript.

What it is

This library provides a small and explicit system for declaring extensions and organizing them around well-defined contribution points. It's designed for apps that want modularity without introducing a framework.

You can structure your frontend as a set of isolated feature modules, each one contributing routes, services, UI fragments, or domain logic through extension points.

This library provides two independent registries:

  • ExtensionRegistry: allows registration and grouping of extensions by target, manages contributions.
  • ServiceRegistry: manages instantiation, lifecycle, and dependency resolution of services.

Each registry is designed to remain immutable once the platform starts, reducing runtime side effects and making the behavior predictable.

What it’s for

It's designed for tools, frameworks, or applications that need to expose well-defined extension points without coupling consumers to internal implementation. It works well for plugin systems, modular CLI tools, or any codebase where extensibility needs to stay explicit and lightweight.

Why it’s useful

  • Keeps implementation and usage decoupled.
  • Makes extensions and services easy to test and mock.
  • Supports clean lifecycle management without overhead.
  • Doesn’t assume a framework or execution environment.
  • Keeps code readable and close to the logic.
  • Compatible with static bundling: all extensions are declared upfront, no runtime plugin loader required.
  • No decorator, no magic.

What makes it different

It doesn’t try to be a general-purpose DI container or a framework. It avoids runtime magic, decorators, or reflection. You keep full control over what’s registered, when, and how.

The result: a predictable, maintainable, and low-friction extensibility model. You get structure without lock-in, and a platform that stays transparent.

How to use

Everything is an extension.

Let’s say we want to build a “Hello World” system that aggregates hello messages from multiple modules.

import { ServiceConstructorProps, ServiceContributions } from "@seij/extension-registry";
const HellosExtension: Extension = {
  activate(context) {
    context.register(ServiceContributions, HelloService);
    context.registerContributionPoint(HelloContributionPoint);
  },
};
interface HelloContribution {
  helloMessage: string;
}
const HelloContributionPoint: ContributionPoint<HelloContribution> = { code: "hellos" };

class HelloService {
  helloContributions: HelloContribution[];
  constructor(props: ServiceConstructorProps) {
    this.helloContributions = props.extensionRegistry.findContributions(HelloContributionPoint);
  }
  sayHello() {
    return this.helloContributions.map((it) => it.helloMessage);
  }
  // returns ["Bonjour", "Hello"]
}

Then another module contributes some hellos:

import { ServiceConstructorProps, ServiceContributions } from "@seij/extension-registry";
const HelloFromStrings: Extension = {
  activate(context) {
    context.register(HelloContributionPoint, { helloMessage: "Bonjour" });
    context.register(HelloContributionPoint, { helloMessage: "Hello" });
  },
};

Wire everything:

import { createExtensionPlatform } from "@seij/extension-registry";

const platform = createExtensionPlatform([HelloFromStrings]);

const helloService = platform.resolve(HelloService);
helloService.sayHello();

// → Bonjour
// → Hello

Design choices

  • Extensions are declared statically and activated synchronously.
  • All contributions are collected at startup. No discovery or reload at runtime.

This makes the system predictable, fast, and easy to debug — especially in codebases where everything is built and bundled together.

Not a framework

This isn’t a plugin loader or a dependency injection container. It doesn’t manage UI, routing, or state. It just helps you structure your app around clear extension points.

You stay in control.