Service Layer high complexity backend
1
Dependencies
0
Dependents
5
Entities
0
Integrations

Description

Internal service layer responsible for running the SQL aggregation queries that transform raw activity and contact records into the structured counts and summaries Bufdir requires. Designed to be swapped when the final simplified Bufdir format is confirmed through Norse Digital Products' dialogue with Bufdir.

Feature: Bufdir Report Generation

report-data-aggregator

Responsibilities

  • Execute period-scoped, org-scoped aggregation queries against activities and contacts tables
  • Map internal activity types to Bufdir reporting categories
  • Compute totals for peer mentor hours, contact interactions, and event participation
  • Support format versioning to accommodate changes from Bufdir dialogue

Interfaces

aggregateActivityData(orgId: string, from: Date, to: Date): Promise<ActivityAggregate>
aggregateContactData(orgId: string, from: Date, to: Date): Promise<ContactAggregate>
mapToBufdirFormat(aggregate: ActivityAggregate): BufdirStructuredData

Relationships

Dependencies (1)

Components this component depends on