Our web app is built with React. It uses Redux to manage global state.
npm install, then npm run dev. Make sure the API is also up. See the API repo for details on how to run the API on your machine.
Run cd .git/hooks && ln -s ../../pre-commit && cd - from the root of this repo. The pre-commit hook fails if source code doesn't pass flow checks.
Check out build.sh. Run npm run build.
npm run deploy: our web app is hosted by S3. Deployment uploads necessary static files to the bucket that serves the site.
We use CloudFront to cache our assets at edge locations. deploy.sh includes a command to invalidate this cache so clients get the updated web app as soon as it's deployed.
An Amazon-issued SSL certificate provides security for the web app and the API. Route 53 DNS ensures https://app.brigada.mx points to the web app, and that HTTP requests are redirected to HTTPS.
CloudFront also gzips assets, which greatly reduces bundle size and initial load time.
Run NODE_ENV=production webpack --config webpack.prod.js --json > stats.json to generate a stats.json file, and upload it here for a sweet sunburst chart.
WebGL must be enabled for Mapbox to run.
- Chrome: Go to chrome://settings/, click on Advanced, and make sure Use hardware acceleration when available is enabled.
- Safari: Preferences > Security > Allow WebGL
- Firefox: Should work
- IE: Should work for IE 11+