Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RolloutCtrl JS Core

Monorepository for the RolloutCtrl JavaScript/TypeScript SDK ecosystem — feature flag and action evaluation platform with local evaluation, metric aggregation, and framework integrations.

Packages

Package Description
@rolloutctrl/evaluator Pure, dependency-free evaluation engine. Strategies, segments, rules, percentage rollouts, variant assignment. No networking or I/O.
@rolloutctrl/js-sdk Browser-focused SDK. Local evaluation, config polling, localStorage persistence, metric aggregation, context resolution.
@rolloutctrl/node-sdk Server-side Node.js SDK. Local evaluation, config polling, metric aggregation. Uses Node.js APIs (node:events, fetch).
@rolloutctrl/react-sdk React integration layer. Hooks (useFlag, useVariant, usePermission) and components (Flag, Permission). Thin wrapper over @rolloutctrl/js-sdk.

Examples

  • nodejs-express — Express app using @rolloutctrl/node-sdk for feature flag evaluation.
  • vite-react-ts — Vite + React + TypeScript app using @rolloutctrl/react-sdk and @rolloutctrl/js-sdk.
  • html — Plain HTML page using @rolloutctrl/js-sdk directly from a CDN, no bundler or build step.

Architecture

@rolloutctrl/evaluator  (pure evaluation engine, no dependencies)
        ▲
        │
@rolloutctrl/js-sdk  (browser)     @rolloutctrl/node-sdk  (server)
        ▲
        │
@rolloutctrl/react-sdk  (React hooks & components)

All SDKs perform local evaluation — no HTTP request is made per flag check. Configuration is fetched on startup and polled at a configurable interval. Metrics (flag exposures, strategy matches, variant exposures) are aggregated with deduplication and flushed periodically.

Tooling

  • Package manager: Yarn 4 (Berry) with node-modules linker
  • Build: tsup (CJS + ESM + dts)
  • Test: Jest
  • Lint: tsc --noEmit
  • Language: TypeScript 5+

Getting Started

# Install dependencies
yarn install

# Build all packages
yarn build

# Run all tests
yarn test

# Lint all packages
yarn lint

Working with a single package

# Build
yarn workspace @rolloutctrl/evaluator build

# Test
yarn workspace @rolloutctrl/js-sdk test

# Watch mode
yarn workspace @rolloutctrl/node-sdk test:watch

License

MIT

About

Core packages and SDKs for the RolloutCtrl ecosystem, including the evaluator engine, client and server SDKs, React integrations, and shared utilities.

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages