GithubHelp home page GithubHelp logo

nearwood / skyanchor Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 4.94 MB

🌩ī¸ React app to show NOAA forecast.

Home Page: https://nearwood.dev/skyanchor

Shell 0.17% HTML 5.35% CSS 1.54% JavaScript 92.94%
noaa-api react geolocation material-ui

skyanchor's Introduction

Skyanchor 🌩ī¸

  • Simple 7 day forecast, with expandable hourly breakdown
  • Weather alerts
  • Mobile-first UI

Deployed to: https://nearwood.dev/skyanchor/


Running Locally

Requirements

Instructions

  • Clone repository: git clone https://github.com/nearwood/skyanchor.git
  • Install dependancies: yarn
  • Build and serve locally: yarn run start
  • Open a browser to: http://localhost:3000/

Tech Stack

Bootstrapped with create-react-app. See CRA.md for more details.

Tech Features

  • Responsive (basic; mobile-first)
  • Progressive Web App (PWA) - though lacks active offline capabilities
  • HTML geolocation

Screenshots

Desktop Mobile
Screenshot of desktop view Screenshot of mobile view
Screenshot of desktop view Screenshot of mobile hourly forecast
Screenshot of desktop alerts Screenshot of mobile alerts

Deployment

Testing

  • yarn test - run tests and watch files.
  • yarn run coverage - to run all tests and generate a code coverage report.

Snapshot testing MUI components turned out to be more tricky than I thought. See https://material-ui.com/guides/testing/

Coverage

As of 94ede39:

Statements   : 43.56% ( 71/163 )
Branches     : 53.97% ( 34/63 )
Functions    : 36.17% ( 17/47 )
Lines        : 45.89% ( 67/146 )

Notes:

  • Inflated due to simple render tests.
  • Not much business logic to actually test.

src/exampleData

  • Contains saved responses from api.weather.gov
  • Embedded URLs have been modified to work with tests
  • However testing against mocked external APIs was non-trivial with react-testing-library, msw, etc.

Known Issues; Caveats

UI

  • Theme colors, consistency could be better
  • Firefox has issues with the flexbox column

Performance

  • Virtualize hourly list
  • Consider MUI's hidden strategy
  • Reduce calculations made within rendering

API

  • Check API status: GET https://api.weather.gov/
  • Should decouple from NOAA weather and add intermediary layer
  • Authentication discrepancy (sending User-Agent requires API to send correct CORS preflight)

Future Features

  • Custom logo
  • Zip code alternative to HTML5 geolocation
  • Dark mode (easy with MUI)
  • Would really like prob. of precip. more prominent and by the hour
  • Better icons/emoji. Parse icon URL to derive emoji + percentage?
  • Settable units C/F
  • Radar
  • Shareable links? (would need routing, and/or some type of persistence)

skyanchor's People

Contributors

nearwood avatar

Watchers

 avatar  avatar  avatar

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.