medium complexity extracted Activity Oversight Confidence: 100%
6
Components
39
Shared
0
User Stories
Yes
Analyzed

Description

This feature implements automated duplicate detection and manual flagging of suspicious or erroneous activity registrations. The system analyzes incoming registrations against existing records to surface potential duplicates - for example, the same activity logged by multiple coordinators for the same peer mentor and date - and presents alerts to reviewers. Coordinators can also manually flag any activity for follow-up, and flagged items are isolated from approved reporting totals until resolved. The feature directly addresses NHF's stated requirement for duplikatvarsling to prevent double-counting in Bufdir reports.

Analysis

Business Value

Duplicate registrations are a concrete data-integrity risk for organizations with large coordinator networks. NHF operates across 12 national associations, 9 regions, and 1400 local chapters, making it entirely plausible that the same group activity is entered by multiple coordinators. A single undetected duplicate can cascade into incorrect Bufdir reports, which carry legal and financial consequences. Automated flagging reduces the manual audit burden on coordinators and org admins while catching errors before they enter the approved dataset. Beyond compliance, the feature builds trust in the platform's numbers - a prerequisite for organizations to decommission their legacy Excel-based reporting and fully commit to Meander as the source of truth.

Implementation Notes

Duplicate detection runs as a server-side check triggered on activity creation and on the nightly batch job. The detection heuristic compares peer_mentor_id, activity_date, activity_type_id, and organization_id; a configurable similarity threshold (default exact match on all four fields) determines whether a flag is raised. Flags are stored as a status on the activities table (or a separate flags table if flag metadata grows) and surfaced in the admin portal via a dedicated alert widget on the Activity Review page. The detection query must be index-optimized given the expected volume - composite index on (peer_mentor_id, activity_date, organization_id) is required. Manual flagging is a simple PATCH endpoint that sets flag status and records actor in audit_logs. Flagged activities are excluded from aggregation queries used by statistics and Bufdir report generation until the flag is resolved or dismissed.

Components (45)

User Interface (2)

Service Layer (2)

Data Layer (1)

Infrastructure (1)

Shared Components

These components are reused across multiple features

User Stories

No user stories have been generated for this feature yet.