$ show novuhq/novu
Novu is a comprehensive notification infrastructure platform designed for multi-channel delivery (Email, SMS, Push, Chat, In-App) and workflow orchestration. It functions as both a SaaS product and a self-hosted solution, providing a unified API to manage subscribers, triggers, and notification templates. The system integrates deeply with AI agents, supporting Model Context Protocol (MCP) and managed runtimes (e.g., Anthropic) for conversational notifications. The architecture is a TypeScript monorepo managed by Nx and pnpm, featuring a NestJS backend (API, Worker, WebSocket), React/Next.js frontend (Dashboard, Playground), and MongoDB/Redis/ClickHouse data stores. It emphasizes extensibility through a provider factory pattern and a programmatic workflow DSL.
The LLM identified 3 files worth highlighting for reuse:
Implements a dynamic factory pattern for instantiating communication providers (Email, SMS, Chat, Push). This module allows the system to abstract external provider APIs (e.g., Twilio, SendGrid) behind a unified interface, enabling seamless addition of new channels without modifying core workflow logic. It demonstrates strong separation of concerns and is a key architectural component for platform extensibility.
Defines the core Domain Specific Language (DSL) for programmatic workflow definition. This module allows developers to define notification flows using JavaScript/TypeScript rather than JSON/YAML, enabling logic, conditionals, and step composition directly in code. It serves as the foundation for the Novu SDK and demonstrates advanced type-safe API design.
Provides a standardized abstraction for MongoDB data access across the codebase. It encapsulates Mongoose operations (CRUD, aggregation, filtering) into reusable repository methods, reducing boilerplate and ensuring consistent data access patterns. While tightly coupled to Novu's schema, the pattern itself is a robust example of the Repository Pattern in a TypeScript/NestJS environment.