Official Plugins
Mock Plugin
A testing utility plugin for SimpleNS development and integration testing.
What is Mock Plugin
The @simplens/mock plugin is a lightweight, zero-dependency provider designed specifically for testing and development within the SimpleNS ecosystem. It simulates notification delivery without actually sending anything.
How It Works
This plugin simulates notification delivery by logging to the console. When a notification is sent:
- The plugin receives the notification payload
- Validates the
recipient.user_idandcontent.messagefields - Logs the notification details to the console
- Returns
{ success: true }immediately
No API keys, SMTP servers, or third-party services required. Perfect for CI/CD pipelines and local development.
Installation & Configuration
- Open Dashboard → Plugins (
/plugins) (or the guided/setuptour). - Find
@simplens/mockin the catalog and click Install. - Create a provider instance (no credentials required) and set it as the default provider for the
mockchannel in Channel Routing.
Changes are saved to MongoDB and hot-reloaded across all services automatically—no container restart needed.
Required Credentials
| Key | Description |
|---|---|
| (none) | No credentials required! |
No credentials required! The mock plugin works out of the box with zero configuration.
Rate Limit
| Key | Default | Description |
|---|---|---|
maxTokens | 100 | Max tokens in bucket |
refillRate | 10 | Tokens refilled per second |
Environment Variables
# No environment variables required for mock pluginNotification Payload
- You can easily get and configure this request payload from
Payload Studioin Admin Dashboard
{
"request_id": "uuid-v4",
"client_id": "uuid-v4",
"channel": ["mock"],
"webhook_url": "https://your-app.com/webhooks/simplens",
"recipient": {
"user_id": "user-123"
},
"content": {
"mock": {
"message": "Hello {{name}}, welcome to SimpleNS!"
}
},
"variables": {
"name": "John"
}
}Features
| Feature | Description |
|---|---|
| Zero Dependencies | No API keys or external services required |
| Instant Response | No network latency or rate limiting |
| Safe Testing | No real notifications sent |
| CI/CD Ready | Perfect for automated test suites |
| Always Healthy | healthCheck() always returns true |
| Template Variables | Supports {{key}} syntax |
Docs