Giter Site home page Giter Site logo

cehat-clinic / dashboard Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 18.08 MB

Home Page: https://sg-cehat-air-quality.web.app

License: Other

HTML 1.09% CSS 0.11% TypeScript 98.77% JavaScript 0.03%
react typescript air-quality air-quality-monitor purple-air firebase

dashboard's Issues

Reduce Firebase reads for AQI calculations

The current implementation means every reading (from every 2 minutes) is read 72 separate times, and there are currently about 650,000 reads per day (well beyond free tier), whereas writes are still within reasonable values. This is expensive and the reads are redundant, so creative database structure can improve this.

Hosting

  • Get live dashboard online
  • Determine how to automatically update deployed website with new master branch code

Make Selected Sensor Larger on Map

When a sensor is clicked, make it look similar to the hovered sensors (enlarged icon) so that it's more clear what sensor's information you are viewing.

Combine or remove duplicate sensor reading doc

There are two sensor docs with purpleAirId="39019". One is older, and I believe they are both now being populated with the same readings. The 39019 sensor was likely re-added in November when we added more sensors. Thus, I think once all old data docs are converted to the new format, we can probably just delete the newer collection.

Add 404 Page

Will need to add default page to Routers as well as a component to be displayed

Rename master branch to main

In GitHub

  • From code view, click on branch button (upper left) and then View All Branches.
  • On branch page, click edit on the right side of the master branch (under default)
  • Use pop up to rename master to main

Locally

git branch -m master main
git fetch origin
git branch -u origin/main main

GitHub Actions

Rename all references to master to main in the .github directory

  • deploy.yml
  • node.js.yml

Allow users to update their accounts

This includes

  • Sending a password reset email for a forgotten password
  • Changing a password for a signed in user
  • Changing an email for a signed in user
  • Deleting an account

Transition hamburger menu to Chakra IconButton

Chakra has a built in IconButton feature that we should probably be taking advantage of instead of a manual image, but it was not super quick to implement due to icon hiding and sizing. Since it is low-pri, I am going to open this issue as opposed to fixing now.

Uncaught Errors from async calls to Firebase

Chrome Dev Tools is showing "Uncaught exception" for async calls to Firebase in the front-end code, even though the errors are caught and being handled. This is likely related to how promises are handled, but it is not clear why the current implementation is not working. It could be because the error is being thrown in another call stack, per this documentation.

Converting the async/await in try/catch statements to then/catch statements seems to fix the issue.

Store dashboard colors centrally

Right now the colors for the markers and the dial (which are the same) are hard coded in markerStyle.tsx and AQIDial.tsx. We should store these colors in one place, and use them in both files. This should also accommodate the fact that the colors are different with the color blind toggle on.

Update README from default create-react-app

  • Project description
  • Will not expand disclaimer
  • NPM scripts (front end and functions)
  • Description of major development frameworks and links to documentation (React, TypeScript, Prettier/Eslint/gts)
  • Description of major libraries and links to documentation (Chakra UI, i18next, Firebase, axios...)
  • How to clone (maybe on a separate markdown file?)
    • API Keys (HERE maps, PurpleAir, Firebase)
    • Setting up GitHub (GitHub secrets, continuous deployment, etc.)
    • Setting up Firebase (Firestore, Cloud Functions, Authentication)
    • Setting up initial admin users
    • Local content (static content, HERE maps location, PurpleAir group)
  • Database structure

Add AQI block to UI

The representation of the UI for a given sensor (i.e. the dial representation)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.