main
Updated README to enhance project overview and details.
📢 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
- Real‑Time & 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:
- Throttling to enforce per‑user limits.
- Quiet Hours Filtering.
- Deduplication of similar alerts.
- Aggregation of low‑priority notifications.
- Priority‑Based Delivery.
- Resilient Messaging: Kafka decouples ingestion, processing, and delivery for fault tolerance.
- Retry & Logging: Failed deliveries retried with logging into MongoDB.
- Analytics API:
/analyticsendpoint 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
-
Notification Ingestion & Validation Service
/notifyAPI endpoint to receive requests.- Validates payload and publishes to Kafka topic
notifications.
-
Notification Processing & Scheduling Engine
- Real-time delivery for urgent/high-priority alerts.
- Scheduled notifications stored in MongoDB and checked periodically.
-
User Preferences & Rules
- Preferred channels (Email, SMS, Push).
- Quiet hours (Do Not Disturb).
- Notification limits (e.g., max 3/hour).
-
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.
-
Notification Delivery Service
- Channels: Email, SMS, Push (mock integrations).
- Retry mechanism for failed deliveries.
- Logging of statuses in MongoDB.
-
Analytics & Monitoring
/analyticsendpoint 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
Languages
JavaScript
99.1%
Dockerfile
0.9%