See Only Features Enabled for My Organization
Different organizations have contracted different feature sets, and some features are in staged rollout. The feature flag system evaluates which features are active for the current organization and user role, then the feature-gate-widget wraps UI elements so that disabled features are hidden entirely rather than shown as greyed-out. Feature flags are fetched at session initialization, cached locally, and periodically refreshed. This system is critical for the incremental rollout strategy agreed upon by all organizations — they must be able to introduce the app gradually without exposing unfinished features.
User Story
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
- Given feature flags are cached, when the app is foregrounded after a configurable interval, then the flags are refreshed in the background without blocking the UI
- Given an organization enables a previously disabled feature, when the peer mentor restarts or refreshes the app, then the newly enabled feature becomes visible without requiring a reinstall
Business Value
The incremental rollout strategy was identified as a critical requirement by all three organizations — none can tolerate a hard cutover from their existing systems. Feature flags enable safe, controlled rollouts where the app can be deployed to production while features are activated per organization on their own timeline. This also allows A/B testing of features and rapid deactivation if issues arise, protecting organizational trust during the adoption phase.
Components
- Tenant Context Service service
- Feature Flag Provider infrastructure
- FeatureGate Widget ui
- Feature Flag Provider infrastructure
- Rollout Condition Evaluator service
- Feature Flag Repository data
- Feature Flag Local Cache data
- Feature Flag Key Constants infrastructure
- Feature Flag Initializer infrastructure