feature flags
This commit is contained in:
79
apps/api/src/config/features.config.ts
Normal file
79
apps/api/src/config/features.config.ts
Normal file
@@ -0,0 +1,79 @@
|
||||
import { FeatureFlagConfig } from './feature-types';
|
||||
|
||||
/**
|
||||
* Feature flag configuration for all environments
|
||||
* This provides type safety, IntelliSense, and environment-specific settings
|
||||
*/
|
||||
export const featureConfig: FeatureFlagConfig = {
|
||||
// Development environment - features for local development
|
||||
development: {
|
||||
sponsors: {
|
||||
portal: 'enabled',
|
||||
dashboard: 'enabled',
|
||||
management: 'enabled',
|
||||
},
|
||||
admin: {
|
||||
dashboard: 'enabled',
|
||||
userManagement: 'enabled',
|
||||
analytics: 'enabled',
|
||||
},
|
||||
beta: {
|
||||
newUI: 'enabled', // Enable new UI for testing
|
||||
experimental: 'coming_soon',
|
||||
},
|
||||
},
|
||||
|
||||
// Test environment - features for automated tests
|
||||
test: {
|
||||
sponsors: {
|
||||
portal: 'enabled',
|
||||
dashboard: 'enabled',
|
||||
management: 'enabled',
|
||||
},
|
||||
admin: {
|
||||
dashboard: 'enabled',
|
||||
userManagement: 'enabled',
|
||||
analytics: 'enabled',
|
||||
},
|
||||
beta: {
|
||||
newUI: 'disabled',
|
||||
experimental: 'disabled',
|
||||
},
|
||||
},
|
||||
|
||||
// Staging environment - features for pre-production testing
|
||||
staging: {
|
||||
sponsors: {
|
||||
portal: 'enabled',
|
||||
dashboard: 'enabled',
|
||||
management: 'enabled',
|
||||
},
|
||||
admin: {
|
||||
dashboard: 'enabled',
|
||||
userManagement: 'enabled',
|
||||
analytics: 'enabled',
|
||||
},
|
||||
beta: {
|
||||
newUI: 'coming_soon', // Ready for testing but not fully rolled out
|
||||
experimental: 'hidden',
|
||||
},
|
||||
},
|
||||
|
||||
// Production environment - stable features only
|
||||
production: {
|
||||
sponsors: {
|
||||
portal: 'enabled',
|
||||
dashboard: 'enabled',
|
||||
management: 'disabled', // Feature not ready yet
|
||||
},
|
||||
admin: {
|
||||
dashboard: 'enabled',
|
||||
userManagement: 'enabled',
|
||||
analytics: 'disabled', // Feature not ready yet
|
||||
},
|
||||
beta: {
|
||||
newUI: 'disabled',
|
||||
experimental: 'hidden',
|
||||
},
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user