Tweek is an open source feature management solution for customizing applications and system behavior without deploying new code.
Tweek aims to be a complete open-source alternative to other industry feature/configuration/experiment management solutions such as Facebook's Gatekeeper, LinkedIn's XLNT, Dropbox's Stormcrow and other commercial SaaS solutions...
- Feature toggles, gradual release
- Multi-variant experiments, A/B testing
- Built-in Editor with user friendly UI
- Hierarchical configurations
- Advanced targeting of users/groups
- Dependencies between features
- Customizable schema/domain model
- Auditing
- Integrated storage for saving context
- Container friendly
- Integrated OAuth support
- Pluggable storage backend
- Simple RESTful api for fetching configurations
- Scalable
The easiest way to start evaluating Tweek is to run it locally on docker, make sure you have the latest docker (for windows/mac/etc..) version installed (17-06+).
- clone the repo (
git clone https://github.com/Soluto/tweek.git
) - run (
yarn start
) - this might take a few minutes for the first time
After setting up our environment, we're going to create our first key. Keys in tweek are the most basic building blocks and they reperesent a container for dynamic value that affect feature behaviors. Our first key, will be a key that responsible for the the color of a "sign up" button.
- Open http://editor.dev.tweek.localtest.me:81 in browser.
- Go to keys page.
- Click on "Add Key"
- Type my_app/sign_button/color
- Set value type to String
- Add default value "red"
- Save changes
- Click on "Add Rule"
- Set Property to Country (user) and set "=" and "Canada" in the other fields
- In Rule value set the value "blue"
- Click "Save changes"
More on keys and paths
Use curl/postman/chrome to fire GET Request:
- http://api.dev.tweek.localtest.me:81/api/v1/keys/my_app/sign_button/color -> expected to be "red"
- http://api.dev.tweek.localtest.me:81/api/v1/keys/my_app/sign_button/color?user.Country=canada -> expected to be "blue"
- http://api.dev.tweek.localtest.me:81/api/v1/keys/my_app/sign_button/_?user.Country=canada -> expected to be {"color":"blue"}
Using the rest api, an application can query Tweek for getting the right set of values for each specific user. More on Tweek Rest api.
Tweek provide's REST api for saving context data. Using the API, use curl/postman to fire POST Request:
- http://api.dev.tweek.localtest.me:81/api/v1/context/user/john {"Country":"Canada"}
After that, we can query Tweek API with:
- http://api.dev.tweek.localtest.me:81/api/v1/keys/my_app/sign_button/color?user=john -> expected to be "blue"
More on Context.
Create new key in the editor "my_app/sign_button/is_enabled" with value type "boolean" and default value False.
Add new rule, remove all conditions, set the the rule value to gradual release with 50%.
Try querying configuration with different users and You'll have different results.
- http://api.dev.tweek.localtest.me:81/api/v1/keys/my_app/sign_button/is_enabled?user=barny
- http://api.dev.tweek.localtest.me:81/api/v1/keys/my_app/sign_button/is_enabled?user=robin
- http://api.dev.tweek.localtest.me:81/api/v1/keys/my_app/sign_button/is_enabled?user=ted
- http://api.dev.tweek.localtest.me:81/api/v1/keys/my_app/sign_button/is_enabled?user=lily
- etc...
More on how multi-varaint keys work in Tweek. (link)
- Who's using Tweek?
Tweek is been used in large scale production deployment at Soluto. - How do I generate ssh keys and a pfx file for use in production?
There's a script for this purpose inutils/generate_keys.sh
- I found a security vulnerability, should I open an issue about it?
No. Please send an email to[email protected]
.
Tweek.JPad - Tweek's internal rules engine