An event-driven fraud detection backend built with Spring Boot, Kafka, PostgreSQL, and AWS. Transactions are processed asynchronously, evaluated by a rule engine, and fraud alerts are delivered using AWS SNS, SQS, and Lambda. All AWS infrastructure is provisioned using Terraform.
- Client submits transaction via REST API
- Transaction is persisted axnd published to Kafka
- Fraud Engine consumes and evaluates rules
- Fraud result is published to
fraud-results - Alert Service publishes fraud alerts to SNS
- SNS fans out to SQS
- Lambda processes alerts with retries and DLQ support
- Java, Spring Boot
- Apache Kafka
- PostgreSQL
- AWS SNS, SQS, Lambda
- Terraform (Infrastructure as Code)
- Docker
- Amount threshold rule (> $5000)
- Extensible rule-based engine design
- SNS, SQS, DLQ, Lambda, IAM provisioned via Terraform
- Application configuration via environment variables
- Local development with Kafka (Docker Compose)
- Deploy services to ECS Fargate
- Replace Kafka with AWS MSK
- Velocity-based fraud detection
- Terraform modules for ECS and networking
