Run Bufdir Activity Aggregation with Progress Feedback
Once a period is confirmed, the coordinator initiates aggregation. The aggregation service fetches all activity records within the period, maps them to Bufdir categories, deduplicates participants across sessions and chapters, applies geographic distribution logic, and computes summary metrics. A progress indicator widget keeps the coordinator informed about which stage is running. On completion, an aggregation summary widget displays the final tallies before the coordinator moves to preview.
User Story
Acceptance Criteria
- Given the coordinator initiates aggregation, when the process starts, then an aggregation progress indicator appears showing the current stage (fetching, categorising, deduplicating, distributing)
- Given aggregation is running, when a stage completes, then the progress indicator advances and labels the next stage
- Given aggregation completes successfully, when all stages finish, then an aggregation summary widget shows total activities, unique participants, category breakdown, and geographic distribution
- Given aggregation fails at any stage, when an error occurs, then a descriptive error message is shown with an option to retry or cancel
- Given the coordinator taps the summary, when the summary is displayed, then all figures match the source records in the database within the selected period
Business Value
Bufdir reporting is a mandatory compliance task for all funded organisations. Automating the aggregation eliminates hours of manual Excel work per reporting cycle and removes human calculation errors that have historically caused grant disputes. Real-time progress feedback reduces coordinator anxiety and increases trust in the digital reporting process.
Components
- Aggregation Summary Widget ui
- Aggregation Progress Indicator ui
- Bufdir Aggregation Service service
- Participant Deduplication Service service
- Reporting Period Service service
- Geographic Distribution Service service
- Bufdir Metrics Repository data
- Aggregation Query Builder data
- Multi-Organization Data Isolator data
- Supabase Aggregation RPC Functions infrastructure
- Activity Category Mapping Configuration infrastructure