Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
e8519a2
feat: TXMNG AFVAL Addition of redis and debezium services, modificati…
MarcoEYC Jun 10, 2024
1ab82e7
feat: TXMNG AFVAL Addition of init setup of postgres db and debezium …
MarcoEYC Jun 10, 2024
1c955b6
feat: TXMNG Addition of domain layer classes of transaction object
MarcoEYC Jun 10, 2024
7b2a528
feat: TXMNG Addition of application layer classes for use cases for e…
MarcoEYC Jun 10, 2024
c2d628a
feat: TXMNG Modification in application properties of service and add…
MarcoEYC Jun 10, 2024
bf2a76b
feat: TXMNG Addition of input adapter and port layers to support inco…
MarcoEYC Jun 10, 2024
08ee2a9
feat: TXMNG Addition of output adapter and port layers to support out…
MarcoEYC Jun 10, 2024
3f9510f
feat: TXMNG Addition of utils classes for mapping and conversion
MarcoEYC Jun 10, 2024
88a2f9a
feat: TXMNG Modification In main application class and maven dependen…
MarcoEYC Jun 10, 2024
b3826c1
feat: AFVAL Modification In main application class and maven dependen…
MarcoEYC Jun 10, 2024
2062a99
feat: AFVAL Addition of model event layer by adding classes for recei…
MarcoEYC Jun 10, 2024
3bf885a
feat: AFVAL Addition of config layer for kafka event broker configura…
MarcoEYC Jun 10, 2024
c9c0e5a
feat: AFVAL Addition of service layer for business logic
MarcoEYC Jun 10, 2024
6e610d0
feat: AFVAL Addition of utils class and input listener handler
MarcoEYC Jun 10, 2024
08a4e6e
feat: AFVAL Modification in application.properties from service
MarcoEYC Jun 10, 2024
9e55fbc
refactor: AFVAL Addition of common constants util and modification in…
MarcoEYC Jun 10, 2024
00d4709
refactor: AFVAL Refactor in code based on SonarLint analysis
MarcoEYC Jun 10, 2024
6bbf7f5
refactor: TXMNG Refactor in code based on SonarLint analysis
MarcoEYC Jun 10, 2024
27b05ca
refactor: TXMNG Refactor in code based on SonarLint analysis
MarcoEYC Jun 10, 2024
1832869
feat: TXMNG Addition of Exception global handler and input validation
MarcoEYC Jun 10, 2024
ed8b348
refactor: TXMNG Addition of ConstantsUtils class and refactor in code
MarcoEYC Jun 10, 2024
4869bed
refactor: AFVAL Modification in ConstantsUtils class and refactor in …
MarcoEYC Jun 10, 2024
a358f6d
feat: TXMNG Addition of validation when transaction is not found in db
MarcoEYC Jun 10, 2024
f131764
test: AFVAL Addition of tests to improve code coverage (100% Classes,…
MarcoEYC Jun 11, 2024
bedc2a1
test: TXMNG Addition of tests to improve code coverage (100% Classes,…
MarcoEYC Jun 11, 2024
d0000ca
doc: TXMNG AFVAL Addition of general solution diagram and diagrams fo…
MarcoEYC Jun 11, 2024
92ff4c5
doc: TXMNG AFVAL Addition of README doc for both services
MarcoEYC Jun 11, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/.idea/
33 changes: 33 additions & 0 deletions antifraud-validation-service/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
HELP.md
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/

### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache

### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
!**/src/main/**/build/
!**/src/test/**/build/

### VS Code ###
.vscode/
18 changes: 18 additions & 0 deletions antifraud-validation-service/.mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
wrapperVersion=3.3.1
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.6/apache-maven-3.9.6-bin.zip
32 changes: 32 additions & 0 deletions antifraud-validation-service/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Anti-Fraud Validation Service (AFVAL)

## Description

The Anti-Fraud Validation Service (AFVAL) is a microservice that evaluates the potential fraud level in newly created financial transactions. If the transaction amount exceeds 1000 (considered an anomalous case), the transaction is dismissed and automatically rejected.

## Tech Details
This project utilizes several technologies and design patterns to achieve its objectives:

- **EDA**: The service employs Event-Driven Architecture (EDA) to handle the transaction validation process. The service listens to events from the transaction management service and processes them accordingly.
- **Debezium**: Debezium, used with Kafka, captures when a transaction is created and propagates it to the anti-fraud validation service in real-time.
- **Kafka**: Kafka is used for event-driven architecture. The service produces events to notify the transaction management service about the transaction status.

## Requisites and Pre-configurations
Before running the Anti-Fraud Validation Service, you need to ensure that the necessary services and configurations are set up. If not, follow these steps:
1. **Start the Docker Services**: The application requires several services to run, which are defined in the `docker-compose.yml` file. To start these services, navigate to the directory containing the `docker-compose.yml` file and run the following command:
```bash
docker-compose up
```
2. **Configure Debezium**: After starting the docker services, debezium must be configured, this configuration is done by requesting the debezium connector to the Kafka Connect API. To do this, you can use the following command:
```bash
./init-debezium.sh
```
3. **Start the Anti-Fraud Validation Service**: With the services running and Debezium configured, you can start the Anti-Fraud Validation Service in spring boot.
## Usage
The service does not provide a direct API for external access. It listens to events from the transaction management service and processes them accordingly, then it produces events to notify the transaction management service about the transaction status.

# Diagram
![anti-fraud-validation-service](diagrams/antifraud_validation_path_diagram.png)

# Glossary
**AFVAL**: Anti Fraud Validation Service feature code
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
250 changes: 250 additions & 0 deletions antifraud-validation-service/mvnw

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading