A responsive and interactive weather application built with React and Vite that fetches real-time weather data from the OpenWeatherMap API. Get instant weather updates for any city around the globe, including temperature, humidity, wind speed, and geographical coordinates.
- Real-time Weather Data: Displays current temperature, humidity, and wind speed.
- City Search: Search for weather information for any city worldwide.
- Geographical Coordinates: Shows Latitude and Longitude for the searched city.
- Dynamic Icons: Weather icons change based on current weather conditions (e.g., clear, clouds, rain, snow, drizzle).
- Responsive Design: Optimized for a seamless experience across various devices and screen sizes.
- Error Handling: Provides clear messages for city not found or API fetching errors.
Experience the app live here: Live_Weather_Dashboard
- Frontend: React.js (with Vite)
- Styling: CSS
- API: OpenWeatherMap API
Follow these steps to set up the project locally:
- Node.js (LTS version recommended)
- npm (comes with Node.js) or Yarn
- A code editor (e.g., VS Code)
- An API key from OpenWeatherMap (sign up for a free account)
-
Clone the repository:
git clone [https://github.com/KARTHIKAKRISHNA123/Live_Weather_Dashboard.git](https://github.com/KARTHIKAKRISHNA123/Live_Weather_Dashboard.git) cd Live_Weather_Dashboard/Live_Weather_Dashboard # Navigate into the correct project folder
-
Install dependencies:
npm install # or if you use yarn # yarn install
-
Set up Environment Variables:
- Create a file named
.envin the root of your project (same level aspackage.json). - Add your OpenWeatherMap API key to this file:
Replace
VITE_API_KEY="YOUR_OPENWEATHERMAP_API_KEY"YOUR_OPENWEATHERMAP_API_KEYwith the key you obtained from OpenWeatherMap.
- Create a file named
-
Start the development server:
npm run dev # or if you use yarn # yarn dev
The application should now be running on
http://localhost:5173(or another port if 5173 is in use).
This application is deployed using Netlify. The VITE_API_KEY is securely stored as an environment variable in Netlify's build settings.
Contributions are welcome! If you have suggestions for improvements or find a bug, please open an issue or submit a pull request.
This project is open source and available under the MIT License.