Getting Started
ftureX lets you turn features on or off across environments without redeploying. Install the client, grab an API key from the dashboard, and start checking flags in your code.
1. Install
2. Get your API key
- Log in to the ftureX dashboard
- Go to your project → Environments
- Click on an environment → Apps
- Click Add App and give it a name
- Copy the generated API key
3. Start checking features
Installation
.NET SDK
Basic Setup (Standalone)
ASP.NET Core (Dependency Injection)
Register ftureX in your service container, then inject IFtureX anywhere you need it.
Then inject IFtureX anywhere:
Context-Based Evaluation
Target features to specific users, roles, or tenants:
Configuration Options
| Property | Type | Default | Description |
|---|---|---|---|
| BaseUrl | string | required | Your ftureX API URL |
| AppKey | string | required | API key from your environment |
| UseCache | bool | true | Enable in-memory caching |
| SendStatistics | bool | true | Send usage stats to ftureX |
| CacheRefreshIntervalSeconds | int | 5 | How often to refresh cached features |
| StatisticsReportIntervalSeconds | int | 30 | How often to send usage stats |
| EnableFilePersistence | bool | false | Persist cache to disk (survives restarts) |
| CacheFilePath | string | "feature-cache.json" | File path for disk persistence |
| MaxTrackedFeatures | int | 10000 | Max features tracked for background refresh |
| CleanupIntervalMinutes | int | 10 | Cleanup interval for tracking list |
| ContextCacheDurationMinutes | int | 5 | TTL for context-specific evaluations |
Fallback Behavior
IsEnabled returns the fallbackTo value (default: false). Use this to keep critical features running even during outages.Statistics
JavaScript / TypeScript SDK
Basic Setup
Configuration
| Option | Type | Default | Description |
|---|---|---|---|
| baseUrl | string | required | Your ftureX API URL |
| appKey | string | required | API key from your environment |
| sendStatistics | boolean | true | Send usage stats to ftureX |
| refreshIntervalSeconds | number | 5 | How often to refresh cached features |
| enableLocalStoragePersistence | boolean | true | Persist cache to localStorage |
| localStorageKey | string | "feature-toggle-cache" | localStorage key for persistence |
| maxTrackedFeatures | number | 10000 | Max features tracked for background refresh |
| cleanupIntervalMinutes | number | 10 | Cleanup interval for tracking list |
| contextCacheDurationMinutes | number | 5 | TTL for context-specific evaluations |
Context-Based Evaluation
Fallback Behavior
isEnabled returns the fallback value (default: false). Pass true as the second argument to keep critical features running during outages.Statistics & Cache
Context Properties
Context properties are a set of key/value pairs that you define in your own code and pass along when evaluating a feature flag. ftureX does not enforce any fixed set of property names — they can be anything that exists in your application.
Common uses include targeting a flag to specific users, subscription plans, geographic regions, or any other dimension your app already tracks. The ftureX backend receives these properties and can use them in targeting rules configured in the dashboard.
userId, plan, region) are illustrations only. Use whatever property names make sense for your application. Any string key/value pair is valid.How to Pass Context
What Properties Can You Pass?
Anything you already have access to in your code. Some examples to spark ideas:
| Example Key | Example Value | What it enables |
|---|---|---|
| userId | "user-abc" | Target a specific user (e.g. beta testers) |
| plan | "pro" | Enable a feature only for paid plans |
| region | "eu" | Roll out to one geographic region first |
| role | "admin" | Show internal tools to admins only |
| companyId | "acme-corp" | Target a specific customer/tenant |
React Integration
Provider Setup
Wrap your app with the provider:
useFeatureToggle Hook
With Context & Fallback
Multiple Features at Once
FeatureToggle Component
A declarative component that renders children when the feature is enabled, with optional fallback and loading slots:
Vue 3 Integration
Setup (Provide/Inject)
useFeatureToggle Composable
With Context
Multiple Features
FeatureToggle Component
A declarative component with named slots for each state:
REST API Reference
Authentication
Client applications authenticate using an API key passed in the X-API-Key header.
| Method | Header | Used By |
|---|---|---|
| API Key | X-API-Key: <your-app-key> | SDKs, client applications |
Get an API Key
- Log in to the ftureX dashboard
- Go to your project → Environments
- Click on an environment → Apps
- Click "Add App" and give it a name
- Copy the generated API key
Feature Evaluation (Client Endpoint)
Response: true or false
Without context (simple toggle check):
Statistics Reporting
The SDKs automatically report usage statistics. You can also send them manually:
Caching Behavior
| Type | .NET | JS / Browser |
|---|---|---|
| In-memory cache | Always on (if UseCache = true) | Always on |
| Background refresh | Every 5 sec (configurable) | Every 5 sec (configurable) |
| Disk / localStorage persistence | EnableFilePersistence = true | enableLocalStoragePersistence = true |
| Context-specific cache TTL | 5 min (configurable) | 5 min (configurable) |
| Fallback when API is down | Returns cached value, then fallbackTo | Returns cached value, then fallbackTo |
Auto Feature Discovery
When a client SDK checks a feature that doesn't exist yet in ftureX, the system can auto-create it (if enabled on the project). This means:
- Developer adds
isEnabled("new-feature")in code - First evaluation hits the API
- ftureX auto-creates the feature (disabled by default)
- Feature appears in the dashboard, ready to configure
OpenTelemetry
ftureX ships a first-class OpenTelemetry integration via a hook that attaches to every feature evaluation. It follows the OpenTelemetry semantic conventions for feature flags and emits both span events and metrics so you can observe flag behaviour directly in your existing observability stack.
Installation
Setup
What gets emitted
On every call to isEnabled the hook adds a feature_flag.evaluation event to the currently active span and increments one of two counters:
| Signal | Name | Description |
|---|---|---|
| Span event | feature_flag.evaluation | Added to the active trace span on each evaluation |
| Metric (counter) | feature_flag.evaluation_success_total | Incremented on every successful evaluation |
| Metric (counter) | feature_flag.evaluation_error_total | Incremented when an evaluation throws an error |
Span event attributes
| Attribute | Always present | Description |
|---|---|---|
| feature_flag.key | Yes | The feature flag name |
| feature_flag.provider.name | Yes | Always "FtureX" |
| feature_flag.result.reason | Yes | static · targeting_match · default · error · stale · disabled |
| feature_flag.result.value | No | The evaluated value ("true"/"false") — only when recordFlagValue = true |
| feature_flag.set.id | No | Flag set identifier — only when setId is configured |
| feature_flag.context.id | No | userId or tenantId from the evaluation context, when present |
| error.type | No | Exception type name — only on error evaluations |
Configuration options
| Option | Type | Default | Description |
|---|---|---|---|
| addSpanEvents / AddSpanEvents | bool | true | Add a span event to the active trace span on each evaluation |
| addMetrics / AddMetrics | bool | true | Emit evaluation success/error counters as OTel metrics |
| recordFlagValue / RecordFlagValue | bool | false | Include the evaluated flag value in span event attributes |
| setId / SetId | string | null | Optional identifier for the flag set or environment |
recordFlagValue set to false (the default) unless you need it — flag values can be considered sensitive in some compliance contexts, and omitting them keeps your traces leaner.Vibe Coder Prompt
Building with an AI coding assistant? Copy this prompt, fill in the two placeholders, and paste it into your chat. The assistant reads the docs itself and picks the right SDK for whatever framework you're already using — React, Vue, .NET, or plain JS.
[DESCRIBE YOUR FEATURE HERE] and [your-feature-name] before sending. That's it.Lifecycle
Lifecycle tracks the state of every feature flag from the moment it is created to the moment it is removed. The goal is to prevent flag debt — old toggles that get forgotten in the codebase long after they served their purpose.
Feature States
Every flag moves through a simple set of states inside the ftureX dashboard:
| State | What it means |
|---|---|
| Active | The flag is live and being evaluated by your app. |
| Stale | The flag has not been evaluated for a while. ftureX flags it for review. |
| Archived | The flag has been disabled and marked for cleanup. No longer evaluated. |
How to Configure
Lifecycle settings live at the project level in the ftureX dashboard:
- Log in to the ftureX dashboard and open your project
- Go to Project Settings → Lifecycle
- Set your Staleness window — how many days of inactivity before a flag is marked stale
- Choose whether you want email notifications when flags go stale
- Save your settings
| Setting | Default | Description |
|---|---|---|
| Staleness window | 30 days | Days without an evaluation before a flag is marked stale |
| Stale notifications | Off | Send an email when a flag transitions to Stale |
| Auto-archive stale flags | Off | Automatically archive flags that have been stale for a set number of additional days |
GitHub Integration
Connecting ftureX to your GitHub repository lets you link feature flags to branches and pull requests. When a PR is merged, ftureX can automatically mark the associated flag for review — so cleanup happens as part of your normal workflow, not months later.
Step 1 — Connect your repository
- In the ftureX dashboard, go to Project Settings → GitHub
- Click Connect GitHub and authorise ftureX to access your repositories
- Select the repository you want to link
- Copy the Webhook Secret that is generated — you will need it in the next step
Step 2 — Add the webhook in GitHub
- Go to your GitHub repository → Settings → Webhooks → Add webhook
- Fill in the fields as shown below and click Add webhook
Step 3 — Link flags to branches or PRs
Once connected, open any feature flag in the dashboard and you will see a GitHub tab. Type the branch or PR number you want to associate with the flag. From that point on:
- The flag detail page shows the current status of the linked PR
- When the PR is merged, ftureX marks the flag as ready for cleanup
- You receive a notification (if enabled) to remind you to remove the flag from your code
Self-hosted setup
If you are running ftureX on your own servers, add the following environment variables before setting up the webhook:
MCP Server
What is an MCP Server?
MCP stands for Model Context Protocol -- it's a standard that lets AI assistants like Claude talk directly to external tools and services. The ftureX MCP server means you can manage your feature flags just by chatting with an AI agent. No dashboard, no code changes -- just tell it what you want and it happens.
Hosted Endpoint
The MCP server is live at https://api.fturex.com/mcp. You can connect right now without installing or self-hosting anything.
Connecting in Claude Desktop
- Open Claude Desktop
- Go to Settings → Connectors → Add custom connector
- Paste the URL:
https://api.fturex.com/mcp - Save and restart Claude Desktop — ftureX will appear as a connected tool
Connecting in Cursor
Add the following to your Cursor MCP config:
.cursor/mcp.json in your project root, then reload Cursor.Authentication
After connecting, the MCP server will ask for your ftureX credentials -- either your email and password, or an API token. You only need to authenticate once per session.
What You Can Do
Once connected, you can talk to your AI agent in plain English. For example:
- “List all features in my production environment”
- “Enable the new-checkout feature”
- “Show me which features are currently disabled”
- “Create a new feature flag called dark-mode”
- “Toggle the beta-ui feature off”
https://api.fturex.com/mcp.