0

I'm currently trying to implement a simple Hexagonal Architecture (in Java but it shouldn't matter for my question).

I made 3 modules at this moment : A "domain" module and 2 "adapters" modules (for Mongo and Stripe adapters).

In my MongoDB, I'm extending Stripe's account by adding some domain related datas.

The Stripe adapter is just sending request to the Stripe API.

In my domain I'd like to have an AccountEntity that should have both Stripe information and DB information about the account.

So my main question is : Where should I do this merge, because adapters doesn't know each other and the domain doesn't know any of the adapters ?

I also have a side question : Is it worth to have a Stripe adapter out of my domain ? knowing that my domain is "Stripe-coupled". I feel like it's not necessary and adding a lot of boilerplatecode to remap StripeEntities to domainEntities.

Thank you in advance for your time and responses :)

0 Answers0