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.
| Name | module-notifications-ts |
| Version | 0.1.0 |
| Category | composable-modules |
| License | Apache-2.0 |
| Persona | engineering |
| Tags | notifications, email, sms, push, typescript |
| Source | templates/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
| Tool | Version | Why |
|---|---|---|
node | >=22 | Node.js runtime for the notification module |
Variables
Required
ProjectNamestring- Kebab-case project name, used as package name and directory Must be lowercase kebab-case starting with a letter.
Optional
Descriptionstring — defaults toNotification service with pluggable providers- Short project description for package.json and README
EmailProviderstring — defaults toresend- Default email provider (resend, sendgrid, or a custom name)
IncludeSmsbool — defaults tofalse- Include SMS channel with Twilio provider
IncludePushbool — defaults tofalse- 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.tsComposes with
- Pairs with
ts-service - Pairs with
module-queue-ts - Pairs with
module-auth-ts - Nests inside
monorepo