Bullet Train Frontend
The frontend application for https://bullet-train.io/. Bullet Train allows you to manage feature flags and remote config across multiple projects, environments and organisations.
This project connects to the Bullet Train API.
Getting Started
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See running in production for notes on how to deploy the project on a live system.
Prerequisites
What things you need to install the software and how to install them
Location | Suggested Version |
---|---|
NodeJS | >= 6.0.0 |
npm | >= 4.0.0 |
Installing
npm i
Running
Development
Hot reloading for client / server
npm run dev
Production
You can deploy this application on Heroku and Dokku without making any changes, other than the API URL in project_prod.js
Bundles, minifies and cache busts the project to a build folder and runs node in production. This can be used as part of your deployment script.
npm run bundle
npm start
ENV variables
Variables that differ per environment are exported globally to window.Project in
common/project.js, this file gets replaced by a project.js located in env by webpack based on what is set to the "ENV" environment variable (e.g. ENV=prod).
You can override each variable individually or add more by editing environment.js.
Current variables used between environment.js and common/project.js:
- API_URL: The API to hit for requests
- BULLET_TRAIN: The bullet train project we use to manage features
- GA: Google analytics key
- CRISP_CHAT: Chat widget key
- MIXPANEL: Mixpanel analytics key
- SENTRY: Sentry key
- ASSET_URL: Used for replacing local static paths with a cdn, .e.g https://cdn.bullet-train.io
E2E testing
This project uses Nightwatch for automated end to end testing with chromedriver.
npm test
Built With
- React
- Webpack
- Node
Contributing
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
Getting Help
If you encounter a bug or feature request we would like to hear about it. Before you submit an issue please search existing issues in order to prevent duplicates.
Get in touch
If you have any questions about our projects you can email projects@solidstategroup.com.
Running locally against your own Bullet Train API instance
We use Bullet Train to manage features we rollout, if you are using your own bullet train environment (i.e. by editing project_x.js-> bulletTrain) then you will need to have a replica of our flags.
A list of the flags and remote config we're currently using in production can be found here https://gist.github.com/kyle-ssg/4c65b4185d0fe3ae35f73244de5e2fef.