SimpleNS LogoDocs

Introduction

List of Official Plugins for SimpleNS

Plugins in SimpleNS

SimpleNS uses a plugin-based architecture that allows you to extend its capabilities by adding new notification providers without modifying the core system.

Why Plugins?

Plugins keep the core lean while enabling unlimited extensibility. Add only the providers you need, exactly how you need them configured.


What are Plugins?

Plugins are self-contained npm packages that implement the SimpleNSProvider interface from @simplens/sdk. Each plugin:

Encapsulates Logic

Contains all the code needed to send notifications via a specific service (e.g., Gmail, Twilio, FCM)

Defines Schemas

Provides Zod schemas for recipient and content validation specific to the channel

Manages Lifecycle

Handles initialization, health checks, and graceful shutdown

Configures Rate Limits

Specifies rate limiting behavior to prevent API throttling


Role of Plugins

Plugins serve several critical functions within the SimpleNS ecosystem:


Plugin Lifecycle

Every plugin follows a consistent lifecycle managed by the SimpleNS core:

Installation

Open Dashboard → Plugins (/plugins) (or use the /api/plugins/* APIs) to browse the plugin catalog (GET /api/plugins/catalog) and install official or community npm packages.

If you host private plugins, configure custom npm registry/scope tokens via npm Auth (NpmAuthService) right in the Dashboard.

Installed plugins, encrypted provider credentials, and channel routings are stored in MongoDB and hot-reloaded with zero restarts across all API, worker, and processor containers via Redis Pub/Sub (PluginSyncService, ProviderManagerService, ChannelRoutingService).

Initialization

The plugin's initialize() method is called with its decrypted credentials and optional configuration.

Health Check

SimpleNS verifies the plugin is ready by calling healthCheck(). Unhealthy plugins are flagged but don't block other providers.

Registration

The plugin is registered in the Plugin Registry with its configured priority and channel mapping.

Message Handling

When notifications arrive, the plugin's send() method is invoked to deliver them via the underlying service.

Shutdown

On graceful termination, shutdown() is called to clean up connections and resources.


Official Plugins

SimpleNS provides official, production-ready plugins maintained by the core team:


Plugins vs. Provider Instances

SimpleNS separates Plugins from Provider Instances so you can scale and isolate credentials cleanly:

  • Plugin: The npm package (e.g., @simplens/resend, @simplens/nodemailer-gmail) installed in SimpleNS.
  • Provider Instance: A named configuration of a plugin with its own encrypted credentials, priority, and rate limit (e.g., resend-acct-1 and resend-acct-2 using different API keys on the same @simplens/resend plugin).
  • Channel Routing: Chains your provider instances into a default + ordered fallback_provider_ids list per channel, enabling automatic failover on both errors and rate limits. See Multi-Provider Channel Routing.

Managing Plugins & Providers

Everything is managed live in Dashboard → Plugins (/plugins):

  1. Install / Upgrade / Uninstall: Install packages from npm, switch versions, or uninstall plugins without restarting containers.
  2. Provider Instances: Create one or more provider instances per plugin with encrypted credentials, priority, rate limits (maxTokens, refillRate), and optional file attachment overrides.
  3. Channel Routing: Assign a default and optional fallback provider for each channel (e.g., email → gmail-primary, fallback resend-backup).

Upgrading from simplens.config.yaml?

If your MongoDB collections are empty on startup and a legacy simplens.config.yaml exists, YamlMigrator automatically imports your providers, credentials, and channel routings into MongoDB.


What's Next?

On this page