.do | ||
.github | ||
docs/api/oas | ||
examples | ||
perf | ||
scripts | ||
src | ||
website | ||
.editorconfig | ||
.eslintignore | ||
.eslintrc | ||
.gitignore | ||
.node-version | ||
.nvmrc | ||
.prettierignore | ||
app.json | ||
CHANGELOG.md | ||
CODE_OF_CONDUCT.md | ||
CONTRIBUTING.md | ||
LICENSE | ||
package.json | ||
README.md | ||
renovate.json | ||
setupJest.js | ||
tsconfig.json | ||
yarn.lock |
About Unleash
Unleash is an open source feature management solution. It improves the workflow of your development team and leads to quicker software delivery. Unleash increases efficiency and gives teams full control of how and when they enable new functionality for end users. Unleash lets teams ship code to production in smaller releases whenever they want.
Feature toggles make it easy to test how your code works with real production data without the fear that you'll accidentally break your users' experience. It also helps your team work on multiple features in parallel without each maintaining an separate feature branch.
Unleash is the largest open source solution for feature flagging on GitHub. There's 12 official client and server SDKs and 10+ community SDKs available; you can even make your own if you want to. You can use Unleash with any language and any framework.
Get started in 2 steps
1. Start Unleash
With git
and docker
installed, it's easy to get started:
Run this script:
git clone git@github.com:Unleash/unleash-docker.git
cd unleash-docker
docker compose up -d
Then point your browser to localhost:4242
and log in using
- username:
admin
- password:
unleash4all
2. Connect your SDK
Find your preferred SDK in our list of official SDKs and import it into your project. Follow the setup guides for your specific SDK.
If you use the docker compose file from the previous step, here's the configuration details you'll need to get going:
- For front-end SDKs, use:
- URL:
http://localhost:3000
clientKey
:proxy-client-key
- URL:
- For server-side SDKs, use:
- Unleash API URL:
http://localhost:4242
- API token:
default:development.unleash-insecure-api-token
- Unleash API URL:
If you use a different setup, your configuration details will most likely also be different.
Check a feature toggle
Checking the state of a feature toggle in your code is easy! The syntax will vary depending on your language, but all you need is a simple function call to check whether a toggle is available. Here's how it might look in Java:
if (unleash.isEnabled("AwesomeFeature")) {
// do new, flashy thing
} else {
// do old, boring stuff
}
Run Unleash on a service?
If you don't want to run Unleash locally, we also provide easy deployment setups for Heroku and Digital Ocean:
Online demo
Try out the Unleash online demo.
Community and help — sharing is caring
We know that learning a new tool can be hard and time-consuming. We have a growing community that loves to help out. Please don't hesitate to reach out for help.
💬 if you want ask open questions about Unleash, feature toggling or discuss these topics in general.
💻 Create a GitHub issue if you have found a bug or have ideas on how to improve Unleash.
📚 Visit the documentation for more in-depth descriptions, how-to guides, and more.
Contribute to Unleash
Building Unleash is a collaborative effort, and we owe a lot of gratitude to many smart and talented individuals. Building it together with community ensures that we build a product that solves real problems for real people. We'd love to have your help too: Please feel free to open issues or provide pull requests.
Check out the CONTRIBUTING.md file for contribution guidelines and the Unleash developer guide for tips on environment setup, running the tests, and running Unleash from source.
Features our users love
Flexibility and adaptability
- Get an easy overview of all feature toggles across all your environments, applications and services
- Use included activation strategies for most common use cases, or use a custom activation strategy to support any need you might have
- Organise feature toggles by feature toggle tags
- Canary releases / gradual rollouts
- Targeted releases: release features to specific users, IPs, or hostnames
- Kill switches
- A/B testing
- 2 environments
- Out-of-the-box integrations with popular tools (Slack, Microsoft Teams, Datadog) + integrate with anything with webhooks
- Dashboard for managing technical debt and stale toggles
- API-first: everything can be automated. No exceptions.
- 12 official client SDKs, and ten community-contributed client SDKs
- Run it via Docker with the official Docker image or as a pure Node.js application
Security & performance
- Privacy by design (GDPR and Schrems II). End-user data never leaves your application.
- Audit logs
- Enforce OWASP's secure headers via the strict HTTPS-only mode
- Flexible hosting options: host it on premise or in the cloud (any cloud)
- Scale the Unleash Proxy independently of the Unleash server to support any number of front-end clients without overloading your Unleash instance
Looking for more features?
If you're looking for one of the following features, please take a look at our Pro and Enterprise plans:
- role-based access control (RBAC)
- single sign-on (SSO)
- more environments
- feature toggles project support
- advanced segmentation
- additional strategy constraints
- tighter security
- more hosting options (we can even host it for you!)
Architecture
Read more in the system overview section of the Unleash documentation.
Unleash SDKs
In order to connect your application to Unleash you need to use a client SDK for your programming language.
Official server-side SDKs:
Official Frontend SDKs:
The frontend SDKs connects via the Unleash Proxy in order to ensure Privacy, scalability and security.
Community SDKs
In addition there exists a good list of community developed SDKs, so there might already exist an implementation for your favorite programming language (e.g. Elixir, Dart, Clojure, NestJS, Kotlin, PHP and more.)
What is a feature toggle?
The main motivation for doing feature toggling is to decouple the process for deploying code to production and releasing new features. This helps reducing risk, and allow us to easily manage which features to enable, and have full control of how we exposed the new feature for.
Feature toggles decouple deployment of code from release of new features.
This repo contains the unleash-server, which contains the Unleash Admin UI and the Unleash API. To make use of unleash you will also need a client SDK.
Segmentation
It's fine to have a system for turning stuff on and off. But sometimes we want more granular control, we want to decide who the toggle should be enabled for. This is where activation strategies come into the picture. Activation strategies take arbitrary config and allow us to enable a toggle to a specific subset of your users (segment).
Common activation strategies includes:
- Active For users with a specified userId
- GradualRollout to X-percent of our users
- Active for our beta users
- Active only for application instances running on host x.
Read more about activation strategies in our docs.
The Client API
The client SDKs provides a simple abstraction making it easy to check feature toggles in your application. The code snippet below shows how you would use Unleash
in Java.
if (unleash.isEnabled("AwesomeFeature")) {
//do some magic
} else {
//do old boring stuff
}
Running Unleash
The are numbers of ways you can run Unleash.
- Unleash Enterprise - Cloud hosted by the Unleash Team. see plans
- Unleash Open-Source - Self host with Docker. Guide
- Unleash Open-Source - Self host with Node.js Guide
- Unleash Open-Source - Helm chart artifacthub.io
Run from Docker
- Create a network by running the following command:
docker network create unleash
- Start a postgres database:
docker run -e POSTGRES_PASSWORD=some_password \
-e POSTGRES_USER=unleash_user -e POSTGRES_DB=unleash \
--network unleash --name postgres postgres
- Start Unleash via docker:
docker run -p 4242:4242 \
-e DATABASE_HOST=postgres -e DATABASE_NAME=unleash \
-e DATABASE_USERNAME=unleash_user -e DATABASE_PASSWORD=some_password \
-e DATABASE_SSL=false \
--network unleash unleashorg/unleash-server
The first time Unleash starts it will create a default user which you can use to sign-in to your Unleash instance and add more users with:
- username:
admin
- password:
unleash4all
Users of Unleash
Unleash is trusted by thousands of companies all over the world (we are tracking more than 90 countries already). Proud Open-Source users:
(PS! feel free to submit your logo!)
In the media
- Free Code Camp: Feature toggles - Why and how to add to your software
- Feature toggling transient errors in load tests (English)
- The Code Kitchen Episode 7: Feature flags with Unleash (English)
- Utviklerpodden, 1 - Feature Flags og Unleash med Fredrik Oseberg (Norwegian)
- Node Weekly issue 380
- Console 42 - The open-source newsletter
- This Week in Rust 340
- Unleash-hosted - Unleash as a Service
- Medium blog
- Blog: Unleash your features gradually!
- Presentation: Unleash your features gradually!
- http://martinfowler.com/bliki/FeatureToggle.html