View aggregated participant and activity counts per Bufdir section
The bufdir-preview-service queries the bufdir-aggregation-service and bufdir-metrics-repository to retrieve pre-computed aggregations for the selected period. The preview screen renders these under each Bufdir section header via the bufdir-report-section-widget. Key metrics include: total registered activities, unique peer mentors active, unique participants reached, hours of support provided, activity breakdown by Bufdir category, and geographic distribution by municipality/county. The participant-deduplication-service ensures that participants who appear in multiple activities are counted only once in the unique participant total, which is a Bufdir reporting requirement.
User Story
Acceptance Criteria
- Given I open the Bufdir preview for a selected period, When the preview loads, Then I see total activity count, unique peer mentor count, unique participant count, and total support hours at the top of the report
- Given participant deduplication is applied, When a participant appears in 5 different activities, Then they are counted as 1 unique participant in the Bufdir summary, not 5
- Given the geographic distribution section, When I view it in the preview, Then participant counts are broken down by county/municipality in a format that matches Bufdir's geographic reporting requirements
- Given large organizations with multiple chapters, When the preview aggregates data, Then data is correctly isolated per reporting organization unit using the org-data-isolation-guard
- Given the aggregation is computing, When the preview screen first opens, Then an aggregation-progress-indicator shows progress rather than a blank screen, with a completion time estimate
- Given aggregation completes successfully, When I view the totals, Then a timestamp shows when the aggregation was last computed so I know if the data reflects very recent activity registrations
Business Value
Accurate aggregated counts are the core substance of the Bufdir report. Errors in unique participant counting or geographic attribution are among the most common reasons for report amendment requests from Bufdir. Showing coordinators these aggregations before submission — including the deduplication logic — builds trust in the system and ensures that submitted numbers are defensible during any Bufdir audit or review.
Components
- Bufdir Preview Service service
- Bufdir Aggregation Service service
- Bufdir Metrics Repository data
- Participant Deduplication Service service
- Geographic Distribution Service service
- Aggregation Summary Widget ui
- Aggregation Progress Indicator ui
- Multi-Organization Data Isolator data
- Supabase Aggregation RPC Functions infrastructure
- Bufdir Report Section Widget ui
- Bufdir Preview Repository data