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

@serve.zone/dcrouter

v13.9.1

Published

A multifaceted routing service handling mail and SMS delivery functions.

Readme

DCRouter Storage Overview

DCRouter uses a unified database layer backed by @push.rocks/smartdata for all persistent data. All data is stored as typed document classes in a single database.

Database Modes

Embedded Mode (default)

When no external MongoDB URL is provided, DCRouter starts an embedded LocalSmartDb (Rust-based MongoDB-compatible engine) via @push.rocks/smartdb.

~/.serve.zone/dcrouter/tsmdb/

External Mode

Connect to any MongoDB-compatible database by providing a connection URL.

dbConfig: {
  mongoDbUrl: 'mongodb://host:27017',
  dbName: 'dcrouter',
}

Configuration

dbConfig: {
  enabled: true,                                    // default: true
  mongoDbUrl: undefined,                            // default: embedded LocalSmartDb
  storagePath: '~/.serve.zone/dcrouter/tsmdb',     // default (embedded mode only)
  dbName: 'dcrouter',                               // default
  cleanupIntervalHours: 1,                          // TTL cleanup interval
}

Document Classes

All data is stored as smartdata document classes in ts/db/documents/.

| Document Class | Collection | Unique Key | Purpose | |---|---|---|---| | StoredRouteDoc | storedRoutes | id | Programmatic routes (created via API) | | RouteOverrideDoc | routeOverrides | routeName | Hardcoded route enable/disable overrides | | ApiTokenDoc | apiTokens | id | API tokens (hashed secrets, scopes, expiry) | | VpnServerKeysDoc | vpnServerKeys | configId (singleton) | VPN server Noise + WireGuard keypairs | | VpnClientDoc | vpnClients | clientId | VPN client registrations | | AcmeCertDoc | acmeCerts | domainName | ACME certificates and keys | | ProxyCertDoc | proxyCerts | domain | SmartProxy TLS certificates | | CertBackoffDoc | certBackoff | domain | Per-domain cert provision backoff state | | RemoteIngressEdgeDoc | remoteIngressEdges | id | Edge node registrations | | VlanMappingsDoc | vlanMappings | configId (singleton) | MAC-to-VLAN mapping table | | AccountingSessionDoc | accountingSessions | sessionId | RADIUS accounting sessions | | CachedEmail | cachedEmails | id | Email metadata (TTL: 30 days) | | CachedIPReputation | cachedIPReputation | ipAddress | IP reputation results (TTL: 24 hours) |

Architecture

DcRouterDb (singleton)
  ├── LocalSmartDb (embedded, Rust) ─── or ─── External MongoDB
  └── SmartdataDb (ORM)
        └── @Collection(() => getDb())
              ├── StoredRouteDoc
              ├── RouteOverrideDoc
              ├── ApiTokenDoc
              ├── VpnServerKeysDoc / VpnClientDoc
              ├── AcmeCertDoc / ProxyCertDoc / CertBackoffDoc
              ├── RemoteIngressEdgeDoc
              ├── VlanMappingsDoc / AccountingSessionDoc
              ├── CachedEmail (TTL)
              └── CachedIPReputation (TTL)

TTL Cleanup

CacheCleaner runs on a configurable interval (default: 1 hour) and removes expired documents where expiresAt < now().

Disabling

For tests or lightweight deployments without persistence:

dbConfig: { enabled: false }