A modern, responsive weather application built with React and Vite. Search for any city to check its current weather conditions through a clean, intuitive interface.
- 🔍 Search weather by city name.
- ⌨️ Press Enter or click Search to get results.
- 🌡️ Current temperature in Celsius.
- 🌤️ Weather conditions and dynamic weather icons.
- 🌡️ Feels-like temperature.
- 💧 Humidity percentage.
- 💨 Wind speed in km/h.
- 🌡️ Atmospheric pressure.
- 🎨 Weather-responsive backgrounds.
- 📱 Responsive desktop and mobile interface.
- ⚡ Loading indicators and error handling.
- 🌤️ Custom weather emoji favicon.
- ♿ Keyboard-friendly interactions.
- React
- JavaScript
- Vite
- Tailwind CSS
- OpenWeatherMap API
- Vercel
Install Node.js and npm.
git clone https://github.com/iamsachinG/Weather.git
cd Weather
npm install
Create a .env file in the project root:
VITE_OPENWEATHER_API_KEY=your_api_key
Get your API key from OpenWeatherMap.
npm run dev
Open the local URL displayed in your terminal.
Create a production build:
npm run build
Run lint checks:
npm run lint
Preview the production build:
npm run preview
The application can be deployed using Vercel.
Vite environment variables prefixed with VITE_ are exposed in browser code. They are not secret credentials.
Restrict your API key where possible, and rotate it if it has been exposed publicly. For stronger protection, consider a server-side API proxy.
Sachin Gupta
GitHub: @iamsachinG
⭐ If you like this project, consider giving it a star!