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

@hiteshmodi0624/relay

v0.4.0

Published

A messaging / communications service. Delivers a `Message` to a `Recipient` over a `CommsChannel` (email today; SMS / Slack / WhatsApp / push later), with deliverability concerns (suppression, audit log) handled centrally. Consumed as a library/service by

Readme

Relay

A messaging / communications service. Delivers a Message to a Recipient over a CommsChannel (email today; SMS / Slack / WhatsApp / push later), with deliverability concerns (suppression, audit log) handled centrally. Consumed as a library/service by other products (Extrack, OpsPilot); may later be wrapped as a standalone hosted service.

Abstraction is the product. Built like a Java system — ports & adapters, programming to interfaces, dependency inversion. Templates and brand stay with the caller; Relay moves bytes.

Run

  • yarn — install
  • yarn test — run tests
  • yarn build — typecheck + emit
  • yarn demo — dispatch a sample message through the in-memory channel end-to-end

Layout (hexagonal)

src/
  domain/       pure value objects + entities (classes)
  ports/        interfaces (CommsChannel, SuppressionStore, DeliveryLog, Clock)
  application/  use-case services (MessageDispatcher, ChannelRegistry)
  adapters/     concrete port implementations (in-memory + SES email + DynamoDB stores)
  infra/        reusable CDK construct provisioning Relay's DynamoDB tables (RelayTables)
  demo.ts       composition root for the demo

See CLAUDE.md for the strict rules and docs/guidelines/architecture.md for the patterns.

Provisioning the durable stores (CDK)

In dynamo mode the suppression + delivery-log adapters target two DynamoDB tables. Relay is a consumed library, not a deployable, so it ships the tables as a reusable CDK construct that you instantiate inside your own stack. aws-cdk-lib / constructs are peer dependencies (you pin the CDK version); the construct lives outside the core barrel, so importing Relay's dispatcher never pulls in CDK.

import { RelayTables } from 'relay/dist/infra/relayTables.js';

const tables = new RelayTables(this, 'RelayTables', {
  suppressionTableName: 'relay-suppression',
  deliveryLogTableName: 'relay-delivery-log',
  // removalPolicy defaults to RETAIN (suppression/audit data must survive a teardown)
});

myLambda.addEnvironment('RELAY_SUPPRESSION_MODE', 'dynamo');
myLambda.addEnvironment('RELAY_SUPPRESSION_TABLE', tables.suppressionTable.tableName);
myLambda.addEnvironment('RELAY_DELIVERY_LOG_MODE', 'dynamo');
myLambda.addEnvironment('RELAY_DELIVERY_LOG_TABLE', tables.deliveryLogTable.tableName);
tables.suppressionTable.grantReadWriteData(myLambda);
tables.deliveryLogTable.grantWriteData(myLambda);

Each table is keyed on a single String partition key pk, billed PAY_PER_REQUEST, with no TTL and no secondary index — the exact shape the Dynamo adapters assume.