Service Layer high complexity backend
3
Dependencies
2
Dependents
7
Entities
0
Integrations

Description

Backend service that aggregates activity, contact, and organizational data from PostgreSQL into the Bufdir-required report structure for a given organization and reporting period. Enforces multi-tenancy so report data is strictly scoped per organization.

Feature: Bufdir Report Generation

report-generator-service

Responsibilities

  • Query all registered activities and contact interactions within the reporting period and organization scope
  • Aggregate totals by activity type, contact category, and organizational unit per Bufdir requirements
  • Validate completeness of aggregated data and surface warnings for missing mandatory fields
  • Persist generated report snapshot to bufdir_reports table
  • Return structured report payload to caller for preview or export

Interfaces

generateReport(organizationId: string, periodId: string): Promise<BufdirReport>
previewReport(organizationId: string, periodId: string): Promise<BufdirReportPreview>
validateReportData(report: BufdirReport): ValidationResult
getReportStatus(reportId: string): Promise<ReportStatus>

Relationships

Dependencies (3)

Components this component depends on

Dependents (2)

Components that depend on this component