Service Layer high complexity backendmobile
1
Dependencies
1
Dependents
13
Entities
0
Integrations

Description

Core business logic service that aggregates registered activities, participant data, and outcome metrics from the database into the standardized Bufdir reporting format. Handles mapping from Meander's internal activity schema to Bufdir's required reporting fields, enforces multi-tenancy so each organization only sees its own data, and coordinates with the backend API for report compilation and PDF generation.

Feature: Bufdir Report Generation

bufdir-report-service

Responsibilities

  • Aggregate activity records filtered by organization, date range, and role
  • Map internal activity schema to Bufdir required reporting fields
  • Validate report completeness and flag missing or inconsistent data
  • Coordinate with backend API route for server-side report compilation
  • Enforce multi-tenancy data isolation per organization

Interfaces

generateReport(organizationId, startDate, endDate)
getReportPreview(reportId)
validateReportData(reportData)
getReportCompleteness(organizationId, period)
mapActivityToBufdirFormat(activity)
aggregateParticipantMetrics(organizationId, period)
aggregateOutcomeMetrics(organizationId, period)
getAvailableReportingPeriods(organizationId)
saveReportDraft(reportData)
finalizeReport(reportId)

Relationships

Dependencies (1)

Components this component depends on

Dependents (1)

Components that depend on this component