Skip to content

alexschimpf/flagship-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flagship Example

This is a simple example project using the Flagship platform.

You can find documentation about Flagship at: https://alexschimpf.github.io/flagship

Running

  1. Start docker-compose
make run

This will run everything necessary via docker-compose. Note: This may take a few minutes. The flagship-ui-server container takes extra time because it has to build its bundle at runtime.

  1. Initialize Redis with some data
make init-redis

You can see the example project UI at: http://localhost:3001

How It Works

Firstly, we have a docker-compose file that runs everything.

  • MySQL
    • Initialized with all necessary sample project data (found in mysql folder)
  • Redis Cluster
  • Flagship Admin API
  • Flagship Flags API
  • Flagship UI Server
    • Found at: http://localhost:3000
    • You can see how everything is set up on the Flagship side here
    • Log in with email owner@flag.ship and password Test123!
  • Example Project UI
  • Example Project Server
    • FastAPI server using Python SDK

The example project works like so:

  • There is one dropdown with question: "What kind of user are you?"
  • The dropdown has options "Normal" and "Cool"
  • When you select from the dropdown, your Flagship "context" changes, which results in a call to Flagship to load enabled feature flags
  • There is a single feature flag configured called "COOL_FEATURE". This is set to only be enabled when the "user_type" context field equals 2 (i.e. "when you select "Cool" from the dropdown)
  • If the UI detects that "COOL_FEATURE" is enabled, it will show the "new feature"

You may be thinking... couldn't this whole thing be done without Flagship? And you are absolutely right. This point of this project is just to show the whole end-to-end system in action.

About

Example project using the Flagship platform

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors