๐ NotifyX โ AI-Powered Real-Time Notification System
A production-grade, AI-driven event system built using Spring Boot, Kafka, Kafka Streams, Gemini AI, and WebSockets.
๐ฅ Overview
NotifyX is an intelligent notification system that delivers real-time updates with:
- โก Ultra-low latency (Kafka + WebSockets)
- ๐ง AI-based decision making (Gemini API)
- ๐ Fault-tolerant processing (Retry + DLQ)
- ๐ Stream-based aggregation (Kafka Streams)
๐งฑ Tech Stack
| Layer |
Technology |
| Backend |
Spring Boot 3 |
| Messaging |
Apache Kafka |
| Streaming |
Kafka Streams |
| AI Engine |
Gemini API |
| Realtime |
WebSockets (STOMP + SockJS) |
| Database |
PostgreSQL |
| Frontend |
HTML + JavaScript |
| Build Tool |
Maven |
๐๏ธ Architecture Diagram

โก Features
๐ค AI Intelligence
- Smart priority classification (HIGH / MEDIUM / LOW)
- AI-based retry decision (RETRY / DROP)
- Intelligent event routing
๐ Backend
- Kafka event-driven architecture
- Multi-topic routing
- Retry + DLQ mechanism
- PostgreSQL persistence
๐ Kafka Streams
- Real-time aggregation (window-based)
- Priority-based routing
- High-priority instant delivery
๐ด Frontend UI
- Live notifications via WebSockets
- AI priority badges
- Sound alerts ๐
- Auto-expiring notifications
- User filtering
๐ API
Send Event
Body
{
"userId": "user123",
"type": "payment",
"message": "Payment failed due to insufficient balance"
}
โ ๏ธ Priority is automatically handled by AI
Get Notifications
GET /api/notifications/{userId}
โก WebSocket
Subscribe:
๐ Getting Started
Prerequisites
- Kafka + Zookeeper
- PostgreSQL
- Java 17+
Run
Open UI
http://localhost:8080/index.html
๐งช Sample Events
๐ด High Priority
{
"userId": "user1",
"type": "payment",
"message": "Payment failed due to insufficient balance"
}
๐ข Low Priority
{
"userId": "user1",
"type": "promo",
"message": "Big discount available!"
}
๐ง Use Cases
- Banking alerts
- Fraud detection
- E-commerce updates
- Monitoring systems
- Social notifications
๐จโ๐ป Author
Akash Adak
Backend โข DevOps โข Distributed Systems
โญ Star this repo if you like it!