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

@actdim/msgmesh

v1.5.15

Published

A type-safe, modular message mesh for scalable async communication in TypeScript

Readme

@actdim/msgmesh

Type-Safe Async Message Mesh & Service Bus for Scalable TypeScript Applications

npm version TypeScript License: MIT Open in StackBlitz


What is MsgMesh?

@actdim/msgmesh is a high-performance, type-safe messaging framework and service mesh for TypeScript. It bridges the gap between raw EventEmitter callbacks, complex RxJS streams, and tightly-coupled state managers by providing a unified message bus for Pub/Sub Events, RPC Request/Response, Fan-in Streams, and Automated Service Adapters.

The Problem It Solves

  • Untyped Events: Fatigued by string typos, missing payload types, and runtime crashes when emitting events?
  • RxJS Complexity Overload: Want the power of reactive streams and debouncing without forcing your entire team into complex RxJS operators?
  • Tightly-Coupled Services: Want UI components to invoke backend APIs or cross-module services without hard-coded class imports or prop callback chains?

The Output You Get

  • 🔒 100% Compile-Time Verification: Channels, input/output groups, and headers are checked by TypeScript with full IDE autocomplete.
  • RPC & Cancellation: Built-in request() / provide() with AbortSignal cancellation support out-of-the-box.
  • 🔌 Service Adapters: Automatically wrap NSwag / OpenAPI / gRPC API clients directly into typed message channels.
  • 🚀 Built on RxJS: Enterprise-grade scheduler under the hood, clean imperative API on top.

15-Second Code Snippet

import { MsgStruct, createMsgBus } from '@actdim/msgmesh';

// 1. Declare contract (Channels, Inputs, Outputs)
type AppBusStruct = MsgStruct<{
    'USER.GET_PROFILE': { in: { userId: string }; out: { name: string; email: string } };
}>;

// 2. Instantiate bus
const msgBus = createMsgBus<AppBusStruct>();

// 3. Register RPC provider
msgBus.provide({
    channel: 'USER.GET_PROFILE',
    callback: async (msg) => ({ name: 'Alice', email: '[email protected]' }),
});

// 4. Request data from anywhere in the app with 100% type safety
const profile = await msgBus.request({
    channel: 'USER.GET_PROFILE',
    payload: { userId: 'usr-123' },
});

console.log(profile.payload.name); // "Alice"

Installation

pnpm add @actdim/msgmesh @actdim/utico rxjs

Documentation Index

Explore the complete guide step-by-step from core concepts to advanced service adapters:

| Section | Description | |---|---| | 📖 01. Overview & Problem Analysis | Motivation, comparison with EventEmitters, RxJS, and global state managers. | | 🧩 02. Architecture & Types | Channels, Input/Output groups, type contracts, and bus instantiation. | | 🛠️ 03. API Reference | Complete method reference (send, on, once, stream, provide, request, requestStream). | | 🚀 04. Advanced Patterns & Adapters | Message replay, debouncing, chain-of-responsibility, and automated service adapters. |


Interactive Browser Sandbox

Try @actdim/msgmesh instantly in StackBlitz:

Open in StackBlitz


AI-Assisted Development

Developed with Along - a provider-agnostic context and memory system for AI coding agents.


License

MIT License. See LICENSE for details.