Framework
Enbbox Framework overview — define notification workflows in TypeScript with type-safe steps for email, SMS, push, in-app, and chat channels. Code-first approach with full IDE support.
The Enbbox Framework lets you define notification workflows directly in your codebase using TypeScript. This code-first approach gives you:
- Version control — Workflows are code, tracked in git
- Type safety — Full TypeScript support with autocomplete
- Testing — Unit test your notification logic
- Code review — Standard PR workflow for changes
- CI/CD — Deploy workflows alongside your application
Quick Example
import { workflow, CronExpression } from "@enbbox/framework";
const welcomeWorkflow = workflow("welcome", async ({ step, payload }) => {
await step.inApp("in-app-welcome", async () => ({
subject: "Welcome!",
body: `Hi ${payload.name}, welcome to our platform!`,
}));
await step.delay("wait-1-hour", async () => ({
amount: 1,
unit: "hours",
}));
await step.email("welcome-email", async () => ({
subject: `Welcome aboard, ${payload.name}!`,
body: `<h1>Getting Started</h1><p>Here's what to do next...</p>`,
}));
});Getting Started
- Introduction — Why use the Framework
- Quickstart — Set up in minutes
- Channels — Configure notification channels