{"id":24835635,"url":"https://github.com/medigo/laika","last_synced_at":"2025-10-14T10:30:26.549Z","repository":{"id":9921731,"uuid":"49732567","full_name":"MEDIGO/laika","owner":"MEDIGO","description":":dog: A feature flag service","archived":false,"fork":false,"pushed_at":"2022-12-03T13:31:07.000Z","size":12280,"stargazers_count":37,"open_issues_count":14,"forks_count":17,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-04-07T04:03:18.811Z","etag":null,"topics":["feature-flags","feature-toggles","go"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MEDIGO.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-01-15T16:59:44.000Z","updated_at":"2023-04-13T15:14:41.000Z","dependencies_parsed_at":"2023-01-11T20:13:41.650Z","dependency_job_id":null,"html_url":"https://github.com/MEDIGO/laika","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/MEDIGO/laika","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MEDIGO%2Flaika","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MEDIGO%2Flaika/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MEDIGO%2Flaika/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MEDIGO%2Flaika/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MEDIGO","download_url":"https://codeload.github.com/MEDIGO/laika/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MEDIGO%2Flaika/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279018780,"owners_count":26086452,"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","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["feature-flags","feature-toggles","go"],"created_at":"2025-01-31T04:34:46.565Z","updated_at":"2025-10-14T10:30:26.062Z","avatar_url":"https://github.com/MEDIGO.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Laika\n\n[![CircleCI](https://circleci.com/gh/MEDIGO/laika.svg?style=shield)](https://circleci.com/gh/MEDIGO/laika) [![Coverage Status](https://coveralls.io/repos/github/MEDIGO/laika/badge.svg)](https://coveralls.io/github/MEDIGO/laika)\n\nLaika is a feature flag/feature toggle service, written in Go, that allows the creation of flags and their activation/deactivation for specific environments. This way it is possible to control in which environments each feature is available. For instance, when a new feature is developed and released, it would make sense if it was only made available, at first, in a testing or Q\u0026A environment, and only later in production. With Laika this can be achieved by simply going to a web page, selecting the feature, and changing its status on the desired environments.\n\nUsing Laika in a project thus allows for fast and continuous feature release and deployment.\n\n`laika-php` is a PHP library that handles communication with Laika's API. You can get it [here](https://github.com/MEDIGO/laika-php).\n\n`laika-react` is a React JS module that handles communication with Laika's API. You can get it [here](https://github.com/MEDIGO/laika-react).\n\n## API Reference\n\nLaika uses CQRS, the query endpoints are as follows.\n\n| Method  | Endpoint                            | Description                |\n| ------- | ------------------------------------| -------------------------- |\n| `GET`   | `/api/health`                       | Check the service health   |\n| `GET`   | `/api/features`                     | List all features          |\n| `GET`   | `/api/features/:name`               | Get a feature by name      |\n| `GET`   | `/api/features/:name/status/:env`   | Get the status of a feature|\n|         |                                     | in a particular environment|\n| `GET`   | `/api/environments`                 | List all environments      |\n\n\nThe command endpoint is for manipulating data.\n\n| Method  | Endpoint                          | Example body                                                   | Description               |\n| ------- | --------------------------------- | -------------------------------------------------------------- | ------------------------- |\n| `POST`  | `/api/events/environment_created` | `{\"name\":\"staging\"}`                                           | Create a new environment. |\n| `POST`  | `/api/events/feature_created`     | `{\"name\":\"feature1\"}`                                          | Create a new feature.     |\n| `POST`  | `/api/events/user_created`        | `{\"username\":\"admin\",\"password\":\"secret\"}`                     | Create a new user.        |\n| `POST`  | `/api/events/feature_toggled`     | `{\"feature\":\"feature1\",\"environment\":\"staging\",\"status\":true}` | Toggle a feature.         |\n| `POST`  | `/api/events/feature_deleted`     | `{\"name\":\"feature1\"}`                                          | Delete a feature.         |\n| `POST`  | `/api/events/environments_ordered`| `{\"order\":[\"dev\",\"staging\"]}`                                  | Change env display order. |\n| `POST`  | `/api/events/environment_deleted` | `{\"name\":\"staging\"}`                                           | Delete an environment.    |\n\n## Client\n\nLaika contains a polling HTTP client that allows to easily check for enabled/disabled features on Go code. It can be found in the `client` package.\n\n### Install\n\n```\n$ go get -u github.com/MEDIGO/laika/client\n```\n\n### Usage\n\n```go\npackage main\n\nimport (\n\t\"log\"\n\n\t\"github.com/MEDIGO/laika/client\"\n)\n\nfunc main() {\n\tc, err := client.NewClient(client.Config{\n\t\tAddr:        \"127.0.0.1:8000\",\n\t\tUsername:    \"my-username\",\n\t\tPassword:    \"my-password\",\n\t\tEnvironment: \"prod\",\n\t})\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tif c.IsEnabled(\"my-awesome-feature\", false) {\n\t\tlog.Print(\"IT'S ALIVE!\")\n\t} else {\n\t\tlog.Print(\"Move along. Nothing to see here.\")\n\t}\n}\n```\n\n## Developing\n\nTo develop Laika you need to have the following tools installed in your machine:\n\n- [Docker Compose](https://docs.docker.com/compose/install/)\n\nBuild and start the docker contaniers and continuously run/build the server and UI with:\n\n```sh\n$ make develop\n```\n\nAnd start hacking!\n\n```sh\n$ open http://localhost:8000\n```\n\n## Testing\n\nThe whole test suite can be executed with:\n\n```\n$ make test\n```\n\nThe docker setup starts with a mysql database. If you would like to connect to your own database, you can pass the configuration to them with the following environment variables:\n\n```\nLAIKA_TEST_MYSQL_HOST=db\nLAIKA_TEST_MYSQL_PORT=3306\nLAIKA_TEST_MYSQL_USERNAME=root\nLAIKA_TEST_MYSQL_PASSWORD=root\nLAIKA_TEST_MYSQL_DBNAME=laika\n```\n\n## Current state of the project\n\nIn the current release of Laika, it is possible to create feature flags and enable/disable them in the existing environments.\n\n### Wishlist\n\n- Specify country access (e.g. feature only enabled in Germany).\n- Specify user access with percentage (e.g. feature only enabled for 30% of the user base).\n- Have a field for environment creation on the web page.\n- History for flag status changes.\n\n## Copyright and license\n\nCopyright © 2019 MEDIGO GmbH.\n\nLaika is licensed under the MIT License. See [LICENSE](LICENSE) for the full license text.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmedigo%2Flaika","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmedigo%2Flaika","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmedigo%2Flaika/lists"}