Shapt - a helpful and small feature flipper | flag | toggle library

I needed a smaller and simpler thing to do feature flippers than what FunWithFlags do. I just needed the boolean kind of toggle that it provides, but i wanted something that implemented very nice ideas that a friend did inside a project that he was working on. The ideas were:

  • expiration date for the toggles, and a way to verify it at the project build time.
  • generate template files
  • reloadable configuration
  • different toggle configuration by instance/site/region

Based on those ideas i came up with:

This are the list of main features(marked ones are already implemented):

  • [x] Configurable adapters that are simple to implement.
  • [x] Shapt.Adapters.Env and Shapt.Adapters.DotEnv built-in Adapters.
  • [x] shapt.expired mix task that exposes toggles that had his deadline expired.
  • [x] shapt.template mix task that generate template files for the configured adapter.
  • [ ] Plug that provides a GET endpoint to inspect current state of the toggles.
  • [ ] Plug that provides a POST endpoint that reload toggles value(reload feature must be provided by the Adapter).
  • [ ] Consul Adapters

I’m publishing this in such a early phase to see if i can get some feedback on nice features to have, keeping in mind that i want it to be simple and small.


just publish a new version on hex. please check out. :smiley:
i fixed some issues, changed the feature toggle module to be a worker that can be added to the supervision tree, made ets caching optional, added a plug that makes available an endpoint to inspect the current values and another one to reload values(right now not very useful, can be useful with external sources adapters)