SDK Overview
Featureflip provides server-side and client-side SDKs. Pick the one that matches where your code runs.
Which SDK should I use?
Section titled “Which SDK should I use?”Are you evaluating flags in a backend service (Node.js, Python, C#, Java, Go, PHP, Ruby)? → Use a server-side SDK.
Are you evaluating flags in a browser or frontend app? → Using React? Use the React SDK. → Any other framework (or no framework)? Use the JavaScript / TypeScript SDK.
Are you evaluating flags in a mobile app? → iOS / macOS / tvOS / watchOS? Use the Swift SDK. → Flutter? Use the Flutter SDK. → Android? Use the Android SDK.
Client-side vs server-side
Section titled “Client-side vs server-side”| Server-side | Client-side | |
|---|---|---|
| Use case | Backend services, APIs, server-rendered pages | Browser apps, SPAs, frontend frameworks |
| SDK key | Server SDK key — keep secret, never expose to users | Client SDK key — safe to embed in frontend code |
| Flag visibility | All flags in the project | Only flags marked Client-side visible |
| Evaluation context | Multi-user — pass a different context per evaluation call | Single-user — set context once, call identify() on login |
| Real-time updates | SSE streaming or polling | SSE streaming |
| Security | Key stays on your server | Key is public by design — only exposes client-visible flag values |
SDK keys
Section titled “SDK keys”Server-side and client-side SDKs use different keys. You can find both in your project settings.
- Server SDK keys have access to all flags and should never be included in client-side bundles.
- Client SDK keys only return flags explicitly marked as “Client-side visible” in the dashboard. They are safe to ship in browser code.
Client-side SDK quick start
Section titled “Client-side SDK quick start”JavaScript / TypeScript SDK
Section titled “JavaScript / TypeScript SDK”npm install @featureflip/browser-sdkimport { FeatureflipClient } from '@featureflip/browser-sdk';
const client = FeatureflipClient.get({ clientKey: 'your-client-sdk-key',});
await client.initialize();
const showBanner = client.boolVariation('show-banner', false);See the full JavaScript / TypeScript SDK reference.
React SDK
Section titled “React SDK”npm install @featureflip/react-sdk @featureflip/browser-sdkimport { FeatureflipProvider, useFeatureFlag } from '@featureflip/react-sdk';
function App() { return ( <FeatureflipProvider clientKey="your-client-sdk-key"> <Banner /> </FeatureflipProvider> );}
function Banner() { const showBanner = useFeatureFlag('show-banner', false); if (!showBanner) return null; return <div>New feature available!</div>;}See the full React SDK reference.
Swift SDK
Section titled “Swift SDK”In Xcode: File → Add Package Dependencies, then enter the repository URL.
import Featureflip
let config = FeatureflipConfig(clientKey: "your-client-sdk-key")let client = FeatureflipClient(config: config)await client.initialize()
let showBanner = client.boolVariation("show-banner", default: false)See the full Swift SDK reference.
Android SDK
Section titled “Android SDK”dependencies { implementation("io.featureflip:featureflip-android:1.0.0")}import io.featureflip.android.FeatureflipClientimport io.featureflip.android.FeatureflipConfig
val config = FeatureflipConfig(clientKey = "your-client-sdk-key")val client = FeatureflipClient.create(config)client.initialize()
val showBanner = client.boolVariation("show-banner", false)See the full Android SDK reference.
Server-side SDKs
Section titled “Server-side SDKs”These SDKs use server SDK keys and are intended for backends or other controlled environments.
Client-side SDKs
Section titled “Client-side SDKs”- JavaScript / TypeScript — framework-agnostic, works with any frontend
- React SDK — React bindings with provider and hooks
- Swift SDK — iOS, macOS, tvOS, and watchOS
- Flutter SDK — cross-platform Flutter apps
- Android SDK — Android and Kotlin/JVM
See also
Section titled “See also”- What Are Feature Flags? — understand flag types and variations
- Environments — how SDK keys connect to environments
- Evaluation API — REST API reference for building custom integrations
- How to Manage Environments — create environments and SDK keys