adb-parts
AI-generated content
This document was generated by an AI assistant. Verify accuracy before relying on the details.
Role
Service that manages real-estate assets (parts). A part is the platform's base unit: it can be a building, a floor, an apartment, a condominium lot, a parking spot, a commercial space, etc. The service handles:
- the hierarchy of parts (a building contains floors that contain lots),
- the physical characteristics (surface area, equipment, charges),
- the associated financial assets (value, indices),
- the budgets and allocation keys,
- sales.
Tech stack
| Item | Value |
|---|---|
| Spring Boot | 3.1.3 |
| Java | 18 |
| Port | 8085 |
| Database | MongoDB Atlas — database adb-parts |
| Auth | Keycloak (resource server) |
| Reactive stack | Spring WebFlux + Reactive MongoDB |
| Version | 0.30.0-SNAPSHOT |
| Main class | fr.lifeconnect.adb.part.AdbPartApplication |
Depends on: adb-common, adb-model, adb-messaging, adb-actions, adb-action-logs.
Internal architecture
flowchart TB
subgraph Controllers
PaC[PartController]
AC[AssetController]
BC[BudgetController]
CC[ChargeController]
SC[SaleController]
TPC[TicketsPartController]
OIC[ObjectIdController]
end
subgraph Services
PS[PartService]
AS[AssetService]
BS[BudgetService]
CS[ChargeService]
SS[SaleService]
end
subgraph External
Mongo[(adb-parts<br/>Mongo)]
AtlasTrigger[Atlas Trigger]
EB[EventBridge]
SQS[SQS queues]
Persons[adb-persons]
Contracts[adb-contracts]
Utilities[adb-utilities]
end
PaC --> PS
AC --> AS
BC --> BS
CC --> CS
SC --> SS
PS --> Mongo
AS --> Mongo
BS --> Mongo
CS --> Mongo
SS --> Mongo
PS -.HTTP.-> Persons
SS -.HTTP.-> Contracts
BS -.HTTP.-> Utilities
Mongo -.entity change.-> AtlasTrigger
AtlasTrigger -.-> EB
EB -.-> SQS
Endpoints
| Controller | Base path | Role |
|---|---|---|
PartController | /parts | Part CRUD (hierarchy) |
AssetController | /parts/assets | Financial assets |
BudgetController | /parts/budgets | Budgets and budget lines |
ChargeController | /parts/charges | Recoverable / non-recoverable charges |
SaleController | /parts/sales | Part sales |
TicketsPartController | /parts/tickets/{ticketId}/parts/{partId} | Part detail slices scoped to a ticket (LCS-6441) |
ObjectIdController | – | MongoDB ID generation |
ErrorDebugController | /parts/errors | Debug |
TicketsPartController — tickets-parts feature (LCS-6441)
Exposes read-only detail views of a single part in the context of a ticket. The ticketType query parameter scopes the request to one of incidents, works, litigations, sales, or tenant-searches.
| Sub-path | Returns |
|---|---|
/common | CommonInformation — name, reference, type |
/addresses | AddressInformation |
/surface | SurfaceInformation |
/description | DescriptionInformation |
/ntic | NticInformation |
/flat | FlatTypeInformation |
/category | CategoryInformation |
/otherPart | OtherPartInformation |
/privateEquipment | PrivateEquipmentInformation |
/collectiveEquipment | CollectiveEquipmentInformation |
/equipment | Set<Equipment> |
/generalShares | GeneralSharesInformation |
/unitComposition | UnitCompositionInformation |
/unitMaintenance | UnitMaintenanceInformation |
/buildingDetails | BuildingDetails |
/rentDetails | RentDetails |
/trustee | TrusteeInformation |
Data model
erDiagram
PartEntity ||--o{ PartEntity : "parent → children"
PartEntity ||--o{ AssetEntity : "associated with"
PartEntity ||--o{ ChargeEntity : "bears"
PartEntity ||--o{ BudgetLineEntity : "budgeted by"
PartEntity ||--o{ SaleEntity : "sold via"
PartEntity {
string _id
string parentId
string type "building / floor / unit / parking"
string name
number surface
object address
}
AssetEntity {
string _id
string partId
number value
date acquisitionDate
}
ChargeEntity {
string _id
string partId
number amount
string allocationKey
}
BudgetLineEntity {
string _id
string partId
number amount
string fiscalYear
}
SaleEntity {
string _id
string partId
number price
date saleDate
}
Collections: parts, assets, charges, budget_lines, sales.
Events
Emitted (MongoDB Atlas Trigger → EventBridge → SQS)
Events are not published by the Spring service directly. MongoDB Atlas triggers fire on entity changes and push notifications through AWS EventBridge, which delivers them to the relevant SQS queues:
onPartModified— fired when apartsdocument is writtenonChargeModified— fired when achargesdocument is writtenonMarketPerformanceModified— fired when a market performance document is written
Consumed
No SQS listeners — adb-parts is purely an event producer.
Dead-letter
No SNS usage — no SQS consumers means no DLQ producer.
Inter-service dependencies
flowchart LR
parts[adb-parts]
persons[adb-persons]
contracts[adb-contracts]
utilities[adb-utilities]
parts -->|GET /persons| persons
parts -->|GET /contracts/sellPart| contracts
parts -->|GET /utilities/allocationkey/key/:id| utilities
contracts2[adb-contracts] -->|GET /parts| parts
accounting[adb-accounting] -->|GET /parts| parts
aggregates[adb-aggregates] -->|GET /parts| parts
views[adb-views] -->|GET /parts| parts
Configuration / deployment
Environment variables
| Variable | Role |
|---|---|
MONGO_DB_URI | MongoDB connection string |
SECURITY_ISSUER_URI | Keycloak issuer |
SECURITY_TOKEN_URI | Token endpoint |
CLIENT_ID / CLIENT_SECRET | Service credentials |
Helm chart
Deprecated — Helm charts are no longer maintained. Infrastructure is managed via Pulumi (
infra/).
adb-charts/charts/services/templates/adb-parts.yaml. Image: lifeconnect/adb-parts.