> ## 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.

# Setup

> Get started with FlagSync SDKs for your application.

## Getting Started with SDKs

<Card title="Want code instead?" icon="lightbulb" horizontal>
  Check out the SDK examples at [https://github.com/flagsync/sdk-examples](https://github.com/flagsync/sdk-examples)!
</Card>

<Steps titleSize="h3">
  <Step title="SDK Type">
    Choose client-side or server-side—e.g., web apps may need both for SSR.

    <CardGroup cols={2}>
      <Card title="Client-Side" icon="browser" href="/sdks/types#client-side-sdks">
        For single-user contexts (e.g., web/mobile apps).
      </Card>

      <Card title="Server-Side" icon="server" href="/sdks/types#server-side-sdks">
        For multi-user contexts (e.g., web servers, APIs).
      </Card>
    </CardGroup>
  </Step>

  <Step title="Framework Support">
    FlagSync supports JavaScript in various forms:

    <CardGroup cols={4}>
      <Card href="/sdks-client-side/javascript">
        <div className="w-full flex justify-center flex-col items-center p-4">
          <img alt="User segment targeting rule creation" src="https://mintcdn.com/flagsync/dTCxWdoh9aH45uVC/images/sdk-js.png?fit=max&auto=format&n=dTCxWdoh9aH45uVC&q=85&s=daa64900605e8bbea8e4ff613f918cda" className="h-12 mb-2" width="70" height="70" data-path="images/sdk-js.png" />

          <p>JavaScript</p>
        </div>
      </Card>

      <Card href="/sdks-client-side/react">
        <div className="w-full flex justify-center flex-col items-center p-4">
          <img alt="User segment targeting rule creation" src="https://mintcdn.com/flagsync/dTCxWdoh9aH45uVC/images/sdk-react.svg?fit=max&auto=format&n=dTCxWdoh9aH45uVC&q=85&s=db45fc5beb938fa050cec497c785fe97" className="h-12 mb-2" width="80" height="71" data-path="images/sdk-react.svg" />

          <p>React</p>
        </div>
      </Card>

      <Card href="/sdks-server-side/nodejs">
        <div className="w-full flex justify-center flex-col items-center p-4">
          <img alt="User segment targeting rule creation" src="https://mintcdn.com/flagsync/dTCxWdoh9aH45uVC/images/sdk-nodejs.svg?fit=max&auto=format&n=dTCxWdoh9aH45uVC&q=85&s=c4e86611e51f0a201e2b7c8593692c08" className="h-12 mb-2" width="80" height="91" data-path="images/sdk-nodejs.svg" />

          <p>Node.js</p>
        </div>
      </Card>

      <Card href="/sdks-server-side/nextjs">
        <div className="w-full flex justify-center flex-col items-center p-4">
          <img alt="User segment targeting rule creation" src="https://mintcdn.com/flagsync/dTCxWdoh9aH45uVC/images/sdk-nextjs.svg?fit=max&auto=format&n=dTCxWdoh9aH45uVC&q=85&s=9f7ce1b7d070119e6029f79cf7ee6c0f" className="h-12 mb-2" width="80" height="80" data-path="images/sdk-nextjs.svg" />

          <p>Next.js</p>
        </div>
      </Card>

      <Card href="/sdks-server-side/nestjs">
        <div className="w-full flex justify-center flex-col items-center p-4">
          <img alt="User segment targeting rule creation" src="https://mintcdn.com/flagsync/dTCxWdoh9aH45uVC/images/sdk-nestjs.svg?fit=max&auto=format&n=dTCxWdoh9aH45uVC&q=85&s=b5eb4ec68d99ce0093e82fc3e589f5d8" className="h-12 mb-2" width="94" height="91" data-path="images/sdk-nestjs.svg" />

          <p>Nest.js</p>
        </div>
      </Card>
    </CardGroup>

    <Tip>
      Contact <a href="mailto:support@flagsync.com">FlagSync Support</a> for other languages.
    </Tip>
  </Step>

  <Step title="Security">
    * Use **client-side** keys (`pk_test_ABC...`) for web/mobile apps.
    * Keep **server-side** keys (`sk_test_DEF...`) private to protect sensitive flag rules.
  </Step>
</Steps>

## Initialization

* SDK initialization happens asynchronously—response time, usually 30-50 milliseconds, depends on flag count and ruleset complexity.
* Use a singleton pattern to avoid memory leaks—SDKs like Nest.js handle this automatically; others require manual setup.

<Warning>
  Creating multiple instances can lead to memory leaks and orphaned connections.
</Warning>

## Next Steps

Set up and explore FlagSync SDKs:

* Learn SDK differences in [Types](/sdks/types).
* Understand evaluation in [Flag Evaluation](/sdks-flag-evaluation/overview).
* Start with [Quickstart: SDK](/quickstarts/sdk).
