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

@catalystiq/envoy-sdk

v0.8.7

Published

Headless Resend drip + broadcast email SDK for Next.js — bring-your-own-Postgres, host-owns-auth.

Readme

@catalystiq/envoy-sdk

Headless, bring-your-own-Postgres email SDK for Next.js (App Router). Drop multi-step, time-based, per-recipient AI-personalized drip sequences and Resend-native broadcasts into your own app — you own auth, the UI, and the database; the SDK owns the engine.

Built on Resend (resend@^6.14.0) for transport, Topics, and Broadcasts, and Claude Managed Agents for just-in-time personalization. Self-hosted, single-tenant.

Status: early (0.1.0). The public surface may still shift.

Install

npm i @catalystiq/envoy-sdk resend

Peers (optional, host-provided): next >=14, react >=18.

What it does

Two clearly separated send lanes:

  • Drip lanedefineSequence + enroll() from your app events. Each step renders a Resend Template and fills AI-written slots (subject/preheader/body) just-in-time via Claude, sent as an individual transactional emails.send. Time-based waits, crash-safe agent resume, fail-soft.
  • Broadcast lanedefineBroadcastProgram over Resend Segments + Topics. Content-gated, send-once (external claim guard), with per-topic consent reconcile. Merge-vars only, no AI.

Plus: a mountable catch-all route handler (per-sub-path auth: your authorize + cron secret + Svix webhook verify + signed unsubscribe + MCP), a dual-stream consent mirror that gates every send, an RFC 8058 one-click unsubscribe landing, GDPR contact deletion, read-only React hooks, and a retained MCP server so AI agents can operate the lifecycle.

Quick start

// lib/envoy.ts (server-only)
import "server-only";
import { createEnvoy } from "@catalystiq/envoy-sdk";
import { pool } from "@/lib/db";

export const envoy = createEnvoy({
  db: pool,
  installNamespace: "myapp-prod",
  resendApiKey: process.env.RESEND_API_KEY!,
  webhookSecret: process.env.RESEND_WEBHOOK_SECRET!,
  cronSecret: process.env.CRON_SECRET!,
  unsubscribeSecret: process.env.ENVOY_UNSUBSCRIBE_SECRET!,
  baseSegmentId: process.env.RESEND_BASE_SEGMENT_ID!,
  streams: { digest: { default: "opt_out" }, alert: { default: "opt_in" } },
});
// app/api/envoy/[...envoy]/route.ts
import { envoy } from "@/lib/envoy";
const handler = envoy.routeHandler({ authorize: async (req) => /* your check */ true });
export const GET = handler;
export const POST = handler;

Apply the SDK's migrations to your database (it ships .sql under migrations/ and a migrate helper), then await envoy.enroll({ email, data }, "onboarding") from your signup event.

Full integration guide

A complete, step-by-step host integration guide (auth model, the two crons, consent, webhooks, GDPR, the delete-and-import adoption map, and the accepted compliance residuals) ships in this package as AGENTS.md — your coding agent can read it directly from node_modules/@catalystiq/envoy-sdk/AGENTS.md.

License

MIT