-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patharchitecture.puml
More file actions
81 lines (63 loc) · 2.33 KB
/
Copy patharchitecture.puml
File metadata and controls
81 lines (63 loc) · 2.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
@startuml GeoLocateAPI_Architecture
title <b>GeoLocateAPI – Clean + Hexagonal Architecture (2025)</b>
skinparam backgroundColor #FFFFFF
skinparam componentStyle rectangle
skinparam shadowing false
skinparam roundcorner 15
skinparam rectangle {
FontSize 14
FontColor #333333
}
'--- Layer Colors ---
!define LAYER_PRESENTATION #E3F2FD
!define LAYER_APPLICATION #E8F5E9
!define LAYER_DOMAIN #FFF8E1
!define LAYER_INFRA #F3E5F5
'--- Infra sub-sections ---
!define LAYER_CLIENTS #FCE4EC
!define LAYER_MAPPERS #FFF3E0
!define LAYER_CONFIG #EDE7F6
rectangle "<b>Presentation Layer</b>\nControllers, Validation, Error Handling" LAYER_PRESENTATION {
component GeoController
component GlobalExceptionHandler
}
rectangle "<b>Application Layer</b>\nUse Cases, Orchestration" LAYER_APPLICATION {
component GeoQueryUseCase
component GeoService
}
rectangle "<b>Domain Layer</b>\nEntities & Value Objects" LAYER_DOMAIN {
component GeoLocationData
}
rectangle "<b>Infrastructure Layer</b>" LAYER_INFRA {
rectangle "<b>Clients</b>\nExternal Providers" LAYER_CLIENTS {
component IpGeoClient
component CitySearchClient
component ReverseGeoClient
}
rectangle "<b>DTO Mapping</b>\nExternal → Internal" LAYER_MAPPERS {
component IpApiResponse
component SearchGeoResponse
component ReverseGeoResponse
}
rectangle "<b>Configuration</b>\nBeans, Timeouts, RestTemplate" LAYER_CONFIG {
component AppConfig
}
}
'--- Flow ---
[HTTP Request] --> GeoController : GET /ip/{ip}\nGET /city/{city}\nGET /coords
GeoController --> GeoQueryUseCase : validate + forward request
GeoQueryUseCase --> GeoService : execute() use-case
GeoService --> IpGeoClient : call IP provider
GeoService --> CitySearchClient : call city provider
GeoService --> ReverseGeoClient : call reverse provider
IpGeoClient --> IpApiResponse : external JSON
CitySearchClient --> SearchGeoResponse
ReverseGeoClient --> ReverseGeoResponse
IpApiResponse --> GeoLocationData : map to domain
SearchGeoResponse --> GeoLocationData
ReverseGeoResponse --> GeoLocationData
GeoService --> GeoQueryUseCase : return domain model
GeoQueryUseCase --> GeoController : transform output
GeoController --> [HTTP Response] : JSON Response
GlobalExceptionHandler -[dashed]-> GeoController : handles exceptions
@enduml