Skip to content

Architectural Design (Strategic Patterns)

In this project, we will use several DDD concepts to design the solution. It's worth noting that we will not use all concepts, only those necessary for the development required in this challenge.

Context Map

The context map is a DDD tool for identifying the contexts of a domain and the relationships between them. We will use this concept in a very simplified way to identify our microservices and their relationships.

Our system is one where a consultancy employee requests feedback from an external evaluator, i.e., the consultancy's client. In this case, we identified that we have both the feedback request directed to an evaluator and the feedback response directed to a request. Thus, we can already identify 4 contexts:

  • User Management
  • Authentication
  • Feedback Request
  • Feedback Response
EmployeeAuthenticationFeedback RequestFeedback ResponseUserUserUserFeedback RequestUserFeedback RequestFeedback Response    

Contextual Architecture

Let's observe the architecture of each context in its layers.

mmd

Microservices Architecture

Below, we observe the final decomposition into microservices in more detail.

External Feedbacks System[Microservices]«container»Feedback RequestService[Java - Spring Boot] Manages question creation,question approval by thePDM, and link generationfor external evaluators«container»Feedback ResponseService[Java - Spring Boot] Allows external clients toanswer the questions of therequested feedback.Validates the request'sexpiration time«container»Feedback ViewerService[Python - FastApi] Allows viewing receivedfeedbacks. Displaysanonymously to the userand non-anonymously tothe PDM«container»User Service[Java - Spring Boot] User management and loginwith JWT token«container»User Database[Postgres] Stores user data«container»Feedbacks Database[Postgres] Stores feedback andquestion data.«container»External FeedbacksFrontend[React - NextJS] Screens for managingfeedback requests,approvals, and responsesfrom external clients tointernal consultants«container»API Gateway[NodeJS Express] Single entry point thatmanages authentication,routing, and cross-cuttingconcernsusesusesusesusesSends HTTP/HTTPSrequestsValidates JWT tokenand forwardsDisplay RequestRequestsRequests to approvePDM ApproveRequestPDM Reject RequestEdit RequestValidates JWT tokenand forwardsRespond to RequestValidates JWT tokenand forwardsList ResponsesDisplay UserResponseDisplay PDMResponseValidates JWT tokenand forwardsRegister UserEdit UserLink PDM to userLogin