adb-aggregates
AI-generated content
This document was generated by an AI assistant. Verify accuracy before relying on the details.
Role
Read-only service that aggregates data coming from several microservices to provide consolidated views: a contract enriched with the details of its parts/persons/files, cross-service search, aggregations by part or by person.
It owns no MongoDB collection: it is an HTTP-call orchestrator that assembles responses in memory and returns them to the caller. It is also the only service that exposes a public Maven module (adb-aggregates-model), consumed by adb-reports.
Tech stack
| Item | Value |
|---|---|
| Spring Boot | 3.1.3 |
| Java | 18 |
| Port | 8086 |
| Database | MongoDB Atlas (connected but no writes) |
| Auth | Keycloak (resource server) |
| Reactive stack | Spring WebFlux + WebClient |
| Version | 0.39.0-SNAPSHOT |
Internal Maven modules
adb-aggregates-model— aggregate DTOs. Published as a dependency consumed byadb-reportsto generate reports based on these structures.adb-aggregates-app— runnable Spring Boot application.
Internal architecture
flowchart TB
Client[Client adb-*<br/>or frontend]
subgraph adb-aggregates
SAC[SearchAggregateController]
CAC[ContractAggregateController]
PAC[PartAggregateController]
PeAC[PersonAggregateController]
TPC[TicketsPartsController]
MIC[ModuleInfoAggregateController]
AS[AggregateService]
RC[RestClientImpl<br/>WebClient wrapper]
end
Persons[adb-persons]
Parts[adb-parts]
Contracts[adb-contracts]
Files[adb-files]
Utilities[adb-utilities]
Tickets[adb-tickets<br/>external]
Client --> SAC
Client --> CAC
Client --> PAC
Client --> PeAC
SAC --> AS
CAC --> AS
PAC --> AS
PeAC --> AS
TPC --> AS
AS --> RC
RC -.GET.-> Persons
RC -.GET.-> Parts
RC -.GET.-> Contracts
RC -.GET.-> Files
RC -.GET.-> Utilities
RC -.GET.-> Tickets
Endpoints
| Controller | Path | Role |
|---|---|---|
ContractAggregateController | /aggregates/contracts | Enriched contracts |
PartAggregateController | /aggregates/parts | Enriched parts |
PersonAggregateController | /aggregates/persons | Enriched persons |
SearchAggregateController | /aggregates/search | Cross-service search |
TicketsPartsController | /aggregates/tickets/{type}/{ticketId}/parts | Parts linked to a ticket (incidents, litigations, sales, works, tenant-searches) |
ModuleInfoAggregateController | /aggregates/modules/info | Module info |
Data model
No persisted collection. The service orchestrates HTTP calls and composes DTOs in memory from the shared models (adb-aggregates-model, adb-model).
Events
None. adb-aggregates is purely synchronous and stateless.
Inter-service dependencies
flowchart LR
aggregates[adb-aggregates]
persons[adb-persons]
parts[adb-parts]
contracts[adb-contracts]
files[adb-files]
utilities[adb-utilities]
tickets[adb-tickets]
aggregates -->|GET /persons| persons
aggregates -->|GET /parts| parts
aggregates -->|GET /contracts| contracts
aggregates -->|GET /files/metadata/list| files
aggregates -->|GET /utilities| utilities
aggregates -->|GET /tickets?q=...| tickets
reports[adb-reports] -->|GET /aggregates| aggregates
Configuration / deployment
Environment variables
| Variable | Role |
|---|---|
SECURITY_ISSUER_URI / SECURITY_TOKEN_URI | Keycloak |
CLIENT_ID / CLIENT_SECRET | OAuth2 (for outgoing calls) |
Jackson configuration: dateFormat: yyyy-MM-dd HH:mm:ss, WRITE_DATES_AS_TIMESTAMPS: false.
Helm chart
adb-charts/charts/services/templates/adb-aggregates.yaml. Image: lifeconnect/adb-aggregates.
Links
- Code:
adb-aggregates/ - Model module:
adb-aggregates/adb-aggregates-model/