Skip to content

Conversation

@leopavez
Copy link

The proposed solution is the development of 2 microservices: one for handling transactions (creation and update of status) and the other to validate the transaction.

Both microservices use hexagonal architecture to divide the microservice structure into layers to allow for scalability, flexibility and smooth code maintenance, and are developed using solid principles and design patterns

The transactions-ms contain unit-test to 100% coverage.

Design patterns and SOLID principles used in the solution:

  • Dependency inversion: We use interfaces for repositories and services.
  • Single Responsibility: Each class has a single responsibility.
  • Repository Pattern: To manage the persistence of entities.
  • Use Case Pattern: Encapsulates the business rules and separates the logic from the infrastructure.
  • Strategy Pattern: It allows us to add strategies without touching the main code.

How to run services

  • docker compose up -d
  • cd /transactions-ms and npm run start:dev
  • cd /antifraud-ms and npm run start:dev

Postgre will automatically pull up the DB transactions since it was added to the docker compose.

@leopavez leopavez changed the title Solution to Yape code challenge Solution to Yape code challenge - Leandro Pavez Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants