Official SDKs for Rollgate - Feature flags made simple.
Rollgate is a feature management platform that helps teams release features safely and iterate faster. Get started using Rollgate today!
| SDK | Package | Install | Docs |
|---|---|---|---|
| Node.js | @rollgate/sdk-node | npm install @rollgate/sdk-node |
README |
| React | @rollgate/sdk-react | npm install @rollgate/sdk-react |
README |
| Vue | @rollgate/sdk-vue | npm install @rollgate/sdk-vue |
README |
| Angular | @rollgate/sdk-angular | npm install @rollgate/sdk-angular |
README |
| Svelte | @rollgate/sdk-svelte | npm install @rollgate/sdk-svelte |
README |
| Go | sdk-go | go get github.com/rollgate/sdks/packages/sdk-go |
README |
| Java | sdk-java | Maven/Gradle | README |
| Python | rollgate | pip install rollgate |
README |
| Flutter | rollgate | dart pub add rollgate |
README |
| .NET | Rollgate.SDK | dotnet add package Rollgate.SDK |
README |
| SDK | Minimum Version |
|---|---|
| Node.js | Node.js 18+ |
| React | React 16.8+ (requires Hooks) |
| Vue | Vue 3.0+ |
| Angular | Angular 14+ |
| Svelte | Svelte 4+ |
| Go | Go 1.21+ |
| Java | Java 11+ |
| Python | Python 3.9+ |
| Flutter | Dart 3.0+ / Flutter 3.0+ |
| .NET | .NET 8.0+ |
The client-side SDKs (React, Vue, Angular, Svelte) work in all modern browsers:
- Chrome (latest 2 versions)
- Firefox (latest 2 versions)
- Safari (latest 2 versions)
- Edge (latest 2 versions)
For SSE streaming support, the browser must support EventSource. All modern browsers include this natively.
Refer to the Getting Started Guide for detailed installation and setup instructions.
import { RollgateClient } from "@rollgate/sdk-node";
const client = new RollgateClient({
apiKey: "your-api-key",
});
await client.init();
if (client.isEnabled("my-feature")) {
// New feature code
}import { RollgateProvider, useFlag } from "@rollgate/sdk-react";
function App() {
return (
<RollgateProvider config={{ apiKey: "your-api-key" }}>
<MyComponent />
</RollgateProvider>
);
}
function MyComponent() {
const isEnabled = useFlag("my-feature");
return isEnabled ? <NewFeature /> : <OldFeature />;
}All SDKs support tracking conversion events for A/B testing:
// Track a conversion event
client.track({
flagKey: "checkout-redesign",
eventName: "purchase",
userId: "user-123",
value: 29.99,
});
// Flush pending events
await client.flushEvents();For other SDKs (Vue, Go, Java, Python, Flutter, .NET), see the Getting Started Guide.
All SDKs include:
- Local evaluation - Evaluate flags locally for minimal latency
- Real-time updates - SSE streaming for instant flag changes
- Caching - Built-in caching with stale-while-revalidate
- Circuit breaker - Automatic fallback on API failures
- Retry with backoff - Exponential backoff with jitter
- Event tracking - Track conversion events for A/B testing
- TypeScript support - Full type definitions (TypeScript SDKs)
| Document | Description |
|---|---|
| Getting Started | Installation and first steps |
| Architecture | SDK architecture and patterns |
| Production Setup | Best practices for production |
Full documentation available at docs.rollgate.io
Rollgate uses prefixed API keys to distinguish between server and client usage:
| Type | Prefix | Use Case |
|---|---|---|
| Server | sb_server |
Backend (Node, Go, Java, Python) |
| Client | sb_client |
Frontend (React, Vue, Angular, Svelte) |
Important: Never expose server keys in client-side code. Use client keys for browser applications.
We run integration tests for all SDKs using GitHub Actions. Tests cover flag evaluation, caching, retry logic, circuit breaker behavior, and SSE streaming. See the CI workflow for details.
We encourage pull requests and other contributions from the community. Check out our contributing guidelines for instructions on how to contribute to these SDKs.
Rollgate is a feature management platform that allows developers to ship features safely and iterate quickly. With Rollgate, you can:
- Gradual rollouts - Release features to a percentage of users and increase gradually
- User targeting - Show features to specific users based on attributes (plan, country, etc.)
- Kill switches - Instantly disable features in production without redeploying
- A/B testing - Run experiments and measure impact on key metrics
- Scheduled releases - Plan feature launches in advance
- rollgate.io - Main website
- docs.rollgate.io - Documentation
- app.rollgate.io - Dashboard
MIT License - see LICENSE for details.