Files
distri_notification_and_ale…/README.md
T
akshay d5a2a7cd2c Revise README for clarity and additional features
Updated README to enhance project overview and details.
2026-07-23 15:06:40 +05:30

3.5 KiB
Raw Blame History

📢 Distributed Notification and Alert System

📌 Overview

This project is a distributed backend system designed to process and deliver notifications across multiple channels (Email, SMS, Push). It supports real-time alerts, scheduled notifications, user preference handling, and query-driven delivery logic. The system is built for scalability, resilience, and extensibility, leveraging Node.js, Kafka, MongoDB, and Dockerized microservices.


🎯 Key Features

  • RealTime & Scheduled Delivery: Immediate processing for urgent alerts, scheduled pipelines for deferred notifications.
  • User Preferences: Configurable quiet hours, channel selection, and throttling limits.
  • Advanced Query Logic:
  • Resilient Messaging: Kafka decouples ingestion, processing, and delivery for fault tolerance.
  • Retry & Logging: Failed deliveries retried with logging into MongoDB.
  • Analytics API: /analytics endpoint for delivery stats, retries, and engagement metrics.

🎯 Objectives

  • Ingest and validate notification requests via APIs.
  • Process notifications in real-time or schedule them for future delivery.
  • Respect user preferences (quiet hours, channel selection, throttling limits).
  • Support deduplication, aggregation, and prioritization of alerts.
  • Deliver notifications reliably with retry logic and logging.
  • Provide analytics and monitoring endpoints for system visibility.

⚙️ Implementation Details

  • Backend Framework: Node.js, Express.js
  • Messaging System: Apache Kafka
  • Database: MongoDB (notifications, preferences, analytics)
  • Job Scheduling: node-schedule
  • ORM: Mongoose
  • Containerization: Docker + Docker Compose

🏗️ System Components

  1. Notification Ingestion & Validation Service

    • /notify API endpoint to receive requests.
    • Validates payload and publishes to Kafka topic notifications.
  2. Notification Processing & Scheduling Engine

    • Real-time delivery for urgent/high-priority alerts.
    • Scheduled notifications stored in MongoDB and checked periodically.
  3. User Preferences & Rules

    • Preferred channels (Email, SMS, Push).
    • Quiet hours (Do Not Disturb).
    • Notification limits (e.g., max 3/hour).
  4. Query Logic

    • Throttling: Restrict notifications per user-defined limits.
    • Quiet Hours Filtering: Reschedule notifications outside quiet hours.
    • Deduplication: Suppress duplicate alerts within a time window.
    • Aggregation: Batch low-priority notifications into summaries.
    • Urgent Alerts: Immediate bypass of scheduling.
  5. Notification Delivery Service

    • Channels: Email, SMS, Push (mock integrations).
    • Retry mechanism for failed deliveries.
    • Logging of statuses in MongoDB.
  6. Analytics & Monitoring

    • /analytics endpoint for delivery stats, retries, and engagement metrics.

🛠️ Installation & Setup

# Clone the repository
git clone https://github.com/akshay931/distri_notification_and_alert_system.git
cd distri_notification_and_alert_system

# Install dependencies
npm install

# Start services with Docker Compose
docker-compose up -d