FlorianRappl / featurevisor

Git-based feature flags and experimentation management solution for developers

Home Page:https://featurevisor.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Featurevisor

Feature management for developers

Manage your feature flags and experiments declaratively from the comfort of your git workflow.


What is Featurevisor?

Featurevisor is a solution for managing your feature flags, experiments, and remote config. It's built for developers, by developers.

It introduces a workflow that's fully git-based, where configuration is stored as YAMLs and changes are reviewed and merged via pull requests.

The workflow results into datafiles (JSON files), that contain your feature configurations. These datafiles can then be fetched by your applications and evaluated using Featurevisor SDKs.

More documentation available at https://featurevisor.com.

Quick start

You are recommended to see a more detailed quick start guide here: https://featurevisor.com/docs/quick-start/.

The whole process can be broken down into 3 parts:

Part 1: Create a Featurevisor project

Install Featurevisor CLI globally (or use npx @featurevisor/cli):

$ npm install -g @featurevisor/cli

Initialize a new Featurevisor project:

$ mkdir my-featurevisor-project && cd my-featurevisor-project
$ featurevisor init

You can now create and manage your feature flags, experiments, and remote config in this directory expressed as YAMLs.

See the building block guides here:

  • Attributes: building block for conditions
  • Segments: conditions for targeting users
  • Features: feature flags and variables with rollout rules

Part 2: Build and deploy datafiles

Once the project is ready, you can build your datafiles (JSON files containing configuration of your feature flags):

$ featurevisor build

You will find the output in dist directory, that you can upload to your CDN.

See further guides here:

A fully functioning example for deploying with Cloudflare and GitHub Actions (for free) is available here.

Part 3: Consume datafiles with Featurevisor SDKs

You can now consume the datafiles from your CDN in your applications directly using Featurevisor SDKs.

For Node.js and browser environments, install the JavaScript SDK:

$ npm install --save @featurevisor/sdk

Now you can initialize the SDK with the URL of your datafile, and evaluate your feature flags:

import { createInstance } from "@featurevisor/sdk";

// Initialize the SDK
const sdk = createInstance({
  datafileUrl: "https://cdn.yoursite.com/datafile.json",
  onReady: () => console.log("Datafile has been fetched and SDK is ready"),
});

// Evaluate a feature flag
const isFeatureEnabled = sdk.getVariation(
  // feature key
  "my-feature",

  // attributes
  {
    userId: "user-123",
    country: "nl",
  }
);

Learn more about SDK usage here: https://featurevisor.com/docs/sdks/.

Packages

Package Description
@featurevisor/cli CLI package
@featurevisor/core Core package used by CLI
@featurevisor/types Common typings
@featurevisor/sdk Universal SDK for both Node.js and browser
@featurevisor/react React package
@featurevisor/site Static site generator for your project

License

MIT © Fahad Heylaal

About

Git-based feature flags and experimentation management solution for developers

https://featurevisor.com

License:MIT License


Languages

Language:TypeScript 97.8%Language:JavaScript 1.8%Language:Makefile 0.2%Language:HTML 0.1%Language:CSS 0.0%