Appearance
Document + Reporting Cross-Cutting Collaborators
Purpose of this page
This page is the compact companion to:
It shows the main collaborator clusters instead of narrating the full boundary.
Collaborator cluster A: document application boundary
Anchor files
NGB.Application.Abstractions/Services/IDocumentService.csNGB.Runtime/Documents/DocumentService.cs
Role
The document boundary exposes:
- draft CRUD;
- posting transitions;
- derivation actions and derivation execution;
- relationship graph;
- effects surface.
This is the primary transactional/document-facing runtime service.
Collaborator cluster B: document persistence shape
Anchor files
NGB.Persistence/Documents/IDocumentRepository.csNGB.Persistence/Documents/Universal/IDocumentReader.csNGB.Persistence/Documents/Universal/IDocumentWriter.csNGB.Persistence/Documents/Universal/IDocumentPartsReader.csNGB.Persistence/Documents/Universal/IDocumentPartsWriter.cs
Role
These interfaces provide the persistence split used by DocumentService:
- common registry row in
documents; - typed head rows;
- typed part rows.
This gives the reporting side a stable document identity model without collapsing all document reads into one monolithic repository.
Collaborator cluster C: document derivation boundary
Anchor files
NGB.Runtime/Documents/Derivations/IDocumentDerivationService.csNGB.Runtime/Documents/DocumentService.cs
Role
Derivation remains in the document subsystem.
Reports can lead users toward documents and actions, but actual draft derivation is delegated through the dedicated derivation service.
Collaborator cluster D: reporting execution core
Anchor files
NGB.Runtime/Reporting/ReportEngine.csNGB.Runtime/Reporting/ReportExecutionPlanner.csNGB.Runtime/Reporting/ReportSheetBuilder.cs
Role
This cluster owns:
- report definition normalization at execution time;
- plan building;
- post-execution enrichment;
- final rendered sheet creation.
The important cross-cutting point here is ReportEngine.EnrichInteractiveFieldsAsync(...).
Collaborator cluster E: reporting runtime definition model
Anchor files
NGB.Runtime/Reporting/ReportDefinitionRuntimeModel.csNGB.Runtime/Reporting/ReportDatasetDefinition.csNGB.Runtime/Reporting/ReportDatasetFieldDefinition.cs
Role
This cluster decides what the report runtime knows about:
- selected fields;
- dataset fields and measures;
- capabilities;
- default layout;
- time-grain support;
- selectable/groupable/filterable fields.
This is where document-facing interactivity becomes structurally possible before SQL is even built.
Collaborator cluster F: PostgreSQL report execution
Anchor files
NGB.PostgreSql/Reporting/IPostgresReportDatasetSource.csNGB.PostgreSql/Reporting/PostgresReportDatasetCatalog.csNGB.PostgreSql/Reporting/PostgresReportSqlBuilder.csNGB.PostgreSql/Reporting/PostgresReportDatasetExecutor.cs
Role
This cluster handles:
- dataset-source registration;
- dataset binding resolution;
- SQL generation;
- row materialization.
The verified cross-cutting contribution is that the SQL builder appends support fields for interactive document/account displays when those fields are selected.
Cross-cutting interaction summary
Documents contribute
- document ids;
- document lifecycle;
- graph/effects explanations;
- derivation features;
- typed payload assembly.
Reporting contributes
- analytical layout;
- runtime plan;
- row rendering;
- interactive support-column handling;
- document display enrichment.
Shared bridge
The bridge is intentionally small:
- document id support fields;
- display resolution;
- action-aware sheet cells;
- separate document graph/effects endpoints.