Web app to visualize sleep data
- Express app created to pull data from an external server
- Basic setup done by express-generator
- By going to /users/:id it will pull the cooresponding JSON file from S3 server
- Uses r2 module to polyfill fetch api to make async calls to S3
- Build on Node v8.9.4
- Create React App was used to generate the starting point of the Frontend app.
- Materialize CSS for grid, icons, colors.
- Chartjs (by means of react-chartjs) to create the charts.
- Uses Fetch API to do a async calls to the backend to get the json data.
- Piechart: wrapper around react-chartjs Pie component
- Linechart: wrapper around react-chartjs Line component
- hextorgba: turn a hex color value to
- splitoncaps: splits a string at each uppercase letter, joins them with a space, and capitalizes the first letter
- Click on the User icons to change which user data the app displays
- The top Piecharts represent the stages of the 3 intervals (3 Nights)
- Number of Toss and Turns shown below Piecharts because high number seems to indicate less deep sleep time.
- Heart Rate and Respitory Rate Linechart shows the heart rate in the same time periods.
- Bed and Room Tempature Linechart shows the coorelation between them.
- Clone this repo
- cd ./eight (or install folder)
- npm install
- cd ./client
- npm install
- In the root folder run: PORT=3001 node bin/www
- Open a new terminal tab, cd ./client.
- Run npm start.
- Go to http://localhost:3000/ to view the app.
- Express server is running on port 3001.