adb-views
AI-generated content
This document was generated by an AI assistant. Verify accuracy before relying on the details.
Role
Service for dashboards and consolidated views. Unlike adb-aggregates, which aggregates on the fly via HTTP, adb-views maintains denormalized projections in its own MongoDB database, fed continuously by SQS events from every service. This lets it serve dashboards quickly without cascading calls.
It is the platform's largest event consumer: 8 SQS listeners constantly watch for changes to parts, contracts, accounting, files, charges, market performances, and tickets.
It also produces property PDFs (via iText + FreeMarker) and exposes advanced filtering endpoints.
Tech stack
| Item | Value |
|---|---|
| Spring Boot | 3.1.3 |
| Java | 18 |
| Port | 8092 |
| Database | MongoDB Atlas — database adb-views |
| Auth | Keycloak (resource server) |
| Reactive stack | Spring WebFlux + Reactive MongoDB |
| iTextPDF v2.1.6 + FreeMarker | |
| Storage | AWS S3 (BUCKET_TEMPLATES) |
| Blocking detection | BlockHound (enabled by default) |
| Version | 0.32.0-SNAPSHOT |
Internal architecture
flowchart TB
subgraph Controllers
VIC[ViewInfoController]
PVC[PropertiesViewController]
MPVC[MarketPerformanceViewController]
FC[FilterController]
AVC[AccountingViewController]
end
subgraph Listeners["8 SQS Listeners<br/>(MessagingFunctions)"]
L1[ticketModified]
L2[ticketEventModified]
L3[partModified]
L4[contractModified]
L5[accountingEventModified]
L6[fileMetaDataModified]
L7[chargeModified]
L8[marketPerformanceModified]
end
subgraph Services
VS[ViewService]
PS[ProjectionService]
PDF[PDFService]
end
Mongo[(adb-views<br/>denormalized projections)]
S3[(S3 templates)]
External[adb-files,<br/>adb-persons,<br/>adb-parts,<br/>adb-contracts]
Controllers --> VS
VS --> Mongo
Listeners --> PS
PS --> Mongo
PS -.cross-service call<br/>to enrich.-> External
PDF --> S3
Controllers --> PDF
Endpoints
| Controller | Path | Role |
|---|---|---|
PropertiesViewController | /view/properties | Properties dashboard view |
MarketPerformanceViewController | /view/properties/{partId}/market-performances | Market performance per part |
FilterController | /view/filter | Advanced filters (parts, owners, contracts) |
AccountingViewController | /view/accounting | Accounting views |
ViewInfoController | /view/info | Module info |
Note: the gateway exposes these endpoints under
/view/*(singular).
Data model
erDiagram
PartEntity {
string _id
object denormalized "copies from adb-parts"
}
ContractPartEntry {
string _id
string contractId
string partId
object denormalized
}
AccountingEventEntity {
string _id
date timestamp
object denormalized
}
Collections: parts, contracts_entries, accounting_event (all projections of data sourced from other services).
Events
Emitted (SNS)
No events emitted.
Consumed (8 SQS Listeners)
| Queue | Source |
|---|---|
${VIEWS_TICKET_MODIFIED_QUEUE} | adb-tickets |
${VIEWS_TICKET_EVENT_MODIFIED_QUEUE} | adb-tickets |
${VIEWS_PART_MODIFIED_QUEUE} | adb-parts |
${VIEWS_CONTRACT_MODIFIED_QUEUE} | adb-contracts |
${VIEWS_ACCOUNTING_EVENT_MODIFIED_QUEUE} | adb-accounting |
${VIEWS_FILE_METADATA_MODIFIED_QUEUE} | adb-files |
${VIEWS_CHARGE_MODIFIED_QUEUE} | adb-parts |
${VIEWS_MARKET_PERFORMANCE_MODIFIED_QUEUE} | adb-parts |
DLQ: ${VIEWS_DLQ_TOPIC}.
Inter-service dependencies
flowchart LR
views[adb-views]
files[adb-files]
persons[adb-persons]
parts[adb-parts]
contracts[adb-contracts]
views -->|GET /files/metadata/diagnostics| files
views -->|GET /persons| persons
views -->|GET /parts| parts
views -->|GET /contracts| contracts
ui[adb-ui] -->|GET /view/...| views
web[adb-web/bff] --> views
Configuration / deployment
Key environment variables
| Variable | Role |
|---|---|
MONGO_DB_URI | MongoDB connection string |
SECURITY_ISSUER_URI / SECURITY_TOKEN_URI | Keycloak |
CLIENT_ID / CLIENT_SECRET | OAuth2 |
AWS_REGION / AWS_ACCESS_KEY / AWS_SECRET_KEY | AWS |
BUCKET_TEMPLATES | S3 templates bucket |
VIEWS_*_QUEUE | URLs of the 8 SQS queues |
VIEWS_DLQ_TOPIC | DLQ |
BLOCKHOUND_ENABLED | Blocking-code detection (default: true) |
state-machine.pool.size | 1000 |
Helm chart
adb-charts/charts/services/templates/adb-views.yaml. Image: lifeconnect/adb-views.
Links
- Code:
adb-views/