Self-hosted service
openflagr/flagr avatar
openflagr/flagr

Flagr's published image ships a demo database with the recorder off

Flagr is a feature flagging, A/B testing and dynamic configuration microservice

2,616 stars210 forksGoApache-2.0

At a glance

What is it?
Flagr is a Go service for feature flags, A/B tests and dynamic configuration, continued from an earlier repository under a new organisation. Its Docker image bakes a demo SQLite database into the layer and disables the recorder, so the quick start runs pre-populated data. Kafka and Kinesis sit in the dependencies with a compose file at the root and are never mentioned on the page, and the load test on the page lasted twenty eight seconds.
Who is it for?
Flagr suits a Go service that wants per-audience flag evaluation with sticky assignment and a JSON attachment on the response, without running a separate experimentation platform. Before adopting it, note that the documented quick start runs a demo database inside the image with the recorder disabled, so it tells you nothing about what an empty instance looks like and nothing about what gets recorded.
Can I use it commercially?
Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 9 days ago.
What is it written in?
Mainly Go, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 23, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • openflagr/flagr2,616 ★ · +8
Star history
Repository2026-10-042026-11-23
openflagr/flagr2.6k2.6k

8 Stars in the last 50 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

The image you are told to run already contains a database

The quick start is two commands and a browser: pull the image, run it with port 18000 published, then open localhost. What that gives you is not an empty instance. The container build has three stages, and the final one copies a SQLite file out of the repository into the data directory with ownership set to the unprivileged user it creates, and points the connection string at that path. It also sets the recorder environment variable to false. So the published image boots with data already in it and with event recording switched off, which is exactly right for a demo and exactly wrong as a first impression of production behaviour. The same stage sets the host to all interfaces and the port to 18000, so a container run with the published port mapping is reachable from outside the machine it runs on, which is the documented default rather than something you have to opt into.

The hosted demo shares that configuration and may cold-start

There is a second way to see it working without installing anything: a hosted instance, with a note that it may cold-start. The example request posted to it is the clearest statement of the API on the whole page:

sh
curl -sS -X POST https://try-flagr.onrender.com/api/v1/evaluation \
  -H 'content-type: application/json' \
  -d '{
    "entityID": "127",
    "entityType": "user",
    "entityContext": { "state": "NY" },
    "flagID": 1,
    "enableDebug": true
  }'

One endpoint, an identifier for who is asking, a type for them, a context object of arbitrary key and value pairs, a numeric flag identifier and a debug switch. The response is a variant and an optional JSON attachment, which is how a flag carries configuration to the client rather than only a boolean. The two ways to try the service, a local container and a hosted demo, are therefore not equivalent: the container you build has the demo database baked in, and the hosted one has recording disabled too.

Four dependencies are pinned as incompatible and one logging stack was abandoned

The module list is long, and four entries carry the marker that says the release predates module versioning: a retry helper, a rate limiter, an environment parser and a metrics client. Two more are pinned to bare commit hashes with a date in the version string, an authentication middleware and an AWS stream producer. One of them is worth reading twice: the JWT library is not the original package but a fork maintained under a different organisation, which is the usual way a widely used dependency gets continued after its original is left alone. The logging story is layered rather than chosen once. A structured logger, a middleware that writes access logs, a bridge from the logger into an error reporting service, and that service's own abandoned client version, which the upstream organisation stopped maintaining years ago. Four components where one would do, with two of them superseded by their own upstream.

Kafka and Kinesis are in the tree and absent from the page

The repository root holds a compose file whose only purpose is Kafka. The module list carries a Kafka client library and an AWS stream producer. None of that appears on the page, whose description of what the service does stops at returning a variant and an attachment. So the shipped system can evidently emit events about evaluations, and where those events go is configured somewhere in the environment variables the documentation covers, but the overview never says so and the compose file is not linked from it. That gap matters for anyone evaluating it: a flag service that also publishes every evaluation to a stream has very different operational characteristics from one that answers a request and forgets, and the difference is invisible unless you read the dependency list.

The set of entity types is fixed when the image is built

