A sleek, modern weather application built with React and TypeScript that provides real-time weather information with a beautiful, intuitive interface. WeatherWise offers current conditions, detailed forecasts, and a clean, responsive design that works on any device.
- Current Weather: Real-time temperature, conditions, and key metrics
- Detailed Forecast: Hourly and daily weather predictions
- Location Search: Find weather for any city worldwide
- Responsive Design: Works seamlessly on desktop and mobile devices
- Modern UI: Clean, minimalist interface with smooth animations
- Weather Metrics:
- Temperature (Feels Like)
- Wind Speed & Direction
- Humidity Levels
- UV Index
- Visibility
- Air Quality
- Precipitation
- Pressure
- Node.js (v14 or later)
- npm or yarn
-
Clone the repository:
git clone https://github.com/yourusername/weatherwise.git cd weatherwise
-
Install dependencies:
npm install # or yarn install
-
Create a
.env
file in the root directory and add your API keys:REACT_APP_WEATHER_API_KEY=your_weather_api_key REACT_APP_GEO_API_KEY=your_geo_api_key
-
Start the development server:
npm start # or yarn start
- React 18+
- TypeScript
- Redux Toolkit
- React Icons
- Axios
- Styled Components
This project is licensed under the MIT License - see the LICENSE file for details.
- Weather data provided by WeatherAPI.com
- Icons by Lucide Icons
- Desktop UI Design by Linur
Our weather classification system categorizes conditions into three levels based on health and safety impact:
- Temperature: 10Β°C to 25Β°C (Comfortable range)
- Air Quality: us-epa-index 1-3 (Excellent to Good)
- Wind:
- Speed: β€ 20 kph (Gentle breeze)
- Gusts: β€ 30 kph (Mild gusts)
- Precipitation: β€ 2 mm (Light drizzle)
- Visibility: β₯ 8 km (Clear conditions)
- UV Index: 0 to 2 (Low risk)
- Humidity: 30% to 60% (Comfortable)
- Temperature: 25Β°C to 32Β°C or 0Β°C to 10Β°C
- Air Quality: us-epa-index 4-6 (Moderate to Sensitive)
- Wind:
- Speed: 20-40 kph (Moderate breeze)
- Gusts: 30-60 kph (Strong gusts)
- Precipitation: 2-10 mm (Light to moderate rain)
- Visibility: 4-8 km (Moderate visibility)
- UV Index: 3 to 7 (Moderate to High)
- Humidity: 60% to 80% (Humid)
- Temperature: > 32Β°C or < 0Β°C
- Air Quality: us-epa-index 7-10 (Unhealthy to Hazardous)
- Wind:
- Speed: > 40 kph (Strong winds)
- Gusts: > 60 kph (Gale force)
- Precipitation: > 10 mm (Heavy rain)
- Visibility: < 4 km (Poor visibility)
- UV Index: 8+ (Very High to Extreme)
- Humidity: > 80% (Very humid)
The app prioritizes weather parameters based on their impact and provides specific recommendations:
-
Health Impact (Highest Priority)
- Feelslike temperature: Monitor for heat stroke or hypothermia risks
- Air quality (us-epa-index): Check for respiratory health risks
-
Physical Hazard (Medium Priority)
- Wind speed (wind_kph): Assess for falling objects or structural damage
- Gust speed (gust_kph): Prepare for sudden strong winds
- Precipitation (precip_mm): Check for flooding risks
-
Operational Safety (Medium Priority)
- Visibility (vis_km): Monitor for travel safety
- Road conditions: Check for slippery surfaces
-
Preventable Risk (Lowest Priority)
- UV Index: Use sunscreen and protective clothing
- Humidity: Stay hydrated and monitor comfort levels
-
Real-time Updates
- Automatic weather data refresh
- Live weather condition tracking
- Real-time alerts for dangerous conditions
-
Location Services
- Current location detection
- Global city search
- Recent locations history
-
Visual Indicators
- Color-coded status indicators
- Animated weather icons
- Interactive weather charts
-
User Interface
- Dark/Light mode toggle
- Responsive design
- Modern blur effects
- Smooth animations
- React 18+
- TypeScript
- Redux Toolkit for state management
- Lucide React for icons
- React Select Async Paginate for search functionality
- CSS with vendor prefixes for cross-browser compatibility
- React 18+
- TypeScript
- Redux Toolkit for state management
- Lucide React for icons
- React Select Async Paginate for search functionality
- CSS with vendor prefixes for cross-browser compatibility
- Clone the repository:
git clone https://github.com/Ahmed11-coder/React_Weather_App.git
cd React_Weather_App
- Install dependencies:
npm install
- Set up environment variables:
Create a
.env
file in the root directory and add your API keys:
REACT_APP_GEO_API_KEY=your_geo_api_key
REACT_APP_WEATHER_API_KEY=your_weather_api_key
- Start the development server:
npm start
- Search for a city using the search bar or swipe between 4 continental views
- View current weather conditions and classification status (Good/Moderate/Dangerous)
- Switch between dark and light mode using the mode toggle
- View recent 2 search history
- Get real-time weather updates automatically
- Monitor health impact parameters (temperature, air quality)
- Check physical hazard risks (wind, precipitation)
- Track operational safety metrics (visibility)
- Review preventable risks (UV, humidity)
src/
βββ assets/
β βββ styles/
βββ components/
β βββ Content/
β β βββ WeatherContent/
β β βββ WeatherChart/
β βββ Header/
β βββ Search/
βββ services/
βββ store/
βββ utils/
βββ types/
- Fork the repository
- 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 licensed under the MIT License - see the LICENSE file for details.
In the project directory, you can run:
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
Launches the test runner in the interactive watch mode.
See the section about running tests for more information.
Builds the app for production to the build
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
- Build the application:
npm run build
- Deploy to your preferred platform:
- Netlify: https://app.netlify.com
- Vercel: https://vercel.com
- GitHub Pages: https://pages.github.com
- For production deployment:
- Ensure environment variables are set
- Test the application thoroughly
- Monitor performance and error logs
- Weather API Documentation: API Documentation
- React: React Documentation
- TypeScript: TypeScript Documentation
- Redux Toolkit: Redux Toolkit Documentation
- Weather Classification: Understanding the three-tier system
- API Integration: Working with weather data
- State Management: Using Redux Toolkit effectively
- TypeScript: Best practices and advanced features
-
Weather Data Not Loading
- Check API key validity
- Verify network connection
- Check rate limits
-
Classification Errors
- Review parameter thresholds
- Check data parsing
- Validate input values
-
Performance Issues
- Optimize API calls
- Implement proper caching
- Use code splitting
For support, please:
We welcome contributions! Please follow these guidelines:
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to your branch
- Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.