Profile Switching
Feature Detail
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
Analysis
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.
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)
Shared Components
These components are reused across multiple features
User Interface (12)
Service Layer (34)
Data Layer (22)
Infrastructure (38)
User Stories
No user stories have been generated for this feature yet.