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

# Overview

> Understand the key concepts of FlagSync SDKs for feature management.

## SDK Concepts

FlagSync SDKs enable feature management across platforms:

<CardGroup cols={2}>
  <Card title="Setup" icon="rocket" href="/sdks/setup">
    Learn the prerequisites and initialization process for SDKs.
  </Card>

  <Card title="SDK Types" icon="server" href="/sdks/types">
    Explore client-side and server-side SDK differences.
  </Card>

  <Card title="Flag Evaluation" icon="gear" href="/sdks-flag-evaluation/overview">
    Understand how FlagSync evaluates flags for users.
  </Card>

  <Card title="FlagSync CLI" icon="terminal" href="/sdks-cli/overview">
    Learn how FlagSync CLI provides type safety in your application.
  </Card>
</CardGroup>

## SDK Best Practices

The [FlagSync CLI](/sdks-cli/overview) generates TypeScript types from your feature flag config.

* IntelliSense autocompletion (e.g., `client.flag(...)`, `useFlag(...)`)
* Compile-time safety.
* Confidence that your code matches your flags.

## User Context Best Practices

When defining the user context for flag evaluations, always provide a unique and persistent `key` in the `FsUserContext` object to ensure accurate billing and consistent flag behavior:

* **Billing Impact**: FlagSync tracks monthly active users (MAUs) based on unique `key` values, which are limited by your pricing tier. Non-unique or non-persistent keys (e.g., hardcoding `'anonymous'` or generating a new ID per request) can undercount or overcount MAUs, affecting billing accuracy.
* **Functionality Impact**: During percentage rollouts, FlagSync uses the user context for deterministic hashing to ensure the same user receives consistent flag values across sessions. Non-persistent keys cause inconsistent flag evaluations, disrupting rollout behavior.

<Warning>
  Avoid hardcoding `key` values like `'anonymous'` or generating a new ID on every request (e.g., calling `nanoid()` without persistence). Instead, use a persistent identifier, such as a cookie for unauthenticated users (e.g., `visitor-id`), to ensure accurate MAU tracking and consistent flag evaluations.
</Warning>
