A feature-rich weather application built using React, Tailwind CSS, and Vite. This app provides real-time weather updates, along with dynamic visuals and themes based on the time of day and sun position.
- Real-time weather updates for any city.
- Displays sunrise, sunset, and current sun position.
- Changes background theme based on morning, day, evening, and night.
- Dynamic weather icons and animations.
- Responsive design for all devices.
- Search functionality for weather data by city.
- Saves the last fetched city's weather data for quicker access.
- Enter the name of a city in the search bar.
- View real-time weather data, including temperature, humidity, wind speed, sunrise, sunset, and sun position.
- Observe dynamic background changes based on the time of day (morning, day, evening, night).
- Enjoy the clean and responsive interface.
Follow these steps to set up the project locally:
-
Clone the repository:
git clone https://github.com/techiuv/weather-app.git
-
Navigate to the project directory:
cd weather-app
-
Install dependencies:
npm install
-
Start the development server:
npm run dev
-
Open your browser and go to:
http://localhost:5173
To deploy the app:
-
Build the project:
npm run build
-
Preview the Deployment
npm run preview
This app uses a weather API to fetch real-time data. Configure your API key in the .env
file:
Replace with your actual API key:
VITE_OPEN_WEATHER_API=YOUR_API_KEY
This project is licensed under the MIT License.