monash-human-power / dashboard

Monash Human Power - Data Aquisition System Web Server.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Monash Human Power - Data Acquisition System Web Server

eslint Checker All Contributors

Generic badge

A web server for the Data Acquisition System (DAS) for Monash Human Power.

The node.js + Express HTTP REST server is used to host the real-time dashboard whilst the MQTT broker is used to transfer data from the sensors to all the necessary scripts that need it.

Getting Started

Environment variable setup

Set up environment variables using a .env file. Create a .env file in the server/ directory. Add the following variables:

Environment Variable Description
MQTT_USERNAME MQTT username
MQTT_PASSWORD MQTT password
MQTT_SERVER Address of the MQTT broker
MQTT_PORT Port of the MQTT broker
HEROKU Define this only if you are the Heroku instance

Installation guide - Frontend

  1. Go to client/
  2. yarn install to install all dependencies and libraries
  3. yarn start to start the development server
  4. yarn build to create an optimized production bundle

Installation guide - Backend

  1. Go to server/
  2. yarn install to install all dependencies and libraries
  3. Build the frontend production bundle
  4. yarn start to start the server

Deploying

This project is set up to automatically deploy from GitHub.

Branch Environment URL
master Production http://mhp-board.herokuapp.com
Pull requests Review app

Documentation

Endpoint Method Body Description
/files GET Returns an array of files that are stored on the server
/files/recent GET Download most recent file edited from server
/files/filename GET Download specified file from server
/files/filename DELETE Delete specified file from server
/server/status GET Status of the server

TODO

  • Add Map display
  • Add power model graph/output
  • Options page that saves options to browser storage

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Angus Lee

💻

Christopher Hall

💻

Angus Trau

💻

Harsil Patel

💻

Riley Clarke

💻

This project follows the all-contributors specification. Contributions of any kind welcome!

About

Monash Human Power - Data Aquisition System Web Server.


Languages

Language:TypeScript 65.6%Language:JavaScript 30.3%Language:Python 1.6%Language:CSS 1.3%Language:HTML 0.7%Language:Shell 0.4%Language:Procfile 0.0%