Skip to content

Feature Flags & Config

Overview

Power-Rent uses a comprehensive feature flags system to control feature rollouts, manage paid functionality, and support database migrations. The system integrates multiple providers and identification strategies.

Architecture

Primary Providers:

  • Statsig via statsig-node-lite (server) and @flags-sdk/statsig adapter
  • flags/next for Next.js integration
  • feature-gate custom library for plan-based paid features

User Identification:

  • Stable ID system using cookies for consistent flag evaluation
  • Identity payload feeds into Statsig for targeting

Key Flag Categories:

  • Infrastructure flags (postgresEnabled)
  • Migration flags (entity-by-entity Fauna → Postgres migration)
  • Product/feature flags (customersExport, etc.)

For detailed implementation, usage examples, and configuration instructions, see: docs/technical/flags/flags-documentation.md