Introduction
Openflagr/flagr is a community-driven OSS effort of advancing the development of Flagr.
Flagr is an open source Go service that delivers the right experience to the right entity and monitors the impact. It provides feature flags, experimentation (A/B testing), and dynamic configuration. It has clear swagger REST APIs for flags management and flag evaluation.
Documentation
Quick demo
Try it with Docker.
# Start the docker container
docker pull ghcr.io/Allen-Career-Institute/flagr
docker run -it -p 18000:18000 ghcr.io/Allen-Career-Institute/flagr
# Open the Flagr UI
open localhost:18000
Or try it on https://try-flagr.onrender.com,
it may take a while for a cold start, and every commit to the main branch will trigger
a redeployment of the demo website.
curl --request POST \
--url https://try-flagr.onrender.com/api/v1/evaluation \
--header 'content-type: application/json' \
--data '{
"entityID": "127",
"entityType": "user",
"entityContext": {
"state": "NY"
},
"flagID": 1,
"enableDebug": true
}'
Tested with vegeta. For more details, see benchmarks.
Requests [total, rate] 56521, 2000.04
Duration [total, attack, wait] 28.2603654s, 28.259999871s, 365.529µs
Latencies [mean, 50, 95, 99, max] 371.632µs, 327.991µs, 614.918µs, 1.385568ms, 12.50012ms
Bytes In [total, mean] 23250552, 411.36
Bytes Out [total, mean] 8308587, 147.00
Success [ratio] 100.00%
Status Codes [code:count] 200:56521
Error Set:
Flagr UI
Client Libraries
License and Credit
Running Flagr Locally
-
Update Dockerfile (follow comments in Dockerfile):
- Change port from 18000 to 3000
- set FLAGR_RECORDER_ENABLED to false for local testing if you dont want kafka setup
- Add JWT secret and
- ENV FLAGR_JWT_AUTH_NO_TOKEN_REDIRECT_URL="http://localhost:3000/login"
-
Update frontend configuration:
// browser/src/constants.js
DEV: {
VUE_APP_API_URL: 'http://localhost:3000/api/v1',
VUE_APP_SSO_API_URL: 'https://bff.allen-stage.in/internal-bff/',
}
-
Build and run:
# Build the Docker image
docker build -t flagr .
# Run the container
docker run -it -p 3000:3000 flagr