Skip to content

brigada-mx/web

Repository files navigation

Web

Our web app is built with React. It uses Redux to manage global state.

Dev

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.

Committing

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.

Build

Check out build.sh. Run npm run build.

Deploy

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.

Optimize Bundle Size

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.

Mapbox and WebGL

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+

About

SPA for reconstructors, donors, and the public

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages