Organization Selection & Onboarding
Feature Detail
Description
A dedicated screen presented at first launch (and when no organization context exists) that lets users select which member organization they belong to — NHF, Blindeforbundet, HLF, Barnekreftforeningen, or any future onboarded organization. The selection seeds the user's session with the correct tenant context, terminology labels, feature flags, and branding without requiring separate app builds per organization. The onboarding flow must handle edge cases such as a user who has roles in more than one organization, ensuring they can switch context cleanly. It also serves as the entry point for the BankID/Vipps authentication step in Phase 2, where the identity provider response is tied to the selected tenant so that returned identifiers (e.g., personnummer from Vipps) are stored against the correct organization's member record.
Analysis
Enables a single app binary to serve all partner organizations, dramatically reducing distribution and maintenance overhead. A clean tenant selection flow is also the prerequisite for correct data isolation, terminology rendering, and feature gating across all downstream screens.
Store selected org in secure local storage and Supabase session metadata. Use Flutter's go_router with a guard that redirects unauthenticated or org-less users to this screen. The Supabase RLS policies must be tenant-scoped from this point forward. Consider a shallow org-profile fetch on selection to validate the org is active before proceeding.
Components (205)
Shared Components
These components are reused across multiple features
User Interface (59)
Service Layer (52)
Data Layer (33)
Infrastructure (54)
User Stories (21)
As a As a Peer Mentor (Likeperson)
I want the app to display my organization's branding (colors, logo) after I select my organization
So that the app feels like a natural extension of my organization's identity, increasing trust and recognition
- Given a peer mentor selects their organization, when the home screen loads, then the app header or splash area displays the organization's logo
- Given organization branding is cached, when the peer mentor opens the app in offline mode, then the cached branding is applied without network requests
- Given the organization administrator updates the branding in the backend, when the peer mentor next starts the app with network access, then the updated branding is fetched and the cache is refreshed
- +2 more
As a As a Peer Mentor (Likeperson)
I want to see my progress through the onboarding flow and be able to resume it if I close the app midway
So that I do not have to start the onboarding process from the beginning if I am interrupted
- Given a peer mentor begins the onboarding flow, when they view each screen, then a progress indicator shows their current step position and total number of steps
- Given a peer mentor closes the app mid-onboarding, when they reopen the app and authenticate, then they are returned to the step they left off rather than the beginning of onboarding
- Given a peer mentor completes all onboarding steps, when the last step is confirmed, then the onboarding flow is marked complete and they are routed to the main home screen
- +2 more
As a As a Coordinator
I want the app to display my organization's branding (colors, logo) after I select my organization
So that the app feels like a natural extension of my organization's identity, increasing trust and recognition
- Given a peer mentor selects their organization, when the home screen loads, then the app header or splash area displays the organization's logo
- Given organization branding is cached, when the peer mentor opens the app in offline mode, then the cached branding is applied without network requests
- Given the organization administrator updates the branding in the backend, when the peer mentor next starts the app with network access, then the updated branding is fetched and the cache is refreshed
- +2 more
As a As a Coordinator
I want to see my progress through the onboarding flow and be able to resume it if I close the app midway
So that I do not have to start the onboarding process from the beginning if I am interrupted
- Given a peer mentor begins the onboarding flow, when they view each screen, then a progress indicator shows their current step position and total number of steps
- Given a peer mentor closes the app mid-onboarding, when they reopen the app and authenticate, then they are returned to the step they left off rather than the beginning of onboarding
- Given a peer mentor completes all onboarding steps, when the last step is confirmed, then the onboarding flow is marked complete and they are routed to the main home screen
- +2 more
As a As a Organization Administrator
I want the app to display my organization's branding (colors, logo) after I select my organization
So that the app feels like a natural extension of my organization's identity, increasing trust and recognition
- Given a peer mentor selects their organization, when the home screen loads, then the app header or splash area displays the organization's logo
- Given organization branding is cached, when the peer mentor opens the app in offline mode, then the cached branding is applied without network requests
- Given the organization administrator updates the branding in the backend, when the peer mentor next starts the app with network access, then the updated branding is fetched and the cache is refreshed
- +2 more
As a As a Organization Administrator
I want to see my progress through the onboarding flow and be able to resume it if I close the app midway
So that I do not have to start the onboarding process from the beginning if I am interrupted
- Given a peer mentor begins the onboarding flow, when they view each screen, then a progress indicator shows their current step position and total number of steps
- Given a peer mentor closes the app mid-onboarding, when they reopen the app and authenticate, then they are returned to the step they left off rather than the beginning of onboarding
- Given a peer mentor completes all onboarding steps, when the last step is confirmed, then the onboarding flow is marked complete and they are routed to the main home screen
- +2 more
As a As a Peer Mentor (Likeperson)
I want to switch my active organization context from within the app without having to log out and log back in
So that I can work across multiple chapter affiliations in a single session without interruption
- Given a peer mentor is logged in with multiple org memberships, when they open the context switcher, then all their organizations are listed with the currently active one clearly indicated
- Given the context switcher is open, when the peer mentor selects a different organization, then the tenant context service updates the active org, RLS is reconfigured, and the user is navigated to the home screen
- Given the user switches organization, when the switch completes, then org-specific caches (branding, feature flags, terminology) are cleared and reloaded for the new organization
- +2 more
As a As a Peer Mentor (Likeperson)
I want to see the app display terminology and labels specific to my organization rather than generic terms
So that the app feels familiar and aligned with the language and culture of my specific organization
- Given a peer mentor selects their organization, when the home screen loads, then all navigational labels, section headers, and action buttons display terminology configured for that organization
- Given the app is running with cached terminology, when the peer mentor uses the app offline, then the cached terminology is used and no text falls back to raw label keys
- Given the terminology sync service fetches updated labels from the backend, when new terminology is available, then the cache is updated and the UI reflects the changes on the next navigation
- +2 more
As a As a Peer Mentor (Likeperson)
I want to only see features and menu items that are enabled for my organization
So that I am not confused by unavailable options and the interface remains as simple as possible
- Given a peer mentor's organization does not have the expense reporting feature enabled, when they view the navigation or home screen, then no expense-related menu items or prompts are displayed
- Given feature flags are loaded, when a feature-gated widget is rendered, then it is only visible if the feature flag evaluator returns true for the current organization and role
- Given the app starts, when feature flags are fetched from the backend, then they are cached locally so feature gating works in offline mode
- +2 more
As a As a Coordinator
I want to switch my active organization context from within the app without having to log out and log back in
So that I can work across multiple chapter affiliations in a single session without interruption
- Given a peer mentor is logged in with multiple org memberships, when they open the context switcher, then all their organizations are listed with the currently active one clearly indicated
- Given the context switcher is open, when the peer mentor selects a different organization, then the tenant context service updates the active org, RLS is reconfigured, and the user is navigated to the home screen
- Given the user switches organization, when the switch completes, then org-specific caches (branding, feature flags, terminology) are cleared and reloaded for the new organization
- +2 more
As a As a Coordinator
I want to see the app display terminology and labels specific to my organization rather than generic terms
So that the app feels familiar and aligned with the language and culture of my specific organization
- Given a peer mentor selects their organization, when the home screen loads, then all navigational labels, section headers, and action buttons display terminology configured for that organization
- Given the app is running with cached terminology, when the peer mentor uses the app offline, then the cached terminology is used and no text falls back to raw label keys
- Given the terminology sync service fetches updated labels from the backend, when new terminology is available, then the cache is updated and the UI reflects the changes on the next navigation
- +2 more
As a As a Coordinator
I want to only see features and menu items that are enabled for my organization
So that I am not confused by unavailable options and the interface remains as simple as possible
- Given a peer mentor's organization does not have the expense reporting feature enabled, when they view the navigation or home screen, then no expense-related menu items or prompts are displayed
- Given feature flags are loaded, when a feature-gated widget is rendered, then it is only visible if the feature flag evaluator returns true for the current organization and role
- Given the app starts, when feature flags are fetched from the backend, then they are cached locally so feature gating works in offline mode
- +2 more
As a As a Organization Administrator
I want to switch my active organization context from within the app without having to log out and log back in
So that I can work across multiple chapter affiliations in a single session without interruption
- Given a peer mentor is logged in with multiple org memberships, when they open the context switcher, then all their organizations are listed with the currently active one clearly indicated
- Given the context switcher is open, when the peer mentor selects a different organization, then the tenant context service updates the active org, RLS is reconfigured, and the user is navigated to the home screen
- Given the user switches organization, when the switch completes, then org-specific caches (branding, feature flags, terminology) are cleared and reloaded for the new organization
- +2 more
As a As a Organization Administrator
I want to see the app display terminology and labels specific to my organization rather than generic terms
So that the app feels familiar and aligned with the language and culture of my specific organization
- Given a peer mentor selects their organization, when the home screen loads, then all navigational labels, section headers, and action buttons display terminology configured for that organization
- Given the app is running with cached terminology, when the peer mentor uses the app offline, then the cached terminology is used and no text falls back to raw label keys
- Given the terminology sync service fetches updated labels from the backend, when new terminology is available, then the cache is updated and the UI reflects the changes on the next navigation
- +2 more
As a As a Organization Administrator
I want to only see features and menu items that are enabled for my organization
So that I am not confused by unavailable options and the interface remains as simple as possible
- Given a peer mentor's organization does not have the expense reporting feature enabled, when they view the navigation or home screen, then no expense-related menu items or prompts are displayed
- Given feature flags are loaded, when a feature-gated widget is rendered, then it is only visible if the feature flag evaluator returns true for the current organization and role
- Given the app starts, when feature flags are fetched from the backend, then they are cached locally so feature gating works in offline mode
- +2 more
As a As a Peer Mentor (Likeperson)
I want to see a list of all organizations I belong to and select which one I want to work in when I first log in
So that I can access the correct data, terminology, and features specific to my chosen organization context
- Given a peer mentor belongs to multiple organizations, when they complete authentication, then the org-selection-screen is displayed listing all their organizations as individual cards
- Given the org-selection-screen is displayed, when the peer mentor taps an organization card, then the tenant context is set, RLS policies are configured, and the peer mentor is routed to the home screen
- Given a peer mentor belongs to only one organization, when they complete authentication, then the org-selection-screen is skipped and the tenant context is automatically set
- +2 more
As a As a Peer Mentor (Likeperson)
I want my activities, contacts, and personal data to be strictly isolated to my selected organization
So that I cannot accidentally view or modify data belonging to another organization, and my own data remains private
- Given a peer mentor selects organization A, when they view their contacts or activities, then only data associated with organization A is returned
- Given a peer mentor switches to organization B, when they view their contacts or activities, then only data associated with organization B is returned and no data from organization A is visible
- Given a database query is attempted without an active tenant context, when the org data isolation guard detects this state, then the query is blocked and an error is logged
- +2 more
As a As a Coordinator
I want to see a list of all organizations I belong to and select which one I want to work in when I first log in
So that I can access the correct data, terminology, and features specific to my chosen organization context
- Given a peer mentor belongs to multiple organizations, when they complete authentication, then the org-selection-screen is displayed listing all their organizations as individual cards
- Given the org-selection-screen is displayed, when the peer mentor taps an organization card, then the tenant context is set, RLS policies are configured, and the peer mentor is routed to the home screen
- Given a peer mentor belongs to only one organization, when they complete authentication, then the org-selection-screen is skipped and the tenant context is automatically set
- +2 more
As a As a Coordinator
I want my activities, contacts, and personal data to be strictly isolated to my selected organization
So that I cannot accidentally view or modify data belonging to another organization, and my own data remains private
- Given a peer mentor selects organization A, when they view their contacts or activities, then only data associated with organization A is returned
- Given a peer mentor switches to organization B, when they view their contacts or activities, then only data associated with organization B is returned and no data from organization A is visible
- Given a database query is attempted without an active tenant context, when the org data isolation guard detects this state, then the query is blocked and an error is logged
- +2 more
As a As a Organization Administrator
I want to see a list of all organizations I belong to and select which one I want to work in when I first log in
So that I can access the correct data, terminology, and features specific to my chosen organization context
- Given a peer mentor belongs to multiple organizations, when they complete authentication, then the org-selection-screen is displayed listing all their organizations as individual cards
- Given the org-selection-screen is displayed, when the peer mentor taps an organization card, then the tenant context is set, RLS policies are configured, and the peer mentor is routed to the home screen
- Given a peer mentor belongs to only one organization, when they complete authentication, then the org-selection-screen is skipped and the tenant context is automatically set
- +2 more
As a As a Organization Administrator
I want my activities, contacts, and personal data to be strictly isolated to my selected organization
So that I cannot accidentally view or modify data belonging to another organization, and my own data remains private
- Given a peer mentor selects organization A, when they view their contacts or activities, then only data associated with organization A is returned
- Given a peer mentor switches to organization B, when they view their contacts or activities, then only data associated with organization B is returned and no data from organization A is visible
- Given a database query is attempted without an active tenant context, when the org data isolation guard detects this state, then the query is blocked and an error is logged
- +2 more