high complexity extracted Contact & Peer Mentor Management Confidence: 100%
7
Components
198
Shared
14
User Stories
Yes
Analyzed

Description

Supports NHF's requirement where a single member or peer mentor can belong to up to 5 local chapters simultaneously. The system must clearly display all affiliations on the contact profile and enforce rules to prevent the same activity from being reported multiple times by coordinators from different chapters. Duplicate activity detection requires comparing submitted activity records across coordinators affiliated with the same contact. A warning is surfaced when a potential duplicate is detected before submission is finalized. This feature is NHF-specific but the underlying data model (many-to-many contact-to-chapter) may benefit other organizations.

Analysis

Business Value

Directly prevents double-counting in Bufdir reporting, which would compromise NHF's funding eligibility. Reduces administrative overhead for coordinators managing cross-chapter members.

Implementation Notes

Requires a junction table in Supabase (contact_chapters). Duplicate detection logic should run on activity submission, comparing contact_id + date + activity_type across all chapters the contact belongs to. Surface as a dismissible warning dialog, not a hard block. Bloc/Cubit pattern fits well for the multi-step validation flow.

Components (205)

User Interface (2)

Service Layer (2)

Data Layer (1)

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 (14)

Display Multi-Chapter Affiliation Chips on Contact Cards and Detail Screens
medium 3 pts

As a As a Coordinator

I want to see a visual indicator on contact cards and contact detail screens showing all chapters a peer mentor belongs to

So that I can immediately identify multi-chapter members and understand their organizational context without navigating to a separate screen

Acceptance Criteria
  • Given a peer mentor belongs to two or more chapters, when the contact card is rendered in the contact list, then a row of multi-chapter affiliation chips is visible below the peer mentor's name
  • Given a peer mentor belongs to only one chapter, when the contact card is rendered, then no affiliation chips are shown
  • Given affiliation chips are shown on a contact detail screen, when the coordinator taps a chip, then the chapter affiliations panel scrolls into view or is highlighted
  • +2 more
View Full Story →
End a Chapter Affiliation While Preserving Historical Activity Data
medium 5 pts

As a As a Coordinator

I want to mark a peer mentor's affiliation with a specific chapter as ended without deleting their historical activity records from that chapter

So that past activities remain auditable and included in historical Bufdir reports while the peer mentor no longer appears as active in that chapter going forward

Acceptance Criteria
  • Given a peer mentor has an active affiliation in a chapter, when a coordinator selects 'End Affiliation' in the chapter assignment editor, then a confirmation dialog requests an end date and optional note
  • Given the coordinator confirms ending an affiliation, when saved, then the affiliation record is updated with an end_date and status changes to 'ended'
  • Given an affiliation has been ended, when the affiliations panel loads, then the ended affiliation is hidden by default but visible when the coordinator expands the 'History' section
  • +2 more
View Full Story →
Filter Statistics and Reports by Chapter Scope for Multi-Affiliated Members
medium 8 pts

As a As a Coordinator

I want to view statistics and generate reports that correctly scope activities for peer mentors who belong to multiple chapters, showing only activities attributed to my chapter

So that my chapter's performance data is accurate and I am not seeing or reporting on activities that belong to other chapters

Acceptance Criteria
  • Given a coordinator views the stats screen for a peer mentor affiliated with multiple chapters, when the screen loads, then only activities attributed to the coordinator's own chapter are included in the counts and charts
  • Given the coordinator views their own coordinator stats dashboard, when activities are aggregated, then activities from peer mentors shared with other chapters are counted only once per chapter attribution
  • Given the coordinator initiates a Bufdir export, when the export query executes, then only activities attributed to the coordinator's chapter are included in the exported dataset
  • +2 more
View Full Story →
Display Multi-Chapter Affiliation Chips on Contact Cards and Detail Screens
medium 3 pts

As a As a Organization Administrator

I want to see a visual indicator on contact cards and contact detail screens showing all chapters a peer mentor belongs to

So that I can immediately identify multi-chapter members and understand their organizational context without navigating to a separate screen

Acceptance Criteria
  • Given a peer mentor belongs to two or more chapters, when the contact card is rendered in the contact list, then a row of multi-chapter affiliation chips is visible below the peer mentor's name
  • Given a peer mentor belongs to only one chapter, when the contact card is rendered, then no affiliation chips are shown
  • Given affiliation chips are shown on a contact detail screen, when the coordinator taps a chip, then the chapter affiliations panel scrolls into view or is highlighted
  • +2 more
View Full Story →
End a Chapter Affiliation While Preserving Historical Activity Data
medium 5 pts

As a As a Organization Administrator

I want to mark a peer mentor's affiliation with a specific chapter as ended without deleting their historical activity records from that chapter

So that past activities remain auditable and included in historical Bufdir reports while the peer mentor no longer appears as active in that chapter going forward

Acceptance Criteria
  • Given a peer mentor has an active affiliation in a chapter, when a coordinator selects 'End Affiliation' in the chapter assignment editor, then a confirmation dialog requests an end date and optional note
  • Given the coordinator confirms ending an affiliation, when saved, then the affiliation record is updated with an end_date and status changes to 'ended'
  • Given an affiliation has been ended, when the affiliations panel loads, then the ended affiliation is hidden by default but visible when the coordinator expands the 'History' section
  • +2 more
View Full Story →
Filter Statistics and Reports by Chapter Scope for Multi-Affiliated Members
medium 8 pts

As a As a Organization Administrator

I want to view statistics and generate reports that correctly scope activities for peer mentors who belong to multiple chapters, showing only activities attributed to my chapter

So that my chapter's performance data is accurate and I am not seeing or reporting on activities that belong to other chapters

Acceptance Criteria
  • Given a coordinator views the stats screen for a peer mentor affiliated with multiple chapters, when the screen loads, then only activities attributed to the coordinator's own chapter are included in the counts and charts
  • Given the coordinator views their own coordinator stats dashboard, when activities are aggregated, then activities from peer mentors shared with other chapters are counted only once per chapter attribution
  • Given the coordinator initiates a Bufdir export, when the export query executes, then only activities attributed to the coordinator's chapter are included in the exported dataset
  • +2 more
View Full Story →
View and Manage Contact's Chapter Affiliations
high 5 pts

As a As a Coordinator

I want to view a contact's full list of chapter affiliations and manage their membership across multiple chapters

So that I can maintain accurate records of which chapters a peer mentor belongs to and ensure their activity is attributed correctly across the organization

Acceptance Criteria
  • Given a contact has affiliations in multiple chapters, when a coordinator opens the contact detail screen, then a 'Chapter Affiliations' panel is visible listing every affiliated chapter with name, role, and status
  • Given the affiliations panel is visible, when the coordinator taps 'Edit Affiliations', then the chapter assignment editor opens with the current affiliations pre-populated
  • Given the chapter assignment editor is open, when the coordinator adds a new chapter affiliation and saves, then the new affiliation is persisted and the panel updates immediately
  • +2 more
View Full Story →
Resolve Primary Chapter for Activity Attribution
high 5 pts

As a As a Coordinator

I want to assign or confirm the primary chapter attribution when registering an activity for a peer mentor who belongs to multiple chapters

So that each activity is counted against the correct chapter's statistics and reporting quota, even when a peer mentor participates across chapter boundaries

Acceptance Criteria
  • Given a peer mentor has two or more chapter affiliations, when the coordinator reaches the summary step in the activity wizard, then a chapter attribution selector is displayed showing all affiliated chapters
  • Given the chapter attribution selector is displayed, when no explicit selection is made, then the coordinator's own chapter is pre-selected as the default
  • Given the coordinator selects a different chapter for attribution, when the activity is saved, then the activity record stores the selected chapter ID and that chapter's statistics reflect the new entry
  • +2 more
View Full Story →
Assign Peer Mentor to Additional Chapter Without Removing Existing Affiliations
high 5 pts

As a As a Coordinator

I want to add a peer mentor to an additional chapter in a way that preserves all their existing chapter affiliations

So that a peer mentor who expands their volunteering across chapters retains their full history and continues to receive activities and statistics from all affiliated chapters

Acceptance Criteria
  • Given a peer mentor already has two chapter affiliations, when a coordinator opens the chapter assignment editor and adds a third chapter, then all three affiliations are active after saving
  • Given a peer mentor already has five active chapter affiliations (the maximum), when a coordinator attempts to add a sixth, then the save button is disabled and an explanatory message states the maximum has been reached
  • Given the chapter assignment editor is open, when the coordinator searches for a chapter by partial name, then matching chapters are shown in a dropdown for selection
  • +2 more
