Member-only story

Are aggregates different on the frontend from the backend on the Hexagonal architecture — DDD question?

Kong To
2 min read6 days ago

I came to discuss with one of my colleague today about this topic as he is refactoring the frontend using the Atomic Hexagonal Architecture.

Domain model

Let’s take this subscription flow as an example for the discussion.

👉 Subscription flow

1️⃣ A user clicks on a button
2️⃣ He must consent to share his KYC
3️⃣ The KYC is sent
4️⃣ He starts the subscription journey
5️⃣ He inputs up to date information
6️⃣ He confirms the information is accurate
7️⃣ He initiate the identity validation with OTP
8️⃣ He inputs the OTP
9️⃣ Subscription is confirmed

Aggregates

There are 3 aggregates (no absolute boundary, it’s matter of sense) in the bounded context :

✴️ Consent (tiny one)
✴️ KYC (big one)
✴️ Subscription (main one)

The subscription is the main use case here, as it is the entry point. When the user clicks on the confirm button, there are 3 calls to the backend.

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Kong To
Kong To

Written by Kong To

Architect, Engineer, Developer, Code, Code Crafter... whatever but code quality matters

No responses yet

Write a response