Git Product home page Git Product logo

weather-app's Introduction

Weather App Challenge

live demo: https://weather-app-challenge-jk.netlify.app

Description

This is a simple weather app that uses the WeatherAPI to display the current weather in a given city.

This app took me approximately 4-5 days to complete.

show case app image

Features

  • Search for a city
  • Display the current weather in that city
  • Display forecast (7 days) in that city
  • Display the weather for the next 24 hours in that city
  • Display weather information like humidity, wind speed, and more
  • Switch between Fahrenheit and Celsius
  • Cypress e2e tests
  • Error handling

Tech Stack

  • React
  • Zustand
  • Local Storage
  • Tailwind
  • Shadcn/ui
  • Radix ui
  • date-fns
  • React Router Dom
  • Yup
  • Recharts
  • Cypress
  • Docker

Considerations

  • I used Zustand for state management because it's a simple and lightweight state management library that I've used before and I'm familiar with.
  • I used Local Storage to persist the state in the browser so that the user can get the preferred configuration (Celsius or Fahrenheit) and the history when they return to the app.
  • I used Tailwind/Shacnui/Radixui for styling due to speed + accessibility.
  • I used React Router Dom for routing because it's a two page only app with small number of API calls. So I used a routing fetch strategy to fetch the data when the user navigates to the page. With more complex apps I would use a data fetching library like React Query.

Installation

  1. Clone the repo
    git clone [repo url]
  2. Install NPM packages
    npm install
  3. Start the app
    npm start
  4. Run the tests
    npx cypress open

weather-app's People

Watchers

Joseph Kaltenecker 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.