Skip to main content

Platform Features (Emergency Controls)

Platform features are global kill switches that override tenant-level feature access. They allow us to quickly disable functionality across the entire platform during emergencies—such as high database load, payment provider issues, or processing backlogs.

How It Works

Platform features operate as a separate, parallel system to tenant features:

  • Checked before tenant-level features in the resolution chain
  • If disabled → feature is off for all tenants, regardless of their plan or custom settings
  • Affects the entire platform cross-tenant

Managing Platform Features

Platform features are controlled via Laravel Vapor dashboard environment variables.

Steps to change a platform feature:

  1. Go to Laravel Vapor dashboard
  2. Navigate to the environment (production/staging)
  3. Edit Environment Variables
  4. Set the variable (see pattern below)
  5. Redeploy — changes only take effect after redeployment

Environment variable pattern:

FEATURE_CONTROL_[FEATURE_NAME]=false

Example: To disable storefront search:

FEATURE_CONTROL_STOREFRONT_SEARCH=false

All platform features default to true (enabled). Only set them when you need to disable.

Available Controls

Source of truth: The definitive list lives in config/platform.php in farfalla.

Env VariablePurpose
FEATURE_CONTROL_STOREFRONT_SEARCHGlobal search functionality
FEATURE_CONTROL_STOREFRONT_SEARCH_TERMSInclude taxonomy terms in search
FEATURE_CONTROL_STOREFRONT_RECOMMENDED_ISSUESRecommendation shelf
FEATURE_CONTROL_UNLIMITED_READABLE_ISSUESRemove 500 readable issue limit
FEATURE_CONTROL_PAYMENT_SYNCPayment provider sync jobs
FEATURE_CONTROL_CHECK_MP_PAYMENTSMercadoPago recurring payment checks
FEATURE_CONTROL_IPN_PROCESSINGPayment webhook (IPN) processing
FEATURE_CONTROL_BULK_PROCESS_DEFERRED_ISSUESPDF/audiobook processing queue
FEATURE_CONTROL_BULK_PROCESS_DEFERRED_EPUBEPUB processing queue
FEATURE_CONTROL_BULK_REPROCESS_ISSUESRetry failed issue processing

When to Use

  • High database load — Disable search or recommendations to reduce query pressure
  • Payment provider issues — Disable payment sync or IPN processing during outages
  • Processing queue backlogs — Pause bulk processing jobs to let queues drain
  • Emergency feature disabling — Quickly turn off problematic functionality platform-wide
X

Graph View