high complexity extracted Activity Registration & Reporting Confidence: 100%
17
Components
198
Shared
16
User Stories
Yes
Analyzed

Description

A one-tap export that compiles all activity data for a reporting period into the format required by Bufdir (Norwegian Directorate for Children, Youth and Family Affairs). The export aggregates across all peer mentors in the organisation for the selected period, maps internal activity types to Bufdir categories, and produces output in whatever format Bufdir accepts — currently expected to be a structured document or API submission once Norse Digital Products completes negotiations with Bufdir. The feature must handle the organisational hierarchy correctly: NHF has 12 national associations, 9 regions, and 1 400 local chapters, each of which may need to report separately or roll up. The export UI should let the user select the reporting scope (local chapter, region, national) and period, preview a summary of what will be included, and confirm before generating. A PDF or CSV download serves as the fallback before any Bufdir API is available.

Analysis

Business Value

Directly replaces the most time-consuming administrative task for all four organisations. Grant funding depends on accurate and timely Bufdir submissions; errors or missed deadlines have direct financial consequences. A one-tap export also removes the main coordinator objection to adopting the app, since the reporting payoff is immediate.

Implementation Notes

Export logic runs in a Supabase Edge Function to avoid client-side memory issues with large datasets. The function accepts org_id, scope_id (chapter/region/national), and date range, and returns a structured JSON payload that the client renders as a preview before the user confirms. PDF generation via a server-side library; CSV as a simpler fallback. Bufdir API integration is a Phase 3 dependency — design the internal data model now to make the mapping straightforward later. Store each export as a record in generated_reports for audit purposes.

Components (215)

User Interface (6)

Service Layer (6)

Data Layer (3)

Infrastructure (2)

Shared Components

These components are reused across multiple features

User Interface (59)

ui Role Switch Widget medium Shared ui Role-Aware Bottom Navigation medium Shared ui Activity Type Selection Screen low Shared ui Speech-to-Text Field Overlay medium Shared ui Receipt Capture Widget medium Shared ui Peer Mentor Single Selector low Shared ui Proxy Audit Badge Widget low Shared ui Export Period Picker low Shared ui Contact Card Widget low Shared ui Contact Search Bar low Shared ui Peer Mentor Card Widget low Shared ui Activity History List low Shared ui Multi-Chapter Affiliation Chip Widget medium Shared ui Certification Status Badge low Shared ui Duplicate Activity Warning Dialog medium Shared ui Mentor Multi-Select Widget medium Shared ui Map Filter Panel medium Shared ui Claim Status Badge low Shared ui Export Date Range Picker low Shared ui Custom Date Range Picker low Shared ui Duplicate Activity Warning Dialog low Shared ui Proxy Activity Form medium Shared ui Proxy Peer Mentor Selector medium Shared ui Expected Return Date Picker low Shared ui Pause Activation Screen low Shared ui Pause Status Indicator low Shared ui Admin KPI Stat Widget low Shared ui Organisation Hierarchy Navigator high Shared ui Bufdir Period Selector Widget low Shared ui Export History List medium Shared ui Activity Type Donut Chart medium Shared ui Monthly Activity Bar Chart medium Shared ui Statistics Period Filter Bar low Shared ui Statistics Summary Cards low Shared ui Notification Badge Widget low Shared ui Certificate Expiry Status Indicator low Shared ui Animated Stat Card Widget medium Shared ui In-App Notification Banner low Shared ui Accessible Modal Sheet Widget high Shared ui Live Region Announcer medium Shared ui Semantics Wrapper Widget medium Shared ui Sensitive Field Warning Dialog high Shared ui Confirm Before Submit Screen medium Shared ui Inline Contextual Help Widget low Shared ui Labelled Navigation Bar low Shared ui Plain Language Error Display low Shared ui Single-Action Screen Layout medium Shared ui Wizard Progress Indicator low Shared ui Accessible Text Style System medium Shared ui Accessible Touch Target Wrapper low Shared ui Contrast-Safe Color Palette Widget medium Shared ui Accessible Bottom Navigation Bar medium Shared ui Modal Close Button low Shared ui Persistent Back Button low Shared ui Vertical Scroll Container low Shared ui Organization Card Widget low Shared ui Terminology-Aware Text Widget low Shared ui FeatureGate Widget low Shared ui Chapter Switcher medium Shared

Service Layer (52)

service Authentication Service medium Shared service Authentication Session Manager medium Shared service Biometric Authentication Service medium Shared service Biometric Authentication Service medium Shared service Biometric Authentication Service medium Shared service Permission Checker Service medium Shared service Role State Manager medium Shared service No-Access Route Guard low Shared service Activity Type Metadata Resolver low Shared service Chapter Scope Resolver medium Shared service Organisation Hierarchy Resolver medium Shared service Coordinator Notification Service medium Shared service Duplicate Activity Detection Service high Shared service Mentor Filter Service low Shared service Receipt Threshold Validator low Shared service Approval Status Notification Service medium Shared service Threshold Evaluation Service medium Shared service Declaration Encryption Service high Shared service Organization Feature Flag Service low Shared service Participant Deduplication Service high Shared service Reporting Period Service medium Shared service Activity Attribution Service low Shared service Proxy Duplicate Detection Service medium Shared service Pause Management Service medium Shared service Pause Notification Service medium Shared service Admin Export Service medium Shared service Admin Row-Level Security Guard high Shared service Organisation Hierarchy Service high Shared service User Management Service high Shared service Role Access Validator low Shared service Peer Mentor Stats Aggregator medium Shared service Push Notification Dispatcher medium Shared service Notification Preference Service low Shared service Scenario Deep-Link Router medium Shared service Scenario Notification Content Builder medium Shared service Badge Criteria Integration medium Shared service Activity Summary Aggregator low Shared service Focus Management Service medium Shared service Screen Reader Detection Service medium Shared service Sensitive Field Privacy Guard high Shared service Plain Language Content Service medium Shared service Wizard State Manager medium Shared service Tab State Manager medium Shared service Organization Route Guard medium Shared service Tenant Context Service high Shared service Label Key Resolver Service low Shared service Organization Labels Notifier medium Shared service FeatureFlagProvider (Riverpod) medium Shared service Access Scope Service high Shared service Hierarchy Aggregation Service high Shared service Hierarchy Service high Shared service Unit Assignment Service medium Shared

Data Layer (33)

Infrastructure (54)

infrastructure Keyboard-Aware Layout Utility low Shared infrastructure Supabase Auth Client low Shared infrastructure Deep Link / OAuth Redirect Handler medium Shared infrastructure Secure Storage Adapter low Shared infrastructure Supabase Session Manager medium Shared infrastructure URL Launcher Utility low Shared infrastructure Local Storage Adapter low Shared infrastructure Supabase Activity Client low Shared infrastructure Organization Labels Provider low Shared infrastructure Supabase Client low Shared infrastructure Organisation Field Config Loader medium Shared infrastructure Speech-to-Text Adapter medium Shared infrastructure File Download Handler low Shared infrastructure Duplicate Reviewed Flag Middleware low Shared infrastructure Contact RLS Query Builder low Shared infrastructure Contact Form Validator low Shared infrastructure Design Token Theme low Shared infrastructure Organization Labels Provider low Shared infrastructure Supabase Client Provider low Shared infrastructure Search Debounce Utility low Shared infrastructure Expense Type Analytics Tracker low Shared infrastructure Receipt Image Picker Integration low Shared infrastructure CSV / JSON File Generator medium Shared infrastructure Coordinator Role Guard low Shared infrastructure Nightly Job Scheduler medium Shared infrastructure Supabase RLS Policy Configuration high Shared infrastructure Export File Storage Adapter low Shared infrastructure Supabase Storage Adapter low Shared infrastructure Peer Mentor Pause Management Service medium Shared infrastructure Push Notification Service medium Shared infrastructure fl_chart Adapter medium Shared infrastructure Push Notification Service low Shared infrastructure FCM Push Notification Sender medium Shared infrastructure FCM Notification Dispatcher medium Shared infrastructure Push Notification Dispatcher medium Shared infrastructure Supabase Realtime Subscription Service medium Shared infrastructure Organisation Data Isolation Guard low Shared infrastructure Push Notification Dispatcher medium Shared infrastructure Deep Link Handler medium Shared infrastructure QR Code Generator low Shared infrastructure Share Sheet Bridge low Shared infrastructure Semantics Service Facade medium Shared infrastructure Accessibility Design Token Enforcer medium Shared infrastructure Accessible Theme Builder medium Shared infrastructure Navigation Route Configuration medium Shared infrastructure Accessibility Live Region Announcer low Shared infrastructure Feature Flag Provider low Shared infrastructure Secure Storage Adapter low Shared infrastructure Supabase RLS Tenant Scope Configurator medium Shared infrastructure Label Key Registry low Shared infrastructure Terminology Riverpod Providers low Shared infrastructure WCAG Semantics Label Resolver low Shared infrastructure Feature Flag Key Constants low Shared infrastructure RLS Policy Manager high Shared

User Stories (16)

Monitor Export Progress with Real-Time Status Indicator
medium 3 pts

As a As a Coordinator

I want to see a real-time progress indicator during Bufdir report generation that shows which processing stage is currently running

So that I know the export is actively processing, understand how long it will take, and can identify if the process has stalled

Acceptance Criteria
  • Given an export is triggered, when processing begins, then a progress indicator immediately appears showing the current stage name and a progress bar
  • Given the export moves through processing stages, when each stage completes, then the stage label updates to the next stage and the progress bar advances proportionally
  • Given the export takes longer than 30 seconds, when the coordinator is waiting, then an estimated time remaining is displayed based on the volume of records being processed
  • +3 more
View Full Story →
Include Activity Attachments in Bufdir Export Bundle
medium 5 pts

As a As a Coordinator

I want to include supporting attachments (e.g., event invitations, participation documentation) bundled with the Bufdir export

So that I can provide Bufdir with the documentary evidence they may require for verification of grant-funded activities, particularly for NHF where document attachments to activities are a specific requirement

Acceptance Criteria
  • Given the coordinator is on the export configuration screen, when they see the attachment option, then a toggle is shown with the count of available attachments for the selected period and scope
  • Given the coordinator enables attachment bundling, when the export is triggered, then all files attached to in-scope activities are collected and included in a ZIP archive alongside the main report
  • Given an activity has no attachments, when the bundle is created, then the missing attachment does not cause an error — the export proceeds with only the files that exist
  • +3 more
View Full Story →
Monitor Export Progress with Real-Time Status Indicator
medium 3 pts

As a As a Organization Administrator

I want to see a real-time progress indicator during Bufdir report generation that shows which processing stage is currently running

So that I know the export is actively processing, understand how long it will take, and can identify if the process has stalled

Acceptance Criteria
  • Given an export is triggered, when processing begins, then a progress indicator immediately appears showing the current stage name and a progress bar
  • Given the export moves through processing stages, when each stage completes, then the stage label updates to the next stage and the progress bar advances proportionally
  • Given the export takes longer than 30 seconds, when the coordinator is waiting, then an estimated time remaining is displayed based on the volume of records being processed
  • +3 more
View Full Story →
Include Activity Attachments in Bufdir Export Bundle
medium 5 pts

As a As a Organization Administrator

I want to include supporting attachments (e.g., event invitations, participation documentation) bundled with the Bufdir export

So that I can provide Bufdir with the documentary evidence they may require for verification of grant-funded activities, particularly for NHF where document attachments to activities are a specific requirement

Acceptance Criteria
  • Given the coordinator is on the export configuration screen, when they see the attachment option, then a toggle is shown with the count of available attachments for the selected period and scope
  • Given the coordinator enables attachment bundling, when the export is triggered, then all files attached to in-scope activities are collected and included in a ZIP archive alongside the main report
  • Given an activity has no attachments, when the bundle is created, then the missing attachment does not cause an error — the export proceeds with only the files that exist
  • +3 more
View Full Story →
Select Export Format (PDF, CSV, Excel) Based on Submission Requirements
high 5 pts

As a As a Coordinator

I want to choose between PDF, CSV, and Excel export formats when generating a Bufdir report

So that I can produce the exact file format required by Bufdir's current submission process or by my organization's internal archiving requirements

Acceptance Criteria
  • Given the coordinator is on the export format selection screen, when they view the options, then PDF, CSV, and Excel formats are presented with a 'Recommended for Bufdir portal' label on the appropriate format
  • Given the coordinator selects Excel format, when the export completes, then the generated .xlsx file contains all required Bufdir columns with correct headers and data types
  • Given the coordinator selects CSV format, when the export completes, then the generated .csv file uses the delimiter and encoding expected by the Bufdir import system
  • +3 more
View Full Story →
View Export History and Re-export Previous Reports
high 5 pts

As a As a Coordinator

I want to access a complete history of all previously generated Bufdir export reports with their metadata and to re-export any previous report

So that I can retrieve filed reports for audits, compare submissions across periods, and regenerate a report if the original file is lost or needs to be resubmitted

Acceptance Criteria
  • Given the coordinator navigates to export history, when the screen loads, then a list of all previous exports is displayed ordered by date descending, showing period, format, file size, and generating user
  • Given the coordinator taps a history entry, when they open it, then they can re-download the stored file without re-running aggregation
  • Given the coordinator initiates a re-export for a period that already has an export, when they confirm, then the system logs both the original and re-export with timestamps for audit purposes
  • +3 more
View Full Story →
Preview and Validate Report Before Final Export
high 8 pts

As a As a Coordinator

I want to preview the complete Bufdir report with all aggregated data and field-level validation results before triggering the final export

So that I can identify and correct any data quality issues before submitting an incorrect report to Bufdir

Acceptance Criteria
  • Given the coordinator proceeds to preview, when the preview screen loads, then all Bufdir report sections are rendered with their field names, aggregated values, and validation status icons
  • Given there are validation errors in the report, when the preview loads, then a validation summary banner is displayed at the top listing all failed fields with explanations
  • Given the coordinator wants to compare with prior period, when they tap the period comparison toggle, then a diff view shows the delta between current and previous period values for each field
  • +3 more
View Full Story →
Define Export Scope Across Organization Hierarchy
high 8 pts

As a As a Coordinator

I want to select which organizational units (chapters, regions, local branches) are included in a Bufdir export

So that I can generate reports that correctly reflect the organizational scope of my grant agreement without including activity data from units covered under separate grant applications

Acceptance Criteria
  • Given the coordinator opens scope selection, when the hierarchy loads, then all organization units they have access to are displayed in a tree structure with checkboxes
  • Given the coordinator selects a parent node (e.g., a region), when the selection is applied, then all child units under that region are automatically included in scope
  • Given a peer mentor belongs to multiple chapters within the selected scope, when the export aggregates participants, then that peer mentor is counted only once in the participant total
  • +3 more
View Full Story →
Select Export Format (PDF, CSV, Excel) Based on Submission Requirements
high 5 pts

As a As a Organization Administrator

I want to choose between PDF, CSV, and Excel export formats when generating a Bufdir report

So that I can produce the exact file format required by Bufdir's current submission process or by my organization's internal archiving requirements

Acceptance Criteria
  • Given the coordinator is on the export format selection screen, when they view the options, then PDF, CSV, and Excel formats are presented with a 'Recommended for Bufdir portal' label on the appropriate format
  • Given the coordinator selects Excel format, when the export completes, then the generated .xlsx file contains all required Bufdir columns with correct headers and data types
  • Given the coordinator selects CSV format, when the export completes, then the generated .csv file uses the delimiter and encoding expected by the Bufdir import system
  • +3 more
View Full Story →
View Export History and Re-export Previous Reports
high 5 pts

As a As a Organization Administrator

I want to access a complete history of all previously generated Bufdir export reports with their metadata and to re-export any previous report

So that I can retrieve filed reports for audits, compare submissions across periods, and regenerate a report if the original file is lost or needs to be resubmitted

Acceptance Criteria
  • Given the coordinator navigates to export history, when the screen loads, then a list of all previous exports is displayed ordered by date descending, showing period, format, file size, and generating user
  • Given the coordinator taps a history entry, when they open it, then they can re-download the stored file without re-running aggregation
  • Given the coordinator initiates a re-export for a period that already has an export, when they confirm, then the system logs both the original and re-export with timestamps for audit purposes
  • +3 more
View Full Story →
Preview and Validate Report Before Final Export
high 8 pts

As a As a Organization Administrator

I want to preview the complete Bufdir report with all aggregated data and field-level validation results before triggering the final export

So that I can identify and correct any data quality issues before submitting an incorrect report to Bufdir

Acceptance Criteria
  • Given the coordinator proceeds to preview, when the preview screen loads, then all Bufdir report sections are rendered with their field names, aggregated values, and validation status icons
  • Given there are validation errors in the report, when the preview loads, then a validation summary banner is displayed at the top listing all failed fields with explanations
  • Given the coordinator wants to compare with prior period, when they tap the period comparison toggle, then a diff view shows the delta between current and previous period values for each field
  • +3 more
View Full Story →
Define Export Scope Across Organization Hierarchy
high 8 pts

As a As a Organization Administrator

I want to select which organizational units (chapters, regions, local branches) are included in a Bufdir export

So that I can generate reports that correctly reflect the organizational scope of my grant agreement without including activity data from units covered under separate grant applications

Acceptance Criteria
  • Given the coordinator opens scope selection, when the hierarchy loads, then all organization units they have access to are displayed in a tree structure with checkboxes
  • Given the coordinator selects a parent node (e.g., a region), when the selection is applied, then all child units under that region are automatically included in scope
  • Given a peer mentor belongs to multiple chapters within the selected scope, when the export aggregates participants, then that peer mentor is counted only once in the participant total
  • +3 more
View Full Story →
Select Reporting Period with Presets and Custom Date Range
critical 5 pts

As a As a Coordinator

I want to select the reporting period for a Bufdir export using preset options (e.g., H1, H2, full year) or a custom date range

So that I can generate reports that match exactly the grant period Bufdir requires without manually calculating date boundaries

Acceptance Criteria
  • Given the coordinator opens period selection, when they view the screen, then they see preset options for H1, H2, and full year of the current and previous calendar year
  • Given the coordinator selects a preset period, when the period is applied, then the record count banner updates immediately to show how many activities fall within that period
  • Given the coordinator wants a non-standard period, when they tap custom date range, then a date range picker opens allowing them to set any start and end date
  • +3 more
View Full Story →
Generate Bufdir Report with One-Click Export
critical 13 pts

As a As a Coordinator

I want to generate a complete Bufdir-compliant activity report for my organization with a single export action

So that I can submit required government grant reporting without manual data aggregation or spreadsheet work

Acceptance Criteria
  • Given a coordinator is on the Bufdir export screen, when they tap the export button, then the system initiates aggregation across all activities in scope without requiring manual configuration
  • Given an export is triggered, when the system aggregates data, then all peer mentor activities are mapped to the correct Bufdir activity categories using the category mapping configuration
  • Given aggregation completes, when the report is generated, then the output file conforms to the current Bufdir schema and passes format validation
  • +2 more
View Full Story →
Select Reporting Period with Presets and Custom Date Range
critical 5 pts

As a As a Organization Administrator

I want to select the reporting period for a Bufdir export using preset options (e.g., H1, H2, full year) or a custom date range

So that I can generate reports that match exactly the grant period Bufdir requires without manually calculating date boundaries

Acceptance Criteria
  • Given the coordinator opens period selection, when they view the screen, then they see preset options for H1, H2, and full year of the current and previous calendar year
  • Given the coordinator selects a preset period, when the period is applied, then the record count banner updates immediately to show how many activities fall within that period
  • Given the coordinator wants a non-standard period, when they tap custom date range, then a date range picker opens allowing them to set any start and end date
  • +3 more
View Full Story →
Generate Bufdir Report with One-Click Export
critical 13 pts

As a As a Organization Administrator

I want to generate a complete Bufdir-compliant activity report for my organization with a single export action

So that I can submit required government grant reporting without manual data aggregation or spreadsheet work

Acceptance Criteria
  • Given a coordinator is on the Bufdir export screen, when they tap the export button, then the system initiates aggregation across all activities in scope without requiring manual configuration
  • Given an export is triggered, when the system aggregates data, then all peer mentor activities are mapped to the correct Bufdir activity categories using the category mapping configuration
  • Given aggregation completes, when the report is generated, then the output file conforms to the current Bufdir schema and passes format validation
  • +2 more
View Full Story →