medium complexity extracted Profile Management Confidence: 100%
6
Components
106
Shared
0
User Stories
Yes
Analyzed

Description

This feature enables users who hold multiple roles — primarily coordinators who are also registered peer mentors — to switch their active role context within the app without logging out and back in. A role switcher widget is accessible from the home screen or navigation, allowing seamless transitions between peer mentor and coordinator views. The active role determines which home dashboard, navigation items, and data scopes are presented to the user throughout their session.

User Flow

Profile Switching user flow
Click to expand

Analysis

Business Value

Many coordinators within participating organizations also serve as active peer mentors, meaning they need to operate in both capacities from a single device. Without profile switching, these users would need separate accounts or repeated logouts, creating friction that directly undermines registration rates and data quality. Seamless role switching reduces the cognitive burden on dual-role users and ensures that activity data is always attributed to the correct role context. This is especially important for Bufdir reporting accuracy, where activities must be correctly categorized by role type to satisfy grant reporting requirements.

Implementation Notes

Role switching is managed by the Profile Switch Service, which updates the active role in secure local storage and triggers a BLoC event that propagates the new role context to all dependent widgets via Riverpod providers. The Role Switcher Widget is a compact UI component that shows the current active role and allows selection from available roles. Navigation items, home dashboard content, and API request scopes are all derived from the active role state. Role switching must not require a network round-trip for the transition itself — the available roles are resolved at login and cached, with the switch being a purely local state change followed by a UI rebuild.

Components (112)

User Interface (2)

Service Layer (2)

Data Layer (2)

Shared Components

These components are reused across multiple features

Service Layer (34)

Data Layer (22)

Infrastructure (38)

infrastructure Keychain/Keystore Adapter low Shared infrastructure JWT Claims Extractor low Shared infrastructure Organization Labels Adapter low Shared infrastructure Keychain/Keystore Adapter low Shared infrastructure Auth API Client medium Shared infrastructure REST API Client medium Shared infrastructure WCAG Accessibility Adapter low Shared infrastructure Registration API Client low Shared infrastructure Accounting API Client high Shared infrastructure PDF Renderer Adapter medium Shared infrastructure File Share Adapter low Shared infrastructure FCM/APNs Adapter high Shared infrastructure Share Sheet Adapter low Shared infrastructure Share Plus Adapter low Shared infrastructure Platform Accessibility Bridge medium Shared infrastructure Semantics Override Adapter high Shared infrastructure URL Launcher Adapter low Shared infrastructure Markdown Content Renderer low Shared infrastructure Network Connectivity Monitor low Shared infrastructure Expense Receipt Storage Adapter low Shared infrastructure Audit Log Writer low Shared infrastructure Feature Flag Checker low Shared infrastructure Logo Upload Adapter low Shared infrastructure Terminology Constants Registry low Shared infrastructure Feature Flag Cache Adapter low Shared infrastructure Org Scope JWT Resolver medium Shared infrastructure Association Audit Logger low Shared infrastructure Token Blocklist medium Shared infrastructure Analytics Tracker low Shared infrastructure SEO Metadata Config low Shared infrastructure Analytics Tracker low Shared infrastructure Analytics Tracker low Shared infrastructure Sales Analytics Tracker low Shared infrastructure Email Provider Adapter low Shared infrastructure Terms of Service Content Provider low Shared infrastructure Legal PDF Asset Provider low Shared infrastructure Consent-Gated Script Loader low Shared infrastructure Legal Page Layout low Shared

User Stories

No user stories have been generated for this feature yet.