Welcome to the comprehensive documentation for Featury, a flexible Ruby gem for managing feature flags with powerful organization capabilities.
- Getting Started - Installation, setup, and your first feature
- Features - Defining features with prefixes and descriptions
- Groups - Organizing features into hierarchical groups
- Actions - Defining custom actions for feature management
- Resources - Type-safe resource definitions with Servactory
- Conditions - Adding conditional logic to features
- Working with Features - Practical usage patterns and examples
- Info and Introspection - Inspecting features, actions, and resources
- Integration - Backend storage implementations (Flipper, Redis, Database, HTTP APIs)
- Examples - Real-world examples and use cases
- Best Practices - Recommended patterns and conventions
Featury is a feature flag management library that provides:
- Unified Interface: Manage multiple feature flags through a single class
- Flexible Backend: Works with Flipper, Redis, databases, HTTP APIs, or any custom solution
- Hierarchical Organization: Group related features with automatic prefix management
- Type Safety: Built on Servactory for robust resource validation
- Lifecycle Hooks: Before/after callbacks with customizable scope
- Rich Introspection: Complete visibility into your feature configuration
Visit featury.servactory.com for comprehensive guides, API documentation, and tutorials.
Featury is built around several key concepts:
- Base Class:
ApplicationFeaturedefines how features interact with your storage backend - Feature Classes: Inherit from
ApplicationFeatureand define specific features - Actions: Custom methods that operate on feature collections (e.g.,
enabled?,enable,disable) - Resources: Type-safe inputs validated through Servactory
- Groups: Nested feature hierarchies for organization
- Conditions: Lambda-based validation logic
Featury follows these design principles:
- Backend Agnostic: Actions receive feature names and options - you decide how to store them
- Convention over Configuration: Automatic prefix generation from class names
- Composability: Combine features, groups, resources, and conditions
- Transparency: Full introspection through the
infoAPI - Type Safety: Leverage Servactory's resource validation
- Read through the documentation in order for a complete understanding
- Check Examples for real-world use cases
- Review Best Practices for recommended patterns
- Open an issue on GitHub for bugs or questions
We welcome contributions! Please see our Contributing Guide for details.