Notlify — Event-Driven Orchestration Platform with BullMQ
Notlify is a developer-centric backend framework demonstrating advanced asynchronous job orchestration, event-driven architecture, and workflow automation using Node.js, TypeScript, Redis, BullMQ, and Prisma.
It showcases a scalable pattern for handling background jobs, chained workflows, distributed event routing, and integration with external services such as email delivery — making it ideal for learning, interview portfolios, and real-world backend automation. :contentReference[oaicite:1]{index=1}
Notlify solves the common problem of orchestrating complex asynchronous work in modern backends:
✔ Event routing and dispatching
✔ Workflow sequencing (flows) with dependencies
✔ Robust retry/backoff strategies
✔ Queue-based email delivery
✔ Separation of concerns between API, events, workers, and business logic
Unlike a simple task queue example, Notlify implements full workflows with ordered job execution, domain event abstraction, and right-sized state hydration in workers.
-
Event-Driven Controllers
Controllers emit domain events instead of immediately executing side effects. -
Event Router
Central dispatcher that routes events into independent queues and workflows. -
BullMQ Flows
Defines parent → child job dependencies for orchestrated executions. -
Worker Consumers
Workers perform ordered actions like sending emails or generating tickets. -
Prisma + PostgreSQL
Reliable schema + database layer for stateful job hydration. -
Redis + BullMQ
Distributed job queueing with retries, backoff, and observability hooks.
A booking confirmation workflow in Notlify:
- User books an event
- Event router emits
BOOKING_CONFIRMED - A flow is created:
- send booking confirmation email
- then generate tickets
- Workers consume steps and execute them reliably
Each step is isolated, retryable, and order-guaranteed.
| Component | Technology |
|---|---|
| Language | TypeScript |
| Server | Node.js + Express |
| Database | PostgreSQL (Prisma ORM) |
| Queue | Redis + BullMQ |
| Workflow | BullMQ FlowProducer |
| Resend API | |
| Env Management | Dotenv |
Make sure you have the following installed:
- Node.js >= 18.x
- npm or yarn
- Redis Server running locally or remote
- PostgreSQL database (Neon/Supabase/RDS)
- Resend API Key for email
git clone https://github.com/TejasGoyal0/notlify.git
cd notlify
npm install
# or
yarn installCreate a .env file in the root, and fill in required values:
- DATABASE_URL="postgresql://:@:/?schema=public"
- REDIS_HOST=127.0.0.1
- REDIS_PORT=6379
- RESEND_API_KEY=your_resend_api_key
npx prisma migrate dev --name initIn separate terminals:
npm run dev # API server
npm run worker # Worker processesAfter starting:
-
Hit API endpoints to emit domain events.
-
Watch workers pick up jobs from Redis.
-
Jobs execute workflows like sending emails and ticket creation.
-
Add more workflows by extending the router and worker cases.
[API Controllers] —> [Event Router] —> [BullMQ Queue / FlowProducer] | | [Multiple Redis Queues] [Worker Consumers] | | Email / Ticket / Analytics Business Logic
Controllers never directly trigger side effects. They emit events that are durable and observable. This decouples API surface from workflow logic and allows safe retries or replay of events.
Flows express job dependencies. Each parent/child relationship models sequential or parallel steps in a workflow (e.g., confirmation → ticketing → analytics).
Workers log job progress and capture errors:
- worker.on("completed", job => console.log("Completed:", job.id));
- worker.on("failed", (job, err) => console.error("Failed:", job.id, err));
Notlify is open-source and ready for collaboration.
If you want to:
-
Add metrics and observability dashboards
-
Introduce a stress test CLI
-
Improve resilience or monitoring
please fork the repo and submit a PR.
Tejas Goyal – Backend engineer passionate about distributed systems, background jobs, and real-world infrastructure challenges. Connect:
- GitHub: https://github.com/TejasGoyal0
- LinkedIn: https://www.linkedin.com/in/tejas-goyal-862017246/
- Email: tejasgoyal72@gmail.com