ModulesDecision memoUpdated 2026-03-02

Feature Management

Define, categorize, and enforce Boolean, Numeric, and String features with automatic quota tracking and high-performance caching.

Buyer-readyFounder-grade detailModules

Features are the atomic building blocks of your entitlements system. Every capability that can be toggled, limited, or configured per plan is defined as a Feature. The system supports three value types, automatic seeding, and real-time quota enforcement.

Feature Value Types

Each feature has a specific value type that determines how it is evaluated, stored, and enforced across editions and overrides.

TypeValuesExampleEnforcement
Booleantrue / falseApiAccess, CustomDomain, SSOFeature gate: allow or block
NumericInteger valueMaxUsers: 50, StorageGB: 100QuotaCounter: auto-reject when exceeded
StringFree textSupportTier: 'Priority', Theme: 'dark'Configuration value, no enforcement

System vs Custom Features

  • System Features

    Pre-seeded at application startup. Immutable and always present. Define the core capabilities of your platform (e.g., MaxUsers, ApiAccess).

  • Custom Features

    Created by administrators at runtime via the API. Perfect for module-specific features that evolve as your product grows.

Automatic Quota Enforcement

Numeric features can have associated QuotaCounter entities that track real-time usage. When a command implements IRequireFeature for a numeric feature, the FeatureCheckBehavior pipeline automatically compares the current count against the allowed limit.

Quota Enforcement Flow
Create Entity Command
FeatureCheckBehavior
Check QuotaCounter
Under limit
Execute ✓
Quota Exceeded ✗

High-Performance Feature Caching

Resolved feature values are aggressively cached per-tenant to ensure zero-latency authorization checks. The cache is automatically invalidated whenever editions, subscriptions, or overrides change.

  • Sub-Millisecond Lookups

    Resolved features are cached in-memory per tenant. Pipeline checks complete in microseconds, not milliseconds.

  • Automatic Invalidation

    Any change to editions, subscriptions, or overrides immediately invalidates the affected tenant's feature cache.

API Endpoints

MethodEndpointDescriptionAuth
GET/api/featuresList all features🔒 Required
POST/api/featuresCreate custom feature🔒 Required
PUT/api/features/{id}Update feature🔒 Required
DELETE/api/features/{id}Delete custom feature🔒 Required
GET/api/features/resolvedGet resolved features for current tenant🔒 Required