Skip to content

Module: Notifications

Composable notification service with pluggable providers for email, SMS, and push. Ships with Resend and SendGrid for email, Twilio for SMS, and web-push for browser notifications. Includes template rendering with variable substitution.

Namemodule-notifications-ts
Version0.1.0
Categorycomposable-modules
LicenseApache-2.0
Personaengineering
Tagsnotifications, email, sms, push, typescript
Sourcetemplates/module-notifications-ts

Render it

Three front doors, one catalog. Pick whichever suits the caller.

# CLI
npx @nanohype/sdk render module-notifications-ts --out ./my-app

# SDK
import { LocalSource, renderTemplate } from "@nanohype/sdk";
const result = await renderTemplate(source, "module-notifications-ts", variables);

# MCP — from an agent
get_template({ name: "module-notifications-ts" })

Prerequisites

ToolVersionWhy
node>=22Node.js runtime for the notification module

Variables

Required

ProjectName string
Kebab-case project name, used as package name and directory Must be lowercase kebab-case starting with a letter.

Optional

Description string — defaults to Notification service with pluggable providers
Short project description for package.json and README
EmailProvider string — defaults to resend
Default email provider (resend, sendgrid, or a custom name)
IncludeSms bool — defaults to false
Include SMS channel with Twilio provider
IncludePush bool — defaults to false
Include push notification channel with web-push provider

What it produces

25 files. Placeholder names such as __APP_NAME__ are what the renderer substitutes into.

.env.example
.gitignore
biome.json
package.json
src/notifications/__tests__/registry.test.ts
src/notifications/__tests__/template.test.ts
src/notifications/bootstrap.ts
src/notifications/channels/email/index.ts
src/notifications/channels/email/mock.ts
src/notifications/channels/email/resend.ts
src/notifications/channels/email/sendgrid.ts
src/notifications/channels/index.ts
src/notifications/channels/push/index.ts
src/notifications/channels/push/web-push.ts
src/notifications/channels/registry.ts
src/notifications/channels/sms/index.ts
src/notifications/channels/sms/twilio.ts
src/notifications/channels/types.ts
src/notifications/index.ts
src/notifications/resilience/__tests__/circuit-breaker.test.ts
src/notifications/resilience/circuit-breaker.ts
src/notifications/template.ts
src/notifications/types.ts
tsconfig.json
vitest.config.ts

Composes with