The user interface is built in its own container stage from a Node image, before the Go service is compiled, and its configuration crosses the stage boundary as a build argument. The build declares an argument for the possible entity types, defaults it to the literal string null, and exports it as the environment variable the front end bundler reads. So the entity types a user can pick from in the interface are baked in when the image is built, not configured when it runs. It is a reasonable design for a service whose entity types are fixed by the host application, and an awkward one for a self-hosted instance where the types are decided per deployment, because changing them means a new image. The runtime environment variables on the page cover the database and the recorder, and none of them touch this.

The Makefile handles native Windows by borrowing Git's tools

The build system is written to run the same way on three platforms, and the Windows branch is the interesting part. It detects the Windows environment variable, then checks for a proc filesystem to distinguish native Windows from the Linux subsystem, which reports itself as Windows but has one. Only in the native case does it set the executable suffix, switch the Python interpreter name, and prepend Git's Unix tools directory to the path so that sleep, test, mkdir and rm resolve. A macro handles a second Windows problem: Git Bash splits the path on the wrong separator, so a Go workspace directory has to be converted before it is prepended, which the macro does by asking a conversion tool if it is available. The default goal is a help screen, multi-word targets are hyphenated by convention, and two development ports are declared. There is also a backup path for a generated configuration file, which is what happens when a build script rewrites Go source.

The load test ran for twenty eight seconds

The performance section reproduces a load test tool's output in full, and the numbers are specific: fifty six thousand requests at two thousand per second over an attack window of twenty eight seconds, a median latency of three hundred and twenty eight microseconds, ninety fifth percentile under six hundred and fifteen, ninety ninth at one point three nine milliseconds, a maximum of twelve and a half, and a hundred percent success with every response a two hundred. Read carefully, the shape of the test is the story. Twenty eight seconds is a short run, and the maximum is fifty times the median, which is the kind of profile you get from a short burst rather than from a service held under load. The page hedges the claim accordingly, calling it a published run with a sub-millisecond median, and points at a benchmark directory in the repository for the rest. Two smaller things sit in the same file: a documentation badge pointing at a retired Go documentation domain, and a note that this repository continues the work of the original one under a different owner.

Editorial conclusion

Flagr suits a Go service that wants per-audience flag evaluation with sticky assignment and a JSON attachment on the response, without running a separate experimentation platform. Before adopting it, note that the documented quick start runs a demo database inside the image with the recorder disabled, so it tells you nothing about what an empty instance looks like and nothing about what gets recorded. Decide whether you need the event streaming that the dependencies imply, because the page does not mention Kafka or Kinesis even though a compose file for one of them sits in the repository root. And plan for the API being generated: the swagger definitions and their generated code are both versioned, so a client library regenerated against them is part of your change surface.

Frequently asked questions

What is Flagr?

It is an open source Go service for feature flags, A/B tests and dynamic configuration. Your application posts to an evaluation endpoint with who is asking, and Flagr returns a variant plus an optional JSON attachment. It can be self-hosted on SQLite, MySQL, PostgreSQL or a JSON file driven by Git, and ships with a Vue 3 interface and an official Docker image.

How do I run Flagr quickly?

Pull the published image, run it with port 18000 published, and open localhost:18000. Be aware that the image contains a demo SQLite database copied in at build time and has the recorder disabled, so the quick start runs pre-populated data. A hosted demo also exists at try-flagr.onrender.com and may cold-start.

Which storage backends does Flagr support?

SQLite, MySQL, PostgreSQL, or JSON for GitOps style configuration. The published container sets the sqlite3 driver and points its connection string at a database inside the image, and both values are ordinary environment variables documented with the rest.

What clients exist for Flagr?

Four, one per language, all published by the same organisation: goflagr for Go, jsflagr for JavaScript, pyflagr for Python and rbflagr for Ruby. They are separate repositories from the service itself.

Where does Flagr's development come from?

This repository continues development from the original Flagr repository under a different owner, and the licence section credits both under Apache 2.0. The page records that lineage in one line under the description rather than in a history section.

Official sources

  1. License: Apache-2.0
  2. openflagr/flagr on GitHub
  3. Project website
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/openflagr-flagr.svg)](https://hysenlabs.com/projects/openflagr-flagr)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/openflagr-flagr.svg)](https://hysenlabs.com/projects/openflagr-flagr)

Was this useful?