The front end for the India Lights project.
npm run build
- clean & build everything and put it into dist foldernpm run serve
- serve the pages and utilize live reload on changes to styles, fonts, images, scripts and HTML. Run this and then open up http://localhost:9000 in your browser.API_URL='http://whatever.blah:1337' npm run serve
- same as above, but point the site at the specified API url. By default, this will be the heroku app at http://india-lights.herokuapp.com.
- React for view rendering
- React Router for routing
- Reflux for event and state management
- Mapbox GL JS for map rendering
- d3 for data processing and chart building
app/scripts/
|
+- main.js: entry point -- boot up the app.
+- actions.js: the user actions available to the app's components
+- config.js: app configuration object
|
+- store/: the data stores, responsible for hitting the api and providing
| the results to the rest of the application
+- component/: individual view (React) components.
| |
| +- app.js: main app wrapper
| +- data.js: the container component wrapping the map and line-plot pieces
| +- header.js: site header
|
+- lib/: generic app helpers
We use region
as a generic term to refer to the nation, states, districts, and
even villages.