A robust Spring Boot application implementing fraud detection for financial transactions.
This project demonstrates principles of anti-fraud systems used in the financial sector, featuring:
- User authentication and authorization
- REST API endpoints for transaction processing
- Rule-based fraud detection
- Transaction feedback system
- Framework: Spring Boot
- Security: Spring Security
- Database: MySQL
- Build Tool: Gradle
- Testing: JUnit
- Transaction Validation: Rules-based validation for monetary transactions
- Role-Based Access Control:
- ADMINISTRATOR
- MERCHANT
- SUPPORT
- Fraud Detection Rules:
- Amount validation
- IP address check
- Card number validation (Luhn algorithm)
- Region correlation
- Transaction Feedback System
- Clone the repository
- Build the project:
./gradlew build
- Run the application:
./gradlew bootRun
The server will start on port 28852.
- HTTP Basic Authentication
- Role-based authorization
- Transaction validation
- Card number verification
POST /api/auth/user
- Register new userGET /api/auth/list
- Get list of users
PUT /api/auth/role
- Change user rolePUT /api/auth/access
- Moderate users' platform accesssDELETE /api/auth/user/{username}
- Delete user
POST /api/antifraud/transaction
- Process transactionPUT /api/antifraud/transaction
- Update transactionGET /api/antifraud/history
- Get transaction history-
GET /api/antifraud/history/{number}
- Get transaction history for a specific card
PUT /api/antifraud/transaction
- Add feedback
POST /api/antifraud/suspicious-ip
- Add suspicious IPDELETE /api/antifraud/suspicious-ip/{ip}
- Remove suspicious IPPOST /api/antifraud/stolencard
- Add stolen cardGET /api/antifraud/stolencard
- View all stolen cardsDELETE /api/antifraud/stolencard/{number}
- Remove card from stolen cards database
- ADMINISTRATOR: User management
- MERCHANT: Transaction processing
- SUPPORT: Feedback and fraud rules management
- Transaction amount limits
- IP correlation checks
- Card number validation
- Regional payment patterns