Pyrrha-Platform / Pyrrha-Dashboard

This repository contains the next generation in-progress Pyrrha (created by Prometeo) solution dashboard based on the Carbon Design System and React.
Apache License 2.0
6 stars 7 forks source link
app-id call-for-code carbon-design-system carbon-monoxide dashboard hacktoberfest nitrogen-dioxide prometeo pyrrha react

Pyrrha dashboard

License Slack

This repository contains the Pyrrha solution dashboard built on the Carbon Design System, React, Node.js, and Flask.

The dashboard shows the real-time and long-term averages of firefighter exposure to carbon monoxide, nitrogen dioxide, temperature, and humidity that are provided by the Pyrrha sensor and analytics.

It also provides a way to create, read, update and delete firefighters, devices, and events, though these aren't currently used as they are registered in App ID and the IoT Platform.

Setting up the solution

Code overview

The code is in a pyrrha-dashboard subdirectory as React does not support mixed case directories such as this top-level repo. All the instructions below assume you're in that directory.

The database backend for the React project is based on Python using Flask and was originally created based on this valuable post and series from Miguel Grinberg.

The authentication backend is a Node.js app that uses the IBM App ID service, reused from another Call for Code project built upon Carbon and React, OpenEEW.

Create services

Update configuration files

Start the local development services

Deploy to the IBM Cloud

On the IBM Cloud Kubernetes Service, this application is hosted as three microservices.

Files

User interface (React)

Main API (Python Flask)

Authentication API (Node.js)

Pages

Currently the dashboard takes a device-centric view of the current readings. These readings can be correlated with a particular firefighter who was assigned the device. This separation is intentional at the moment in order to preserve identity privacy in the current implementation. This mapping, and the thresholds used by the system are controlled by the firefighter department medical professional.

Screenshots

Full view of connected devices in Spanish

es-dashboard.png

Full view of connected devices in English

en-dashboard.png

Full latest averages in Catalan

ca-details.png

Carbon monoxide 30 minute view in English

en-30mn-co.png

Nitrogen dioxide 1 hour view in Catalan

dashboard-events.png

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting Pyrrha pull requests.

License

This project is licensed under the Apache 2 License - see the LICENSE file for details.