refactor: stricter domain: server-directory
This commit is contained in:
@@ -14,15 +14,23 @@ server-directory/
|
||||
│ └── server-endpoint-state.service.ts Signal-based endpoint list, reconciliation with defaults, localStorage persistence
|
||||
│
|
||||
├── domain/
|
||||
│ ├── server-directory.models.ts ServerEndpoint, ServerInfo, ServerJoinAccessResponse, invite/ban/kick types
|
||||
│ ├── server-directory.constants.ts CLIENT_UPDATE_REQUIRED_MESSAGE
|
||||
│ └── server-endpoint-defaults.ts Default endpoint templates, URL sanitisation, reconciliation helpers
|
||||
│ ├── constants/
|
||||
│ │ └── server-directory.constants.ts CLIENT_UPDATE_REQUIRED_MESSAGE
|
||||
│ ├── logic/
|
||||
│ │ ├── room-signal-source.logic.ts Room → signal-source selector resolution
|
||||
│ │ ├── room-signal-source.logic.spec.ts Unit tests
|
||||
│ │ └── server-endpoint-defaults.logic.ts Default endpoint templates, URL sanitisation, reconciliation helpers
|
||||
│ └── models/
|
||||
│ └── server-directory.model.ts ServerEndpoint, ServerInfo, ServerJoinAccessResponse, invite/ban/kick types
|
||||
│
|
||||
├── infrastructure/
|
||||
│ ├── server-directory-api.service.ts HTTP client for all server API calls
|
||||
│ ├── server-endpoint-health.service.ts Health probe (GET /api/health with 5 s timeout, fallback to /api/servers)
|
||||
│ ├── server-endpoint-compatibility.service.ts Semantic version comparison for client/server compatibility
|
||||
│ └── server-endpoint-storage.service.ts localStorage read/write for endpoint list and removed-default tracking
|
||||
│ ├── constants/
|
||||
│ │ └── server-directory.infrastructure.constants.ts Health-check timeout, localStorage keys
|
||||
│ └── services/
|
||||
│ ├── server-directory-api.service.ts HTTP client for all server API calls
|
||||
│ ├── server-endpoint-compatibility.service.ts Semantic version comparison for client/server compatibility
|
||||
│ ├── server-endpoint-health.service.ts Health probe (GET /api/health with 5 s timeout, fallback to /api/servers)
|
||||
│ └── server-endpoint-storage.service.ts localStorage read/write for endpoint list and removed-default tracking
|
||||
│
|
||||
├── feature/
|
||||
│ ├── invite/ Invite creation and resolution UI
|
||||
@@ -45,8 +53,8 @@ graph TD
|
||||
Health[ServerEndpointHealthService]
|
||||
Compat[ServerEndpointCompatibilityService]
|
||||
Storage[ServerEndpointStorageService]
|
||||
Defaults[server-endpoint-defaults]
|
||||
Models[server-directory.models]
|
||||
Defaults[server-endpoint-defaults.logic]
|
||||
Models[server-directory.model]
|
||||
|
||||
Facade --> Service
|
||||
Service --> API
|
||||
@@ -61,12 +69,12 @@ graph TD
|
||||
click Facade "application/facades/server-directory.facade.ts" "Thin domain boundary" _blank
|
||||
click Service "application/services/server-directory.service.ts" "Orchestrator" _blank
|
||||
click State "application/services/server-endpoint-state.service.ts" "Signal-based endpoint state" _blank
|
||||
click API "infrastructure/server-directory-api.service.ts" "HTTP client for server API" _blank
|
||||
click Health "infrastructure/server-endpoint-health.service.ts" "Health probe" _blank
|
||||
click Compat "infrastructure/server-endpoint-compatibility.service.ts" "Version compatibility" _blank
|
||||
click Storage "infrastructure/server-endpoint-storage.service.ts" "localStorage persistence" _blank
|
||||
click Defaults "domain/server-endpoint-defaults.ts" "Default endpoint templates" _blank
|
||||
click Models "domain/server-directory.models.ts" "Domain types" _blank
|
||||
click API "infrastructure/services/server-directory-api.service.ts" "HTTP client for server API" _blank
|
||||
click Health "infrastructure/services/server-endpoint-health.service.ts" "Health probe" _blank
|
||||
click Compat "infrastructure/services/server-endpoint-compatibility.service.ts" "Version compatibility" _blank
|
||||
click Storage "infrastructure/services/server-endpoint-storage.service.ts" "localStorage persistence" _blank
|
||||
click Defaults "domain/logic/server-endpoint-defaults.logic.ts" "Default endpoint templates" _blank
|
||||
click Models "domain/models/server-directory.model.ts" "Domain types" _blank
|
||||
```
|
||||
|
||||
## Endpoint lifecycle
|
||||
|
||||
Reference in New Issue
Block a user