Giter Club home page Giter Club logo

react-weather-app's Introduction

Live Demo

https://yingchieh.github.io/react-weather-app/

OpenWeatherMap API

The application uses the OpenWeatherMap API. In order to use this API you will need to sign up for an account (the service that the application uses is available on the free tier) and set the API key as the REACT_APP_WEATHER_API_KEY environment variable.

Available Scripts

Install the dependencies in the local node_modules folder:

npm install

In the project directory, you can run:

npm start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

react-weather-app

This project was bootstrapped with Create React App.

Features

  • Mobile friendly
  • User's ability to search cities
    • A text input so that user can search for a city by its name
    • Able to add current city search to history, so user can see the weather of the last selected cities if refresh the page (in maximum: 5 cities)
  • View weather results
    • Handle possible API's erros by showing a message
    • Click I want to know more ▼ for more weather details
    • The weather to be updated every 10 seconds
    • After refreshing the page, show the last viewed city weather
    • Show the localtime
  • Located current city for API results
    • If an end user grants permission, the Geolocation API: Supports "one-shot" position updates via the getCurrentPosition() method

Tech Features

  • You’ll need to have Node >= 10.16.3 and npm >= 6.14.8 on your machine.
  • Bootstrapped with Create React App
  • Uses React for rendering components
  • fontawesome for icons
  • Uses moment.js to format our time
  • Uses Google Places API for location autocomplete
  • Use HTML Geolocation API to get the geographical position of a user

Architecture

The architecture of the app looks like this:

App.js
|___Search bar
|  |__Input field
|  |__Button (current loctation icon)
|  |__Button
|___Content
|  |__ListContainer
|  | |__Button (history icon)
|  |__weatherData
|  | |__Local time
|  | |__City
|  | |__Date
|  | |__Temperature
|  | |__WeatherIcon
|  | |__Description
|  |_Weather details
|    |__Cloudines
|    |__Feels like
|    |__Humidity
|    |__Wind
|    |__Sunrise
|    |__Sunset
|___Footer

react-weather-app's People

Contributors

yingchieh avatar

Watchers

 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.