May 28, 2021

Status: proposal | review | accepted

Table Of Contents:

Summary

This document outlines a simple solution for toggling features in production, using the Feature Flags technique.

The solution proposed here consists of an implementation on the client-side (frontend) that will allow showing or hiding not just React components, but also any JS logic, based on selected features.

The features are activated/deactivated within a form and stored on the browser’s LocalStorage.

Problem

We are starting to develop large features that are several thousand lines of code. While we could simultaneously ship all of this code at once (which would include database, API server, and front-end changes + coordination), this could lead to unexpected errors for our users.

Thus, by creating a solution that lets us incrementally ship out pieces of an incomplete feature, we are able to lower the surface area of releases and lower the risk of production errors for our users.

Additionally, with feature toggles, we'll be able to have "beta testers" in production - namely our own team members - but also any trusted clients / financial advisors.

Details

Feature flags can be used for different purposes, such as: