Switchr is a Dynamic Feature Flag Management Tool.
It is a powerful system built with NextJS and Golang, designed to streamline feature flag implementation in your development process. This tool allows for real-time feature flag management, project-based organization, and role-based access control (RBAC).
- Project-based feature flag management
- User management and RBAC
- Real-time feature flag updates
- REST API access
- High-performance flag retrieval using Redis
Switchr is fairly easy to use.
- Switchr Account
In order to create a Switchr account, head to the Signup page.
After successfull account creation you'll be redirected to the Dashboard.
Before using the features of switchr you are required to verify your email once you sign up
In order to login to your account, head to the Login Page.
You can login through 2 methods -
- Email / Password : Login directly using your email and password.
- Magic Links (Passwordless): Submit your email and if you have a switchr account you'll directly receive a login link valid for 5 minutes.
Creating a new project is fairly simple.
In order to create a new project, your email is needed to be verified first
- Navigate to the Dashboard Page.
- Click on the Create New button.
- Enter the name of your project.
- Click on Create Project button.
- There you go. Your new project is created.
One of the main features of Switchr is accessing the feature flags through REST APIs.
For security purposes in order to get the feature flag value from api, a Token has to be generated and sent through the headers.
- Navigate to Dashboard Page.
- Open the project that has feature flag that needs to be accessed.
- Click on the API Button.
- A dialog box will appear, Click on Generate Token Button.
- A token with validity of 120 days will be generated.
Example Token -
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MzYwNzI3MDQsIlVpZCI6IiIsIlR5cGUiOiJhcGktdG9rZW4iLCJFbWFpbCI6IiIsIlJvbGUiOjAsIldasdasI6ImRkNjFmOTlkLWU4MGEtNDhlYS04ODA2LWNmN2VjNmNjNTM5NyJ9.WGpNELEtE-RswhiGAdBBmHO3Yh1IyOW8ykMMRWiDj_E
- In order to fetch data, following endpoint has to be used -
GET https://dev-server.live:8020/api/get/<FLAG_NAME>
- FLAG_NAME : Name of the feature flag, Required
- token : Authorization token generated above, Required
Assume, requesting a flag named "create_enable" with its value as "true"
curl -X GET http://localhost:8020/api/get/create_enable \
--header 'token:eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MzYwNzI3MDQsIlVpZCI6IiIsIlR5cGUiOiJhcGktdG9rZW4iLCdaskdjkasIiIsIlJvbGUiOjAsIlBpZCI6ImRkNjFmOTlkLWU4MGEtNDhlYS04ODA2LWNmN2VjNmNjNTM5NyJ9.WGpNELEtE-RswhiGAdBBmHO3Yh1IyOW8ykMMRWiDj_E'
{"flag":"true"}
- Response body has a field called "flag" which has the value of the flag
{"message":"Record not found","success":false}