open-index/open-npm huggingface dataset:
npm package: @simplens/config-gen
Description: CLI tool to generate simplens.config.yaml from plugin manifests
Author: SimpleNS Team
Latest version: 1.0.2

# @simplens/config-gen

CLI tool to generate `simplens.config.yaml` from plugin manifests.

## Installation

```bash
npm install -g @simplens/config-gen
# or use with npx
npx @simplens/config-gen generate @simplens/mock
```

## Usage

### Generate config for plugins

```bash
# Single plugin
simplens-config generate @simplens/mock

# Multiple plugins
simplens-config gen @simplens/mock @simplens/nodemailer-gmail

# Multiple plugins for same channel (creates default + fallback)
simplens-config gen @simplens/nodemailer-gmail @simplens/sendgrid
```

### Modify existing config

```bash
# Add new plugins to existing config
simplens-config gen @simplens/twilio-sms -c simplens.config.yaml
```

### Other options

```bash
# Output to custom file
simplens-config gen @simplens/mock -o custom.yaml

# Print to stdout
simplens-config gen @simplens/mock --stdout

# List official plugins
simplens-config list
```

## Example Output

```yaml
# ============================================
# SimpleNS Configuration
# Generated by @simplens/config-gen
# ============================================

# Provider configurations
providers:
  # nodemailer-gmail - @simplens/nodemailer-gmail
  - package: "@simplens/nodemailer-gmail"
    id: nodemailer-gmail
    credentials:
      EMAIL_USER: ${EMAIL_USER}  # Required
      EMAIL_PASS: ${EMAIL_PASS}  # Required
    optionalConfig:
      EMAIL_FROM: ${EMAIL_FROM}  # Optional
    options:
      priority: 1  # Higher = preferred
      rateLimit:
        maxTokens: 100
        refillRate: 10

# Channel to provider mapping
channels:
  email:
    default: nodemailer-gmail
```

## License

MIT
npm package: @simplens/mcp
Description: Remote MCP server for SimpleNS notification orchestration engine
Latest version: 1.0.3

# SimpleNS MCP Server

A Model Context Protocol (MCP) server for the SimpleNS notification engine. Allows AI assistants like Claude Desktop and Cursor to interact with your SimpleNS instance to send notifications, check analytics, and manage alerts.

## Features

- **Streamable HTTP Transport**: Local usage via npm package.
- **Stdio Transport**: Local usage via command line/npm package.

- **Tool Set**:
  - `send_notification` / `send_batch_notification` (supports templates and inline content)
  - `get_send_schema` — full schema docs with examples for AI agents
  - `list_plugins`
  - `find_failures` / `retry_failure`
  - `list_alerts` / `resolve_alert`

## Installation

No installation is required when using `npx`.

## Usage

### Streamable HTTP (Local via npm package)

Run the server locally:
```bash
npx -y @simplens/mcp
```

The server starts default at port: `3001`

Then point your MCP client at the local HTTP endpoint and pass headers on every request:

```json
{
  "mcpServers": {
    "simplens-local-http": {
      "type": "streamable-http",
      "url": "http://localhost:3001/mcp",
      "headers": {
        "X-SimpleNS-API-Key": "your-ns-api-key",
        "X-SimpleNS-Core-URL": "http://localhost:3000",
        "X-SimpleNS-Dashboard-URL": "http://localhost:3002"
      }
    }
  }
}
```

### Stdio (Local via npm package)

You can run the server locally if you have SimpleNS running locally.

Add to your MCP Client config:

```json
{
  "mcpServers": {
    "simplens-local": {
      "command": "npx",
      "args": ["-y", "@simplens/mcp", "--stdio"],
      "env": {
        "NS_API_KEY": "your-local-api-key",
        "SIMPLENS_CORE_URL": "http://localhost:3000",
        "SIMPLENS_DASHBOARD_URL": "http://localhost:3002"
      }
    }
  }
}
```

## Tools Reference

| Tool | Description |
|------|-------------|
| `send_notification` | Send a single notification via any channel (supports templates and inline content) |
| `send_batch_notification` | Send batch notifications to multiple recipients |
| `get_send_schema` | Get full request schema with examples — call before sending if unsure about format |
| `list_plugins` | List installed plugins, channels, and their schemas |
| `find_failures` | Find failed notifications with filters (channel, date, search) |
| `retry_failure` | Retry a specific failed notification by ID |
| `list_alerts` | List unresolved system alerts (ghost delivery, stuck processing) |
| `resolve_alert` | Dismiss a specific system alert |
npm package: @simplens/mock
Description: Mock provider plugin for SimpleNS for testing
Author: SimpleNS Team
Latest version: 1.0.3

# @simplens/mock

A mock provider plugin for [SimpleNS](https://github.com/SimpleNotificationSystem) designed for testing and development purposes.

## Installation

```bash
npm install @simplens/mock
```

## Usage

### Configuration

Add the mock provider to your `simplens.config.yaml`:

```yaml
providers:
  - name: mock
    package: '@simplens/mock'
    options:
      rateLimit:
        maxTokens: 100
        refillRate: 10
```

### Notification Schema

The mock provider accepts notifications with the following structure:

```typescript
{
  channel: 'mock',
  recipient: {
    user_id: string
  },
  content: {
    message: string
  }
}
```

## Configuration Options

| Option | Type | Default | Description |
|--------|------|---------|-------------|
| `rateLimit.maxTokens` | number | 100 | Maximum number of tokens in the rate limit bucket |
| `rateLimit.refillRate` | number | 10 | Number of tokens refilled per second |

## Development

### Build

```bash
npm run build
```

### Test

```bash
npm test
```

### Watch Mode

```bash
npm run test:watch
```

## License

MIT

## Author

SimpleNS Team
npm package: @simplens/nodemailer-gmail
Description: Gmail/SMTP email provider plugin for SimpleNS using Nodemailer
Author: SimpleNS Team
Latest version: 1.0.9

# @simplens/nodemailer-gmail

Gmail/SMTP email provider plugin for SimpleNS using Nodemailer.

## Installation

```bash
npm install @simplens/nodemailer-gmail
```

## Configuration

Add to your `simplens.config.yaml`:

```yaml
providers:
  - package: "@simplens/nodemailer-gmail"
    id: "gmail"
    credentials:
      EMAIL_HOST: "${EMAIL_HOST}"        # Optional, default: smtp.gmail.com
      EMAIL_PORT: "${EMAIL_PORT}"        # Optional, default: 587
      EMAIL_USER: "${EMAIL_USER}"        # Required: your Gmail address
      EMAIL_PASS: "${EMAIL_PASS}"        # Required: Gmail App Password
      EMAIL_FROM: "${EMAIL_FROM}"        # Optional, defaults to EMAIL_USER
    options:
      priority: 1
      rateLimit:
        maxTokens: 100     # Token bucket size
        refillRate: 10     # Tokens per second

channels:
  email:
    default: "gmail"
```

## Gmail App Password

For Gmail, you need to use an App Password, not your regular password:

1. Enable 2-Factor Authentication on your Google account
2. Go to: https://myaccount.google.com/apppasswords
3. Generate an app password for "Mail"
4. Use that password as `EMAIL_PASS`

## Environment Variables

```bash
EMAIL_HOST=smtp.gmail.com
EMAIL_PORT=587
EMAIL_USER=your-email@gmail.com
EMAIL_PASS=your-app-password
EMAIL_FROM=your-email@gmail.com
```

## Notification Format

```json
{
  "notification_id": "...",
  "request_id": "uuid-v4",
  "client_id": "uuid-v4",
  "channel": "email",
  "recipient": {
    "user_id": "user-123",
    "email": "recipient@example.com"
  },
  "content": {
    "subject": "Hello!",
    "message": "Hello {{name}}, welcome!"
  },
  "variables": {
    "name": "World"
  },
  "webhook_url": "https://your-app.com/webhook",
  "retry_count": 0,
  "created_at": "2024-01-01T00:00:00Z"
}
```

## Features

- ✅ HTML and plain text emails (auto-detected)
- ✅ Template variable substitution (`{{key}}`, `${key}`, `{key}`, `$key` syntax)
- ✅ Configurable rate limiting
- ✅ Automatic retry classification
- ✅ Gmail and any SMTP server support

## License

MIT
npm package: @simplens/resend
Description: Send notifications via Resend
Author: Adhish Krishna S
Latest version: 1.0.0

# @simplens/resend

Resend email provider plugin for [SimpleNS](https://github.com/SimpleNotificationSystem/SimpleNotificationSystem).

## Features

- 📧 Send HTML emails via [Resend](https://resend.com)
- 🖼️ Automatic base64 image extraction to CID attachments
- 🔄 Template variable replacement (`{{var}}`, `${var}`, `{var}`, `$var`)
- ⚡ Built-in rate limiting (configurable)
- ✅ Full TypeScript support

## Installation

```bash
npm install @simplens/resend
```

## Configuration

Add to your `simplens.config.yaml` or generate using `npx @simplens/config-gen gen @simplens/resend`:

```yaml
providers:
  - package: '@simplens/resend'
    id: email-resend
    credentials:
      RESEND_API_KEY: ${RESEND_API_KEY}
      FROM_EMAIL: ${FROM_EMAIL}
    options:
      rateLimit:
        maxTokens: 100      # Max emails in bucket
        refillRate: 100     # Tokens refilled per interval
        refillInterval: day # second | minute | hour | day
```

### Required Credentials

| Credential | Description |
|------------|-------------|
| `RESEND_API_KEY` | Your Resend API key ([get one here](https://resend.com/api-keys)) |
| `FROM_EMAIL` | Verified sender email address ([verify domain](https://resend.com/domains)) |


## Notification Schema

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `channel` | `'email'` | ✅ | Must be `'email'` |
| `recipient.user_id` | `string` | ✅ | User identifier |
| `recipient.email` | `string` | ✅ | Valid email address |
| `content.subject` | `string` | ✅ | Email subject line |
| `content.html` | `string` | ✅ | HTML content (must contain at least one HTML tag) |
| `variables` | `Record<string, unknown>` | ❌ | Template variables |

## Rate Limiting

Resend free tier allows 100 emails/day. Configure based on your plan:

| Plan | Suggested Config |
|------|------------------|
| Free | `maxTokens: 100, refillRate: 100, refillInterval: day` |
| Pro | `maxTokens: 5000, refillRate: 5000, refillInterval: day` |

## Development

```bash
# Install dependencies
npm install

# Build
npm run build

# Run tests
npm test

# Manual test (requires .env with RESEND_API_KEY, FROM_EMAIL, TO_EMAIL)
npm run test:send
```

## License

MIT

## Author

SimpleNS Team
npm package: @simplens/sdk
Description: SDK for building SimpleNS notification provider plugins
Author: SimpleNS Team
Latest version: 1.0.5

# @simplens/sdk

SDK for building SimpleNS notification provider plugins.

## Installation

```bash
npm install @simplens/sdk
```

## Usage

```typescript
import { 
  SimpleNSProvider, 
  ProviderManifest, 
  DeliveryResult,
  createNotificationSchema,
  emailRecipientSchema,
  emailContentSchema,
  replaceVariables,
  z
} from '@simplens/sdk';

// Define your notification type
const notificationSchema = createNotificationSchema(
  'email',
  emailRecipientSchema,
  emailContentSchema
);

type MyNotification = z.infer<typeof notificationSchema>;

// Implement the provider
class MyEmailProvider implements SimpleNSProvider<MyNotification> {
  readonly manifest: ProviderManifest = {
    name: 'simplens-my-email',
    version: '1.0.0',
    channel: 'email',
    displayName: 'My Email Provider',
    description: 'Send emails via My Service',
    author: 'Your Name',
    requiredCredentials: ['API_KEY'],
  };
  
  getNotificationSchema() { return notificationSchema; }
  getRecipientSchema() { return emailRecipientSchema; }
  getContentSchema() { return emailContentSchema; }
  
  getRateLimitConfig() {
    return { maxTokens: 100, refillRate: 10 };
  }
  
  async initialize(config) {
    // Initialize your SDK/client
  }
  
  async healthCheck() {
    return true;
  }
  
  async send(notification): Promise<DeliveryResult> {
    let html = notification.content.html || '';
    
    // Use SDK utilities
    if (notification.variables) {
      html = replaceVariables(html, notification.variables);
    }
    
    // Send via your provider...
    return { success: true, messageId: 'msg-123' };
  }
  
  async shutdown() {
    // Cleanup
  }
}

export default MyEmailProvider;
```

## API Reference

### Interfaces

- `SimpleNSProvider<T>` - Main interface all providers implement
- `ProviderManifest` - Provider metadata
- `ProviderConfig` - Configuration passed during init
- `DeliveryResult` - Return type from send()
- `RateLimitConfig` - Rate limiting settings

### Schemas

- `baseNotificationSchema` - Common fields
- `emailRecipientSchema` - Email recipient
- `smsRecipientSchema` - SMS recipient
- `emailContentSchema` - Email content
- `createNotificationSchema()` - Build complete schema

### Utilities

- `replaceVariables(template, vars)` - Template substitution
- `isHtmlContent(str)` - Check for HTML
- `truncate(str, len)` - Truncate string
- `sleep(ms)` - Async delay
- `retryWithBackoff(fn)` - Retry helper
npm package: @simpleotp/core
Description: This is the core JavaScript-based authentication SDK for [Simple OTP](https://simpleotp.com), the easiest way to add passwordless authentication to your website.
Latest version: 1.2.0

# simpleotp-sdk-js-core

This is the core JavaScript-based authentication SDK for [Simple OTP](https://simpleotp.com), the easiest way to add passwordless authentication to your website.

Integration documentation varies depending on which frontend library you're using, see below:

# React: Docs and Component Examples
https://github.com/mockernut-ventures/simpleotp-sdk-js-react#readme

# Vue: Docs and Component Examples
https://github.com/mockernut-ventures/simpleotp-sdk-js-vue#readme

# Others
If you aren't using either of the above frameworks, you will just need to use this library by itself and write your own integration code. To install the library:
`npm i @simpleotp/core`

For examples of how to use the core library without the React or Vue plugin, see [here](https://github.com/mockernut-ventures/simpleotp-sdk-js-core/blob/main/__tests__/index.spec.js).

# Magic Link vs. Code-based Authentication
The only situation where we recommend Code-based authentication is when users cannot click a web URL to open your app. For example, progressive web apps (PWAs) have this problem and should use code based authentication. All other apps should use Magic Links.

# About Simple OTP
**We make integration easy for developers**:
Install our JavaScript SDK and integrate in just a few lines of code. You can use our API and webhook events to automate tasks such as blacklisting users, creating sites, and updating account details.

**We obsess over privacy**:
The only data Simple OTP collects from a signup is an email address, which is only used in a transactional fashion as a part of the passwordless sign-in process. Your users' email addresses are never shared with third party companies.

**We offer self-hosting and source code access**:
Host Simple OTP on your own servers and store user emails in your own database. We'll also provide you with support if you need it.

**Our [pricing](https://simpleotp.com/#pricing-scrollpoint) is fair**:
We have consistent, flat-rate, "pay once" pricing with unlimited user caps to allow you to operate a production website. Unlike the competition, we don't arbitrarily charge more based on what type of website or business you operate.
npm package: @simplepasskey/browser
Description: Browser SDK for SimplePasskey — passkey authentication as a service
Latest version: 0.3.3

# @simplepasskey/browser

Browser SDK for [SimplePasskey](https://simplepasskey.com) — passkey authentication as a service.

## Install

```bash
npm install @simplepasskey/browser @simplewebauthn/browser
```

## Usage

```javascript
import { SimplePasskey } from '@simplepasskey/browser';

const auth = new SimplePasskey({ clientId: 'your-client-id' });

// Register a new user
const { jwt, userId } = await auth.register({ displayName: 'Sam' });

// Sign in
const { jwt, userId } = await auth.signIn();

// Check auth state
if (auth.isAuthenticated()) {
  console.log('Logged in as', auth.getSession().userId);
}

// Auto-refresh on 401
const resp = await auth.fetch('/api/protected-endpoint');

// Listen for auth changes
auth.onAuthChange((session) => {
  if (session) console.log('Signed in');
  else console.log('Signed out');
});

// Logout
await auth.logout();
```

## API

### `new SimplePasskey({ clientId, baseUrl?, autoRefresh? })`
Create an instance. `baseUrl` defaults to `https://api.simplepasskey.com`. `autoRefresh` defaults to `true`.

### `auth.register({ displayName? })` → `{ jwt, userId }`
Register a new passkey. Prompts the user's authenticator.

### `auth.signIn(options?)` → `{ jwt, userId }`
Authenticate with an existing passkey. Pass `{ useBrowserAutofill: true }` to use conditional UI (autofill) instead of a modal.

### `auth.refresh()` → `{ jwt }`
Refresh an expired JWT using the HttpOnly refresh token cookie.

### `auth.logout()`
Clear the session and invalidate the refresh token.

### `auth.getSession()` → `{ jwt, userId, isExpired }`
Get current session state.

### `auth.isAuthenticated()` → `boolean`
Check if the user has a valid (non-expired) JWT.

### `auth.fetch(url, options?)` → `Response`
Fetch with automatic JWT auth and 401 auto-refresh.

### `auth.onAuthChange(callback)` → `() => void`
Subscribe to auth state changes. Returns an unsubscribe function.

### `auth.ready` → `Promise<Session>`
A promise that resolves once auto-refresh on initialization is complete. Use `await auth.ready` to wait for session restoration.

### Session Restoration

The SDK automatically refreshes expired JWTs on initialization:

```javascript
const auth = new SimplePasskey({ clientId: 'your-client-id' });

// Wait for session restoration
const session = await auth.ready;
if (session.jwt) {
  console.log('Welcome back', session.userId);
} else {
  // Show login UI
}
```

Disable with `autoRefresh: false` if you handle refresh yourself.

### Conditional UI (Autofill)

For a seamless sign-in experience, use browser autofill instead of a modal:

```html
<input type="text" autocomplete="webauthn" placeholder="Sign in" />
```

```javascript
// Call early on page load — the passkey appears in the autofill dropdown
const { jwt, userId } = await auth.signIn({ useBrowserAutofill: true });
```
npm package: @simplepay-ai/api-client
Description: SimplePay API Client
Author: SimplePay
Latest version: 2.3.2

# SimplePay API Client

## Usage

### 1. Install package

```bash
npm install --save-dev @simplepay-ai/api-client
```

### 2. Use `Client` or `WsClient` classes from package

See documentation for [`Client`](docs/client.md) or [`WsClient`](docs/ws-client.md)

## Development

### Ensure proper code style

Run following command to format your code before commit:

```bash
npm run format
```

## Publishing

### 1. Increment version

Package uses [Semantic Versioning](https://semver.org). You should increment package version before publishing

If you introduce breaking changes, run:

```bash
npm version major
```

If your changes is backward-compatible, run:

```bash
npm version minor
```

If you fixed a bug, run:

```bash
npm version patch
```

### 2. Push to repository with tags

```bash
git push origin main --tags
```

New release and package version will be created automatically
npm package: @simplepay-ai/widget
Description: SimplePay Payment Widget
Author: SimplePay
Latest version: 0.12.4

# SimplePay Payment Widget

Visit [Demo payment page](https://widget-test-gamma.vercel.app/).

## Usage

### 1. Install

As NPM package

```bash
npm install --save-dev @simplepay-ai/widget
```

```typescript
import '@simplepay-ai/widget';
```

Or include as script

```html
<script
    src="https://cdn.jsdelivr.net/npm/@simplepay-ai/widget@0.0.3/dist/widget.js"
    type="module"
></script>
```

### 2. Add component to desired place on page

```html
<payment-app
    price="0.8"
    appId="09476f0c-ed36-4dfe-84f4-ef2df1644830"
    clientId="bf298925-2f45-492c-891d-f997aa7ac864"
    backToStoreUrl="https://example.com"
    serverUrl="https://example.com/invoice"
/>
```

## Development

### Ensure proper code style

Run following command to format your code before commit:

```bash
npm run format
```

## Publishing

### 1. Increment version

Package uses [Semantic Versioning](https://semver.org). You should increment package version before publishing

If you introduce breaking changes, run:

```bash
npm version major
```

If your changes is backward-compatible, run:

```bash
npm version minor
```

If you fixed a bug, run:

```bash
npm version patch
```

### 2. Push to repository with tags

```bash
git push origin main --tags
```

New release and package version will be created automatically
npm package: @simplepdf/wix-embed-pdf
Description: SimplePDF straight into your Wix website
Author: bendersej
Latest version: 1.0.1

# SimplePDF x Wix

This is the source code of the SimplePDF Custom Element for Wix.

The WIX documentation can be found [here](https://devforum.wix.com/kb/en/article/create-a-custom-element-and-app-settings-panel#script-code-example)