Validate Statistics Against Bufdir Alignment Requirements
The Bufdir alignment validator component must analyze the aggregated statistics for the coordinator's chapter against configurable Bufdir reporting rules (minimum activity counts per category, participant deduplication requirements, geographic distribution if applicable). It should surface a summary banner or a dedicated section on the stats screen showing: overall alignment status (green/amber/red), which categories are below threshold, and an estimated shortfall count. The validator must use the same data pipeline as the Bufdir export to ensure consistency between the stats view and the eventual export. This feature is particularly important for NHF (1,400 local chapters), HLF (detailed refund tracking), and Blindeforbundet (office honorarium thresholds).
User Story
Acceptance Criteria
- Given the coordinator views the statistics screen with 'This Year' selected, When the Bufdir alignment section renders, Then it shows an overall status indicator (on track / at risk / below threshold)
- Given one or more activity categories are below the Bufdir minimum threshold, When the alignment section renders, Then each shortfall category is listed with the current count and the required minimum
- Given the coordinator taps a shortfall category, When navigation fires, Then they are taken to the peer mentor stats list filtered to that activity type so they can identify who to follow up with
- Given the chapter meets all Bufdir thresholds, When the alignment section renders, Then a positive confirmation message is displayed
- Given the Bufdir rules configuration changes (e.g., updated grant requirements), When the validator runs, Then it uses the latest rules from the bufdir-alignment-validator config without requiring an app update
Business Value
All four organizations (NHF, Blindeforbundet, HLF, Barnekreftforeningen) depend on Bufdir grants. A missed threshold or miscategorized activity type can result in reduced grant amounts. By surfacing alignment gaps directly in the statistics dashboard — weeks before the submission deadline — coordinators can proactively address shortfalls through targeted follow-up, preventing the costly last-minute scrambles and grant reductions that currently occur under manual reporting processes.
Components
- Bufdir Alignment Validator service
- Coordinator Statistics Service service
- Stats Repository data
- Coordinator Statistics BLoC infrastructure
- Chapter Scope Resolver service
- Supabase Stats Database Views infrastructure
- Stats Data Models data
- Bufdir Aggregation Service service
- Aggregation Query Builder data
- Multi-Organization Data Isolator data
Dependencies
- View Team Activity Summary Cards critical
- Filter Statistics by Time Window critical
- View Per-Peer-Mentor Activity Breakdown List critical