medium complexity extracted Organization Configuration & Multi-tenancy Confidence: 100%
7
Components
198
Shared
21
User Stories
Yes
Analyzed

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

Business Value

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.

Implementation Notes

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)

User Interface (3)

Service Layer (2)

Data Layer (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 (21)

Experience Organization Branding Throughout the App
medium 3 pts

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

Acceptance Criteria
  • 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
View Full Story →
Track and Resume Onboarding Progress
medium 5 pts

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

Acceptance Criteria
  • 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
View Full Story →
Experience Organization Branding Throughout the App
medium 3 pts

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

Acceptance Criteria
  • 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
View Full Story →
Track and Resume Onboarding Progress
medium 5 pts

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

Acceptance Criteria
  • 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
View Full Story →
Experience Organization Branding Throughout the App
medium 3 pts

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

Acceptance Criteria
  • 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
View Full Story →
Track and Resume Onboarding Progress
medium 5 pts

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

Acceptance Criteria
  • 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
View Full Story →
Switch Active Organization Context Within the App
high 5 pts

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

Acceptance Criteria
  • 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
View Full Story →
Experience Organization-Specific Terminology and Branding
high 5 pts

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

Acceptance Criteria
  • 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
View Full Story →
See Only Features Enabled for My Organization
high 5 pts

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

Acceptance Criteria
  • 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
View Full Story →
Switch Active Organization Context Within the App
high 5 pts

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

Acceptance Criteria
  • 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
View Full Story →
Experience Organization-Specific Terminology and Branding
high 5 pts

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

Acceptance Criteria
  • 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
View Full Story →
See Only Features Enabled for My Organization
high 5 pts

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

Acceptance Criteria
  • 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
View Full Story →
Switch Active Organization Context Within the App
high 5 pts

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

Acceptance Criteria
  • 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
View Full Story →
Experience Organization-Specific Terminology and Branding
high 5 pts

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

Acceptance Criteria
  • 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
View Full Story →
See Only Features Enabled for My Organization
high 5 pts

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

Acceptance Criteria
  • 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
View Full Story →
View and Select Active Organization on First Login
critical 8 pts

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

Acceptance Criteria
  • 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
View Full Story →
Have My Data Isolated from Other Organizations
critical 8 pts

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

Acceptance Criteria
  • 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
View Full Story →
View and Select Active Organization on First Login
critical 8 pts

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

Acceptance Criteria
  • 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
View Full Story →
Have My Data Isolated from Other Organizations
critical 8 pts

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

Acceptance Criteria
  • 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
View Full Story →
View and Select Active Organization on First Login
critical 8 pts

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

Acceptance Criteria
  • 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
View Full Story →
Have My Data Isolated from Other Organizations
critical 8 pts

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

Acceptance Criteria
  • 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
View Full Story →