A beautiful and responsive React weather application that provides real-time weather information for any city worldwide using the OpenWeatherMap API.
Experience the app in action! Search for any city and get instant weather updates.
- 🔍 City Search - Search for weather information by city name
- 🌡️ Current Weather - Real-time temperature, weather conditions, and descriptions
- 💨 Detailed Metrics - Wind speed, humidity, visibility, and feels-like temperature
- ⏰ Hourly Forecast - 24-hour weather forecast with temperature trends
- 📅 8-Day Forecast - Extended daily weather predictions
- 🎨 Dynamic Backgrounds - Weather-based background animations
- 📱 Responsive Design - Optimized for desktop, tablet, and mobile devices
- 🌈 Weather Icons - Beautiful, intuitive weather condition icons
- ⚡ Fast Performance - Built with Vite for lightning-fast load times
Beautiful, responsive weather dashboard showing real-time weather data, hourly forecast, and 8-day extended forecast
- Frontend Framework: React 19.2.0
- Build Tool: Vite 7.2.4
- Styling: TailwindCSS 3.4.18
- HTTP Client: Axios 1.13.2
- Icons: Lucide React 0.555.0
- API: OpenWeatherMap API
- Deployment: GitHub Pages
- Node.js (v16 or higher)
- npm or yarn
- OpenWeatherMap API key (Get one here)
-
Clone the repository
git clone https://github.com/Lokistark/Weather-App.git cd Weather-App -
Install dependencies
npm install
-
Set up environment variables
Create a
.envfile in the root directory and add your OpenWeatherMap API key:VITE_WEATHER_API_KEY=your_api_key_here
-
Start the development server
npm run dev
-
Open your browser
Navigate to
http://localhost:5173
npm run buildThe optimized production build will be created in the dist folder.
This project is configured for GitHub Pages deployment.
npm run deployThis command will:
- Build the production version
- Deploy to GitHub Pages automatically
Weather-App/
├── public/
│ └── favicon.svg
├── src/
│ ├── components/
│ │ ├── WeatherDashboard.jsx # Main dashboard component
│ │ ├── WeatherBackground.jsx # Dynamic background component
│ │ └── ...
│ ├── services/
│ │ └── weatherService.js # API service layer
│ ├── utils/
│ │ └── weatherUtils.js # Utility functions
│ ├── App.jsx # Root component
│ ├── main.jsx # Entry point
│ └── index.css # Global styles
├── .gitignore
├── package.json
├── vite.config.js
├── tailwind.config.js
└── README.md
The main component that handles:
- City search functionality
- Weather data fetching
- Display of current weather, hourly, and daily forecasts
Provides dynamic, weather-based background animations for enhanced visual experience.
Handles all API calls to OpenWeatherMap:
- Geocoding (city to coordinates)
- Current weather data
- Forecast data
This app uses the OpenWeatherMap API:
- Geocoding API - Convert city names to coordinates
- Current Weather API - Get current weather data
- One Call API - Get hourly and daily forecasts
- Type any city name
- Press Enter or click the search button
- Instant weather data retrieval
- Temperature - Current, feels-like, min/max
- Wind - Speed and direction
- Humidity - Percentage
- Visibility - Distance in kilometers
- Weather Condition - Clear description with icons
- Hourly - Next 24 hours with temperature graph
- Daily - 8-day forecast with high/low temperatures
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the project
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is open source and available under the MIT License.
Lokistark
- GitHub: @Lokistark
- Project Link: https://github.com/Lokistark/Weather-App
- OpenWeatherMap for the weather API
- Lucide Icons for beautiful icons
- TailwindCSS for styling utilities
- Vite for blazing fast build tool
If you have any questions or need help, please open an issue in the GitHub repository.
Made with ❤️ by Lokistark
⭐ Star this repo if you find it helpful!