Skip to main content

Getting Started with SDKs

Want code instead?

Check out the SDK examples at https://github.com/flagsync/sdk-examples!
1

SDK Type

Choose client-side or server-side—e.g., web apps may need both for SSR.

Client-Side

For single-user contexts (e.g., web/mobile apps).

Server-Side

For multi-user contexts (e.g., web servers, APIs).
2

Framework Support

FlagSync supports JavaScript in various forms:

User segment targeting rule creation

JavaScript

User segment targeting rule creation

React

User segment targeting rule creation

Node.js

User segment targeting rule creation

Next.js

User segment targeting rule creation

Nest.js

Contact FlagSync Support for other languages.
3

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.

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.
Creating multiple instances can lead to memory leaks and orphaned connections.

Next Steps

Set up and explore FlagSync SDKs: