Featurevisor

Workflow

Projects

A Featurevisor project is intended to be used as a single standalone Git repository, separate from your application codebase.

Creating a project

The easiest way is to use the Featurevisor CLI using npx (Node.js).

Create a new project directory first:

Command
$ mkdir my-project
$ cd my-project

And inside the newly created directory, initialize a Featurevisor project:

Command
$ npx @featurevisor/cli init

Installation

Afterwards, install the dependencies:

Command
$ npm install

Platform agnostic usage

While Featurevisor project itself depends on Node.js, your applications do not need to.

The idea is that a Featurevisor project will generate datafiles (static JSON files), which will later be consumed by applications using SDKs in different programming languages which do not need to have any ties to Node.js in any way.

Directory structure

Command
$ tree .
.
├── attributes/
│   ├── country.yml
│   ├── deviceId.yml
│   └── userId.yml
├── datafiles/ (generated later)
│   ├── production/
│   │   └── featurevisor-tag-all.json
│   └── staging/
│   └── featurevisor-tag-all.json
├── features
│   └── showCookieBanner.yml
├── featurevisor.config.js
├── package.json
├── segments
│   └── netherlands.yml
└── tests
├── features
│   └── showCookieBanner.spec.yml
└── segments
└── netherlands.spec.yml

Project configuration

  • featurevisor.config.js: contains your project configuration. Learn more in Configuration page.

Building blocks

These are the directories where you will be defining all the building blocks for managing your features:

  • attributes/: contains all your attribute definitions
  • segments/: contains all your reusable segments, which work as targeting conditions
  • features/: contains all your feature definitions
  • tests/: contains all your test specs against your features and segments

Output

  • datafiles/: contains all your generated datafiles, which are meant to be consumed by SDKs in your applications

Git repository

While it is intended that a Featurevisor project should be hosted in a standalone Git repository, it is not a strict requirement.

Command
$ git init
$ git add .
$ git commit -m "Initial commit"

You can still use the CLI to manage your project without a Git repository, or as part of your larger application codebase (think a monorepo setup).

However, it is highly recommended to use a standalone Git repository to keep track of your changes and collaborate with others. Keeping it separate from your application codebase allows you to decouple your feature changes from your application code deployments.

Previous
Features