|
5 | 5 | Sentinel is a high-performance, event-driven fraud detection engine built with **Spring Boot**, **Kafka Streams**, and **H2**. It processes financial transactions in real-time using a weighted scoring model to identify and block suspicious activity. |
6 | 6 |
|
7 | 7 | ## 🚀 Key Features |
8 | | -- **Real-Time Stream Processing**: Uses Kafka Streams to evaluate transactions with sub-second latency. |
9 | | -- **Dynamic Blacklisting**: Utilizes a `GlobalKTable` to sync blacklisted users across all engine instances instantly. |
10 | | -- **Weighted Rule Engine**: A modular rule pattern that allows for easy addition of new fraud detection logic. |
11 | | -- **Audit Logging**: Every decision (Score, Reason, Action) is persisted to an H2 database and broadcast back to a dedicated Kafka topic. |
| 8 | +- **Modern Java Stack**: Optimized for **Java 25**, leveraging the latest JVM performance enhancements. |
| 9 | +- **Stream Processing**: Sub-second fraud evaluation via Kafka Streams. |
| 10 | +- **Global State Store**: Real-time user blacklisting using `GlobalKTable` synchronized across all nodes. |
| 11 | +- **Asynchronous Audit**: Decisions are saved to H2 and broadcast to a `fraud-decisions` topic without blocking the transaction flow. |
12 | 12 |
|
13 | 13 | ## 🛠️ Architecture |
14 | | -The system follows a decoupled, reactive flow: |
15 | | -1. **Ingress**: Transactions are injected via a REST API into the `inbound-transactions` Kafka topic. |
16 | | -2. **Analysis**: The `ScoringEngine` processes the stream, checking against the `GlobalKTable` state store. |
17 | | -3. **Decisioning**: Results are routed based on scores: |
18 | | - - `< 40**: **APPROVE** |
19 | | - - `40 - 79**: **REVIEW** |
20 | | - - `≥ 80**: **REJECT** |
21 | | -4. **Egress**: Decisions are sent to the `fraud-decisions` topic and saved to the database. |
22 | | - |
| 14 | +1. **Producer**: Transactions enter via REST -> Kafka `inbound-transactions`. |
| 15 | +2. **Processor**: `ScoringEngine` runs rules (Blacklist, High Amount, etc.). |
| 16 | +3. **Sink**: Results are persisted to H2 and sent to a decision topic. |
23 | 17 | ## ⚙️ Configuration & Security |
24 | 18 | This project is configured for **SSL-secured Kafka** (e.g., Aiven, Confluent). For security, sensitive credentials must be externalized using environment variables. |
25 | 19 |
|
|
0 commit comments