Service Layer high complexity backend
2
Dependencies
1
Dependents
17
Entities
0
Integrations

Description

Server-side service that orchestrates the full Bufdir export pipeline: queries activity data for the selected reporting period from PostgreSQL, applies configurable field mapping rules from a JSON format specification, and produces the output file in XLSX or CSV format. The mapping layer is decoupled from the query layer so that Bufdir format changes require only configuration updates.

Feature: Bufdir Export

bufdir-export-service

Responsibilities

  • Query activity records by reporting period from PostgreSQL
  • Apply Bufdir field mapping rules from JSON configuration
  • Generate export files in XLSX and CSV formats
  • Produce preview data for the admin UI before download
  • Create audit log entries for every export action

Interfaces

generatePreview(organizationId, periodStart, periodEnd)
generateExport(organizationId, periodStart, periodEnd, format)
getExportHistory(organizationId)
getExportById(exportId)
downloadExportFile(exportId)
validateReportingPeriod(periodStart, periodEnd)
getAvailableFormats()
getFieldMappingConfig()

Relationships

Dependencies (2)

Components this component depends on

Dependents (1)

Components that depend on this component