{"id":13713424,"url":"https://github.com/uw-labs/flaggio","last_synced_at":"2025-05-15T14:12:44.681Z","repository":{"id":40278348,"uuid":"313357359","full_name":"uw-labs/flaggio","owner":"uw-labs","description":"Self hosted feature flag and A/B testing application","archived":false,"fork":false,"pushed_at":"2023-03-07T03:40:41.000Z","size":4154,"stargazers_count":20,"open_issues_count":12,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-06T23:38:25.018Z","etag":null,"topics":["ab-testing","feature-flags","go","golang","javascript","react"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/uw-labs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-16T16:11:00.000Z","updated_at":"2025-01-19T21:59:28.000Z","dependencies_parsed_at":"2024-06-19T13:23:21.711Z","dependency_job_id":"19ab301b-3f5b-45d4-bde7-c1bfb79c2d70","html_url":"https://github.com/uw-labs/flaggio","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uw-labs%2Fflaggio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uw-labs%2Fflaggio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uw-labs%2Fflaggio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uw-labs%2Fflaggio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uw-labs","download_url":"https://codeload.github.com/uw-labs/flaggio/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254355397,"owners_count":22057356,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ab-testing","feature-flags","go","golang","javascript","react"],"created_at":"2024-08-02T23:01:35.861Z","updated_at":"2025-05-15T14:12:44.648Z","avatar_url":"https://github.com/uw-labs.png","language":"Go","readme":"# flaggio\n\nFlaggio is a feature flag system that runs on your infrastructure. It supports single on/off as well as string and numeric flag values, user segmentation, and percentage rollout of features.\n\n\n\n## How to run\n\n#### External dependencies\n\n* MongoDB 4+ (required)\n* Redis (recommended)\n* [Jaeger](https://github.com/jaegertracing/jaeger) (optional)\n\nThe easiest way is to run flaggio with docker:\n\n```shell script\n$ docker run --rm -p 8080:8080 -p 8081:8081 -t flaggio/flaggio:latest -database-uri \u003cMONGO_URI\u003e\n```\n\nFlaggio UI will then be available at http://localhost:8081.\n\n## Concepts\n\n### Flags\n\nFlags consist of a key and a value (one of the variants), and they can be used to toggle parts of your application on or off, change the appearance of a UI element, and more.\n\n### Variants\n\nVariants are the values a flag can return. These can be a boolean, a number, or a string. Boolean values are useful for feature-toggling flags, whereas numbers and strings enable additional use cases.\n\n### Rules\n\nRules define a set of constraints and a specific variant to return when all constraint requirements are met. For example, if the user is using Chome browser return `blue`.\n\n### Constraints\n\nConstraints define what field and values to look for on the user context. It can also be used to check if they belong to a certain segment. For example, the user's country should equal Brazil.\n\n### User context\n\nThse are any values associated with a user. For example `age = 24`, `country = France`, `browser = Chrome`, `operationalSystem = Windows`, etc.\n\n### Segments\n\nSegments are a group of users that share a common set of properties. For example \"Users from the UK\",  \"Age 30-40\", \"MacOS users\", etc.\n\n## Architecture\n\nFlaggio is comprised of two APIs and a UI to manage the flags and segments, as well as being able to view the flag evaluations for each user.\n\n### Admin API\n\nThis is a graphql API that is able to perform CRUD operations for flags and segments.\n\n### Evaluation API\n\nThis is a REST JSON API which takes the user context and returns the flag value.\n\n#### Request model\n\n|value|type|required|description|\n|-----|----|--------|-----------|\n|userId|string|yes|an arbitrary ID that identifies a unique user|\n|context|object|yes|a set of values associated with the user|\n|debug|boolean|no|returns additional debugging information when `true`|\n\n#### Example request\n\n```json\n{\n  \"userId\": \"john@doe.com\",\n  \"context\": {\n    \"name\": \"john\",\n    \"age\": 26,\n    \"browser\": \"Firefox\"\n  },\n  \"debug\": false\n}\n```\n\n#### Example response\n\n```json\n{\n  \"evaluations\": [\n    {\n      \"flagKey\": \"showHeader\",\n      \"value\": true\n    },\n    {\n      \"flagKey\": \"backgroundColor\",\n      \"value\": \"#FFFFFF\"\n    }\n  ]\n}\n```\n\n## Configuration\n\nThe flaggio CLI accepts the following options:\n\n ```\n   --database-uri value          Database URI [$DATABASE_URI]\n   --redis-uri value             Redis URI [$REDIS_URI]\n   --build-path value            UI build absolute path [$BUILD_PATH]\n   --cors-allowed-origins value  CORS allowed origins separated by comma [$CORS_ALLOWED_ORIGINS]\n   --cors-allowed-headers value  CORS allowed headers [$CORS_ALLOWED_HEADERS]\n   --no-api                      Don't start the API server (default: false) [$NO_API]\n   --no-admin                    Don't start the admin server (default: false) [$NO_ADMIN]\n   --no-admin-ui                 Don't start the admin UI (default: false) [$NO_ADMIN_UI]\n   --playground                  Enable graphql playground (default: false) [$PLAYGROUND]\n   --api-addr value              Sets the bind address for the API (default: \":8080\") [$API_ADDR]\n   --admin-addr value            Sets the bind address for the admin (default: \":8081\") [$ADMIN_ADDR]\n   --log-formatter value         Sets the log formatter for the application. Valid values are: text, json (default: \"json\") [$LOG_FORMATTER]\n   --log-level value             Sets the log level for the application (default: \"info\") [$LOG_LEVEL]\n   --jaeger-agent-host value     The address of the jaeger agent (host:port) [$JAEGER_AGENT_HOST]\n```\n\n## License\n\nApache License 2.0","funding_links":[],"categories":["Repositories"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuw-labs%2Fflaggio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuw-labs%2Fflaggio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuw-labs%2Fflaggio/lists"}