Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solution to Yape code challenge - Leandro Pavez #437

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

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.

1 participant