medium complexity MVP extracted Profile Management Confidence: 100%
5
Components
43
Shared
0
User Stories
Yes
Analyzed

Description

Profile Switching allows a user who holds multiple roles or organizational memberships to change their active context within the Meander Mobile App without signing out. A Role Switch Widget lets the user select the active role and organization, after which the home screen, navigation tabs, and data scope update to reflect the new context. The feature is essential for NHF users who belong to up to five local chapters simultaneously, and for Organization Admins who surface as Coordinators on mobile and need a clean transition between their administrative and coordinator contexts.

Sources & reasoning

NHF's explicit requirement for up to five local-chapter memberships per user directly motivates a profile-switching mechanism. The blueprint lists Profile Switching as MVP with a Role Switch Widget UI component. The Org Admin-as-Coordinator mobile pattern also requires context switching without re-login. MVP target confirmed because profile-management is an always-on area and role-scoped home content is required from Fase 1 launch.

No source references — this artifact was included based on reasoning alone (see above).

Analysis

Business Value

NHF explicitly flagged membership in up to five local chapters as a unique requirement, with the specific need to clarify affiliation and prevent double-reporting of activities. Profile switching solves this without forcing users to maintain separate accounts, which would multiply onboarding friction and fragment activity data. For Org Admins who surface as Coordinators on mobile, seamless context switching removes the need for separate login flows. At platform scale, this pattern lets Norse onboard users active across multiple partner organizations without account proliferation, directly supporting multi-tenant growth and reducing coordinator overhead for managing duplicated records.

Implementation Notes

The active role/organization context is held in a Riverpod state notifier that persists the selection to Drift local storage so it survives app restarts. On context switch the app invalidates all organization-scoped providers and re-fetches the module registry, home widgets, and navigation tabs for the new tenant from the REST API bootstrap endpoint. The Role Switch Widget is a bottom-sheet picker listing the user's available role-org pairs from user_organization_roles. Tenant scoping is enforced by injecting the active organization ID as a header in ApiHttpClient on every request, preventing cross-org data leakage. Users with a single role-org pair do not see the switch entry point. Flutter page transitions must maintain WCAG focus management during context change.

Components (48)

User Interface (2)

Service Layer (2)

Data Layer (1)

Shared Components

These components are reused across multiple features

User Stories

No user stories have been generated for this feature yet.