Life ConnectLife Connect
Wiki index
Architecture
Services
Concepts
Runbooks
Infra
Swagger Docs
GitHub
Wiki index
Architecture
Services
Concepts
Runbooks
Infra
Swagger Docs
GitHub
  • Backend (Java / Spring Boot)

    • adb
    • adb-persons
    • adb-parts
    • adb-contracts
    • adb-accounting
    • adb-files
    • adb-utilities
    • adb-aggregates
    • adb-views
    • adb-reports
  • Frontend

    • adb-ui
    • adb-web
  • Infrastructure & tooling

    • adb-charts
    • adb-infrastructure
    • adb-tests-artillery
    • adb-doc
  • External services (out-of-monorepo)

    • adb-tickets
    • adb-notes
    • adb-graph
Last updated 2026-06-01

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

ItemValue
Spring Boot3.1.3
Java18
Port8085
DatabaseMongoDB Atlas — database adb-parts
AuthKeycloak (resource server)
Reactive stackSpring WebFlux + Reactive MongoDB
Version0.30.0-SNAPSHOT
Main classfr.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

ControllerBase pathRole
PartController/partsPart CRUD (hierarchy)
AssetController/parts/assetsFinancial assets
BudgetController/parts/budgetsBudgets and budget lines
ChargeController/parts/chargesRecoverable / non-recoverable charges
SaleController/parts/salesPart sales
TicketsPartController/parts/tickets/{ticketId}/parts/{partId}Part detail slices scoped to a ticket (LCS-6441)
ObjectIdController–MongoDB ID generation
ErrorDebugController/parts/errorsDebug

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-pathReturns
/commonCommonInformation — name, reference, type
/addressesAddressInformation
/surfaceSurfaceInformation
/descriptionDescriptionInformation
/nticNticInformation
/flatFlatTypeInformation
/categoryCategoryInformation
/otherPartOtherPartInformation
/privateEquipmentPrivateEquipmentInformation
/collectiveEquipmentCollectiveEquipmentInformation
/equipmentSet<Equipment>
/generalSharesGeneralSharesInformation
/unitCompositionUnitCompositionInformation
/unitMaintenanceUnitMaintenanceInformation
/buildingDetailsBuildingDetails
/rentDetailsRentDetails
/trusteeTrusteeInformation

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 a parts document is written
  • onChargeModified — fired when a charges document is written
  • onMarketPerformanceModified — 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

VariableRole
MONGO_DB_URIMongoDB connection string
SECURITY_ISSUER_URIKeycloak issuer
SECURITY_TOKEN_URIToken endpoint
CLIENT_ID / CLIENT_SECRETService 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.

Links

  • Code: adb-parts/
  • Application: adb-parts/src/main/java/fr/lifeconnect/adb/part/AdbPartApplication.java
Edit this page
Last Updated:
Contributors: Yevhenii Khudolii
Prev
adb-persons
Next
adb-contracts