Skip to content

Latest commit

 

History

27 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
SentinelPay

CI License

🛡️ SentinelPay

AI-Powered Real-Time Fraud Detection for UPI Payments

Event-Driven Microservices · Apache Kafka · Spring AI · Spring Boot · React · Docker


Java Spring Boot Apache Kafka Redis React Docker MySQL License

🌐 Live Demo • 📄 Journal Publication • 🐳 Run Locally


📄 International Journal Publication

SentinelPay: A Hybrid AI-Driven System for Real-Time Fraud Detection in Digital Payment Systems
Published in International Journal for Research in Advanced Computer Science and Engineering (IJRACSE)
Volume 12 • Issue 1 • May 2026

The linked article describes the project's hybrid AI-assisted digital payment fraud detection architecture. Publication is separate from verification of the current repository revision.


🚀 Overview

SentinelPay is an event-driven fintech portfolio project that routes simulated UPI payments through a 3-stage fraud verdict engine before bank-service debit.

Engineering review path

Start with the engineering evidence guide for source links, verification commands, current CI coverage, and remaining validation work. The bank service simulates account balances; production readiness and benchmark reproducibility require separate evidence.

The platform combines:

  • deterministic rule evaluation,
  • Redis-backed behavioural anomaly tracking,
  • Spring AI contextual reasoning,
  • Kafka asynchronous event orchestration,
  • and real-time user notification workflows

to deliver a scalable fraud detection ecosystem built for modern digital payments.

overview-architecture

📊 Published Benchmark Results

Metric Performance
Detection Accuracy 95.2%
Precision 93.8%
Recall 94.6%
F1 Score 94.2%
Average Processing Latency ~50 ms
Throughput 1200 TPS

These are the project's reported results for a 50,000-transaction fraud simulation. This repository does not currently include the dataset, executable benchmark harness, or raw result artifacts needed to reproduce these figures. They are not acceptance thresholds enforced by CI; see the verification limits.


🧠 Why SentinelPay Matters

UPI fraud and digital payment anomalies continue to grow rapidly while most traditional systems still rely on:

  • post-payment fraud checks,
  • brittle static thresholds,
  • delayed manual intervention.

SentinelPay solves this by ensuring:

✅ fraud analysis before money moves
✅ millisecond-level verdict generation
✅ scalable asynchronous transaction processing
✅ AI-assisted contextual anomaly identification
✅ full observability with production monitoring


⚡ 3-Layer Fraud Detection Pipeline

Layer Engine Speed Fraud Coverage
Layer 1 Rule Engine <1 ms amount spikes, location mismatch, transaction velocity
Layer 2 Redis Behavioural Engine <5 ms impossible travel, device switching, repeated suspicious patterns
Layer 3 Spring AI Contextual Analysis adaptive unseen anomalies, semantic behavioural irregularities

Each fraud layer short-circuits on a FRAUD verdict to minimize latency while preserving high-confidence AI analysis for borderline transactions.


🏗️ Distributed Microservice Architecture

microservice-architecture

Core Services

  • API Gateway → centralized JWT validation and request routing
  • Auth Service → user registration, login, token issuance
  • Transaction Service → UPI payment intake and Kafka event publishing
  • Fraud Detection Service → hybrid fraud scoring engine
  • Bank Service → account balance management and UPI simulation
  • Notification Service → asynchronous fraud alert dispatch
  • React Frontend → customer-facing dashboard

Kafka acts as the event backbone while Redis enables sub-millisecond behavioural profile access.


⚙️ Engineering Stack

Backend

Java 17 Spring Boot 3 Spring Security Spring Cloud Gateway Spring AI Apache Kafka Redis MySQL

Frontend

React 18 Material UI Axios Recharts

DevOps / Monitoring

Docker Docker Compose Prometheus Grafana Nginx


🔄 End-to-End Payment Lifecycle

payment-lifecycle

📸 Platform Screenshots

Login & Registration User Dashboard
Payment Submission Fraud Verdict
Analytics Dashboard Grafana Monitoring

🧪 Key REST API Endpoints

Auth Service

  • POST /auth/register
  • POST /auth/login

Transaction Service

  • POST /api/upi/pay
  • GET /api/transactions/{id}

Fraud Detection Service

  • GET /api/fraud/result/{txId}
  • GET /api/fraud/payment/{txId}

Bank Service

  • GET /bank/balance
  • GET /bank/account/by-upi/{upiId}

🐳 Docker Setup

git clone https://github.com/thillainirmal-tech/SentinelPay.git
cd SentinelPay
cp .env.example .env
docker compose up -d --build

Review the generated .env before starting the stack and never commit real credentials.

🤝 Contribution Guide

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/your-feature-name
  3. Follow code style: Java code uses the existing package structure; React code follows the existing hook/context patterns
  4. Test your changes: Ensure existing API contracts are preserved
  5. Commit with clear messages: feat: add impossible travel detection for IPv6
  6. Open a Pull Request with a description of what changed and why

Areas open for contribution

  • Additional fraud detection rules (Layer 1)
  • Grafana dashboard templates
  • Unit and integration tests
  • Documentation improvements
  • Frontend UI enhancements

📜 License

This project is licensed under the Apache License 2.0 — see the LICENSE file for details.

Copyright 2026 Thillai Nirmal K

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Built with ❤️ by Thillai Nirmal K

If this project helped you, please consider giving it a ⭐

Releases

Packages

Contributors

Languages