Skip to content

Commit 6b14f11

Browse files
committed
yaperos codechallenge java
1 parent 51dc1c1 commit 6b14f11

File tree

103 files changed

+3630
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+3630
-0
lines changed

.gitignore

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
HELP.md
2+
target/
3+
!.mvn/wrapper/maven-wrapper.jar
4+
!**/src/main/**/target/
5+
!**/src/test/**/target/
6+
7+
### STS ###
8+
.apt_generated
9+
.classpath
10+
.factorypath
11+
.project
12+
.settings
13+
.springBeans
14+
.sts4-cache
15+
16+
### IntelliJ IDEA ###
17+
.idea
18+
*.iws
19+
*.iml
20+
*.ipr
21+
22+
### NetBeans ###
23+
/nbproject/private/
24+
/nbbuild/
25+
/dist/
26+
/nbdist/
27+
/.nb-gradle/
28+
build/
29+
!**/src/main/**/build/
30+
!**/src/test/**/build/
31+
32+
### VS Code ###
33+
.vscode/

microservices/.gitignore

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
target/
2+
!.mvn/wrapper/maven-wrapper.jar
3+
!**/src/main/**/target/
4+
!**/src/test/**/target/
5+
6+
### STS ###
7+
.apt_generated
8+
.classpath
9+
.factorypath
10+
.project
11+
.settings
12+
.springBeans
13+
.sts4-cache
14+
15+
### IntelliJ IDEA ###
16+
.idea
17+
*.iws
18+
*.iml
19+
*.ipr
20+
21+
### NetBeans ###
22+
/nbproject/private/
23+
/nbbuild/
24+
/dist/
25+
/nbdist/
26+
/.nb-gradle/
27+
build/
28+
!**/src/main/**/build/
29+
!**/src/test/**/build/
30+
31+
### VS Code ###
32+
.vscode/

microservices/Readme.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Getting Started
2+
3+
Cada microservicio se ha construido siguiendo el patrón de diseño "Arquitectura Hexagonal"
4+
5+
### Microservicios
6+
7+
* **transaction-bff:** Backend for FrontEnd, usando GraphQL.
8+
* **transaction-ms:** Creación, actualización y consulta de transacciones.
9+
* Envía peticiones asíncronas hacia el microservicio antifraud-ms(Evaluación de la transacción), mediante Apache Kafka
10+
* Recibe peticiones asíncronas con el estado final de la transacción, mediante Apache Kafka
11+
* **antifraud-ms:** Analiza la transacción recibida y setea el correcto estado de la ella.
12+
13+
### Instalación
14+
15+
Seguir los siguientes pasos.
16+
17+
1. Situarse en el file \app-java-codechallenge\docker-compose.yml y ejectuar: docker compose up
18+
2. Crear Base de datos: yapebd
19+
3. Ejecutar el siguiente script sql: app-java-codechallenge\script-bd **script-create_table.sql**
20+
3. Crear los siguientes tópicos:
21+
* kafka-console-producer --broker-list localhost:9092 --topic **topic-transaction-update**
22+
* kafka-console-producer --broker-list localhost:9092 --topic **topic-antifraud-review**
23+
4. Ejecutar los microservicios:
24+
* transaction-ms
25+
* antifraud-ms
26+
* transaction-bff
27+
5. Abrir navegador y escribir: http://localhost:8090/graphiql?path=/graphql
28+
6. Existen dos llamados de recursos:
29+
* **(Mutation) register**: Proceso de registro y evaluación de transacciones
30+
* **(Query) getTransactionByCode**: Busca el transaction según el code
31+
* **(Query) getAllTransactions**: Consigue todas las transacciones
32+
7. En el PR se adjuntan pantallas de peticiones y resultados esperados
33+
34+
35+
36+
37+
38+

microservices/antifraud-ms/.gitignore

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
HELP.md
2+
target/
3+
!.mvn/wrapper/maven-wrapper.jar
4+
!**/src/main/**/target/
5+
!**/src/test/**/target/
6+
7+
### STS ###
8+
.apt_generated
9+
.classpath
10+
.factorypath
11+
.project
12+
.settings
13+
.springBeans
14+
.sts4-cache
15+
16+
### IntelliJ IDEA ###
17+
.idea
18+
*.iws
19+
*.iml
20+
*.ipr
21+
22+
### NetBeans ###
23+
/nbproject/private/
24+
/nbbuild/
25+
/dist/
26+
/nbdist/
27+
/.nb-gradle/
28+
build/
29+
!**/src/main/**/build/
30+
!**/src/test/**/build/
31+
32+
### VS Code ###
33+
.vscode/
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# https://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
wrapperVersion=3.3.1
18+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.6/apache-maven-3.9.6-bin.zip

0 commit comments

Comments
 (0)