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

courierx

v2.0.0

Published

Multi-provider email delivery service - Main package

Readme

courierx

Complete email delivery platform with multi-provider support and intelligent routing

npm version License: MIT

The complete CourierX package - everything you need for reliable email delivery in one install.

Installation

npm install courierx

What's Included

This meta-package includes all CourierX functionality:

  • @courierx/client - Node.js API client (~25KB)
  • @courierx/providers - Email provider adapters (~45KB)
  • @courierx/shared - Shared utilities and types (~15KB)

Total bundle size: ~85KB (tree-shakeable)

Quick Start

Option 1: API Client (Recommended)

import { CourierXClient } from 'courierx';

const client = new CourierXClient({
  apiKey: 'your-api-key'
});

await client.send({
  to: ['[email protected]'],
  from: '[email protected]',
  subject: 'Hello from CourierX',
  html: '<p>Hello World!</p>'
});

Option 2: Direct Providers

import { SendGridAdapter, MailgunAdapter } from 'courierx';

const sendgrid = new SendGridAdapter({ apiKey: 'sg-key' });
const mailgun = new MailgunAdapter({ apiKey: 'mg-key', domain: 'example.com' });

// Use any provider directly
await sendgrid.send(emailRequest);

Option 3: Multi-Provider Failover

import { SendGridAdapter, MailgunAdapter, ErrorClassifier } from 'courierx';

const providers = [
  new SendGridAdapter({ apiKey: 'sg-key' }),
  new MailgunAdapter({ apiKey: 'mg-key', domain: 'example.com' })
];

async function sendWithFailover(request) {
  for (const provider of providers) {
    try {
      return await provider.send(request);
    } catch (error) {
      const classified = ErrorClassifier.classify(error, provider.name);
      if (!classified.retryable) throw error; // Permanent failure
      // Continue to next provider for transient errors
    }
  }
  throw new Error('All providers failed');
}

Features

🚀 Multi-Provider Support

SendGrid, Mailgun, AWS SES, SMTP, Resend with automatic failover

🔄 Intelligent Routing

Priority-based provider selection with retry logic

📊 Real-time Tracking

Webhook processing with delivery status updates

🔒 Enterprise Security

API key auth, HMAC signing, rate limiting

📝 TypeScript First

Full type safety with excellent IntelliSense

Performance

Tree-shakeable imports, connection pooling, optimized bundles

Architecture

┌─────────────────┐    ┌──────────────────┐    ┌─────────────────┐
│   Your App      │    │   CourierX API   │    │   Providers     │
│                 │    │                  │    │                 │
│ ┌─────────────┐ │    │ ┌──────────────┐ │    │ SendGrid        │
│ │ courierx    │ │───▶│ │ Multi-tenant │ │───▶│ Mailgun         │
│ │ (npm pkg)   │ │    │ │ Email API    │ │    │ AWS SES         │
│ └─────────────┘ │    │ └──────────────┘ │    │ SMTP            │
└─────────────────┘    └──────────────────┘    └─────────────────┘

Usage Patterns

Most developers → Use the API client for managed routing
Advanced users → Use providers directly for custom logic
Enterprise → Multi-provider setup with custom failover

Tree Shaking

Import only what you need:

// Only API client (~25KB)
import { CourierXClient } from 'courierx/client';

// Only SendGrid provider (~8KB)
import { SendGridAdapter } from 'courierx/providers/sendgrid';

// Only utilities (~15KB)
import { hashApiKey, normalizeEmail } from 'courierx/shared';

Environment Variables

# API Client
COURIERX_API_KEY=your-api-key
COURIERX_BASE_URL=https://api.courierx.dev

# Direct Providers (optional)
SENDGRID_API_KEY=your-sendgrid-key
MAILGUN_API_KEY=your-mailgun-key
MAILGUN_DOMAIN=yourdomain.com

Examples

Documentation

Support

License

MIT