View Full Story →
Detect and Warn on Cross-Chapter Duplicate Activity Registration
high 8 pts

As a As a Coordinator

I want to receive a warning when an activity I am about to register may already have been registered by a coordinator in another chapter for the same peer mentor

So that I can avoid double-counting activities and ensure that Bufdir statistics accurately reflect the real number of unique interactions

Acceptance Criteria
  • Given a peer mentor belongs to at least two chapters, when a coordinator completes the activity wizard and taps submit, then the system queries cross-chapter activity history before persisting
  • Given a cross-chapter duplicate is detected (same peer mentor, same date ±1 day, same activity type), when the submit action is triggered, then a duplicate warning dialog is displayed with the conflicting record's details
  • Given the duplicate warning dialog is shown, when the coordinator selects 'Proceed Anyway', then the activity is saved and a duplicate-reviewed flag is set on the record
  • +3 more
View Full Story →
View and Manage Contact's Chapter Affiliations
high 5 pts

As a As a Organization Administrator

I want to view a contact's full list of chapter affiliations and manage their membership across multiple chapters

So that I can maintain accurate records of which chapters a peer mentor belongs to and ensure their activity is attributed correctly across the organization

Acceptance Criteria
  • Given a contact has affiliations in multiple chapters, when a coordinator opens the contact detail screen, then a 'Chapter Affiliations' panel is visible listing every affiliated chapter with name, role, and status
  • Given the affiliations panel is visible, when the coordinator taps 'Edit Affiliations', then the chapter assignment editor opens with the current affiliations pre-populated
  • Given the chapter assignment editor is open, when the coordinator adds a new chapter affiliation and saves, then the new affiliation is persisted and the panel updates immediately
  • +2 more
View Full Story →
Resolve Primary Chapter for Activity Attribution
high 5 pts

As a As a Organization Administrator

I want to assign or confirm the primary chapter attribution when registering an activity for a peer mentor who belongs to multiple chapters

So that each activity is counted against the correct chapter's statistics and reporting quota, even when a peer mentor participates across chapter boundaries

Acceptance Criteria
  • Given a peer mentor has two or more chapter affiliations, when the coordinator reaches the summary step in the activity wizard, then a chapter attribution selector is displayed showing all affiliated chapters
  • Given the chapter attribution selector is displayed, when no explicit selection is made, then the coordinator's own chapter is pre-selected as the default
  • Given the coordinator selects a different chapter for attribution, when the activity is saved, then the activity record stores the selected chapter ID and that chapter's statistics reflect the new entry
  • +2 more
View Full Story →
Assign Peer Mentor to Additional Chapter Without Removing Existing Affiliations
high 5 pts

As a As a Organization Administrator

I want to add a peer mentor to an additional chapter in a way that preserves all their existing chapter affiliations

So that a peer mentor who expands their volunteering across chapters retains their full history and continues to receive activities and statistics from all affiliated chapters

Acceptance Criteria
  • Given a peer mentor already has two chapter affiliations, when a coordinator opens the chapter assignment editor and adds a third chapter, then all three affiliations are active after saving
  • Given a peer mentor already has five active chapter affiliations (the maximum), when a coordinator attempts to add a sixth, then the save button is disabled and an explanatory message states the maximum has been reached
  • Given the chapter assignment editor is open, when the coordinator searches for a chapter by partial name, then matching chapters are shown in a dropdown for selection
  • +2 more
View Full Story →
Detect and Warn on Cross-Chapter Duplicate Activity Registration
high 8 pts

As a As a Organization Administrator

I want to receive a warning when an activity I am about to register may already have been registered by a coordinator in another chapter for the same peer mentor

So that I can avoid double-counting activities and ensure that Bufdir statistics accurately reflect the real number of unique interactions

Acceptance Criteria
  • Given a peer mentor belongs to at least two chapters, when a coordinator completes the activity wizard and taps submit, then the system queries cross-chapter activity history before persisting
  • Given a cross-chapter duplicate is detected (same peer mentor, same date ±1 day, same activity type), when the submit action is triggered, then a duplicate warning dialog is displayed with the conflicting record's details
  • Given the duplicate warning dialog is shown, when the coordinator selects 'Proceed Anyway', then the activity is saved and a duplicate-reviewed flag is set on the record
  • +3 more
View Full Story →