> ## Documentation Index
> Fetch the complete documentation index at: https://docs.growthbook.io/llms.txt
> Use this file to discover all available pages before exploring further.

# SDK Overview

> Choose a GrowthBook SDK for JavaScript, React, Python, Node.js, mobile, or the edge to evaluate flags and run experiments.

GrowthBook SDKs are lightweight libraries that let you use feature flags and run experiments in your application. They handle feature evaluation and assignment logic.

## What SDKs Do

The SDK has two main responsibilities:

1. **Fetch features from the API**: The SDK downloads your feature definitions from GrowthBook and caches them for fast access.

2. **Evaluate features**: Using attributes you provide (like user ID, country, or subscription plan), the SDK evaluates your targeting rules and returns the appropriate feature values. This evaluation happens wherever the SDK runs—in the browser, on your server, or at the edge.

## Running Experiments

To measure experiment results, the SDK needs to log which variation was assigned. This is done through a tracking callback—a function you provide that sends assignment data via your event tracking system (like Segment, Mixpanel, or GA4).

Without a tracking callback, the SDK will still assign variations and your features will work, but you won't be able to analyze experiment results in GrowthBook.

All SDKs use the same assignment logic, so the same attributes always produce the same variation regardless of which SDK you use. Each SDK has documentation on setting up tracking callbacks, and many offer [pre-built integrations](https://docs.growthbook.io/lib/js.md#plugins) with popular analytics tools.

## Choosing the Right SDK

The main differences between SDK types are where they run and what problems they solve best.

### Client SDKs

**Where they run:** In the browser or mobile device

**Best for:** UI changes, visual experiments, and frontend feature flags

**Trade-offs:**

* Easy integration with frontend frameworks
* Feature rules are visible to users (see [remote evaluation](https://docs.growthbook.io/lib/js.md#remote-evaluation) if you need to keep rules private)
* Can show a brief flicker while experiments load asynchronously (see our recommended anti-flicker techniques)

**Common use cases:** Rolling out a new dashboard design, testing button colors, showing features based on user plan

**SDKs:** [JavaScript](https://docs.growthbook.io/lib/js.md), [React](https://docs.growthbook.io/lib/react.md), [Vue](https://docs.growthbook.io/lib/vue.md), [Swift](https://docs.growthbook.io/lib/swift.md), [Kotlin](https://docs.growthbook.io/lib/kotlin.md), [Flutter](https://docs.growthbook.io/lib/flutter.md), [React Native](https://docs.growthbook.io/lib/react-native.md)

### Server SDKs

**Where they run:** On your backend infrastructure

**Best for:** Backend logic, API responses, or when you need to keep targeting rules private

**Trade-offs:**

* Keeps feature logic and rules private
* No visual flicker
* Requires infrastructure to run (not just a script tag)
* Need to pass evaluation results to the frontend if UI changes are required
* May need to extract attributes from cookies, headers, or tokens

**Common use cases:** Testing a new recommendation algorithm, rolling out API changes, experimenting with pricing tiers, ML model rollouts

**SDKs:** [Node.js](https://docs.growthbook.io/lib/node.md), [Python](https://docs.growthbook.io/lib/python.md), [Ruby](https://docs.growthbook.io/lib/ruby.md), [PHP](https://docs.growthbook.io/lib/php.md), [Java](https://docs.growthbook.io/lib/java.md), [Go](https://docs.growthbook.io/lib/go.md), [C#](https://docs.growthbook.io/lib/csharp.md), [Elixir](https://docs.growthbook.io/lib/elixir.md)

### Edge SDKs

**Where they run:** On edge platforms/CDNs (Cloudflare Workers, Fastly Compute, Lambda\@Edge)

**Best for:** Eliminating flicker for visual experiments or doing redirects before your application server handles the request

**Trade-offs:**

* Eliminates flicker for visual experiments and redirects
* Can inject feature data into HTML for the frontend to use
* More complex setup and integration
* Resource constraints (CPU/memory limits)

**Common use cases:** A/B testing landing pages without flicker, geo-based redirects, paywall experiments

**SDKs:** [Cloudflare Workers](https://docs.growthbook.io/lib/edge/cloudflare.md), [Fastly Compute](https://docs.growthbook.io/lib/edge/fastly.md), [Lambda@Edge](https://docs.growthbook.io/lib/edge/lambda.md)

> [!TIP]
>
> **Not sure which to choose?**
>
> **Most users start with a client SDK**. They're the easiest to implement and work great for UI changes and experiments.

## Getting Started

Choose your SDK below to see installation and setup instructions:

### Client

> **[HTML Script Tag](https://docs.growthbook.io/lib/script-tag.md)**
>
> Drop-in script for any website or low-code platform

> **[JavaScript](https://docs.growthbook.io/lib/js.md)**
>
> Vanilla JS and TypeScript projects

> **[React](https://docs.growthbook.io/lib/react.md)**
>
> React hooks and providers with SSR support

> **[Next.js](https://github.com/growthbook/examples/tree/main/next-js)**
>
> App/Pages router examples (with support for SSR)

> **[Vue](https://docs.growthbook.io/lib/vue.md)**
>
> Vue 3 with composables and Nuxt support

> **[Kotlin (Android)](https://docs.growthbook.io/lib/kotlin.md)**
>
> Native Android development

> **[Flutter](https://docs.growthbook.io/lib/flutter.md)**
>
> Cross-platform mobile apps

> **[Swift (iOS)](https://docs.growthbook.io/lib/swift.md)**
>
> Native iOS development

> **[React Native](https://docs.growthbook.io/lib/react-native.md)**
>
> Cross-platform React Native apps

### Server

> **[Node.js](https://docs.growthbook.io/lib/node.md)**
>
> Express, Fastify, and Node.js servers

> **[PHP](https://docs.growthbook.io/lib/php.md)**
>
> Laravel, Symfony, and PHP applications

> **[Ruby](https://docs.growthbook.io/lib/ruby.md)**
>
> Rails and Ruby applications

> **[Python](https://docs.growthbook.io/lib/python.md)**
>
> Flask, Django, FastAPI, and async support

> **[Java](https://docs.growthbook.io/lib/java.md)**
>
> Spring Boot and Java applications

> **[C#](https://docs.growthbook.io/lib/csharp.md)**
>
> .NET Core and ASP.NET applications

> **[Go](https://docs.growthbook.io/lib/go.md)**
>
> High-performance Go services

> **[Elixir](https://docs.growthbook.io/lib/elixir.md)**
>
> Phoenix and Elixir applications

> **[Rust](https://docs.growthbook.io/lib/rust.md)**
>
> Actix, Axum, Rocket, and more

> **[Vercel](https://docs.growthbook.io/lib/nextjs.md)**
>
> Vercel Flags SDK with Edge Config

### Edge

> **[Cloudflare Workers](https://docs.growthbook.io/lib/edge/cloudflare.md)**
>
> Low-latency edge computing on Cloudflare's network

> **[Fastly Compute](https://docs.growthbook.io/lib/edge/fastly.md)**
>
> WebAssembly-powered edge computing

> **[Lambda@Edge](https://docs.growthbook.io/lib/edge/lambda.md)**
>
> AWS Lambda at CloudFront edge locations

***

🛠️ **Want to build your own SDK?**\
Follow our [guide to integrate GrowthBook into any platform](https://docs.growthbook.io/lib/build-your-own.md).
