A modern, feature-rich weather application built with React.js and Material-UI, designed to provide comprehensive weather information with an intuitive user interface.
- Real-time Weather Data: Get current weather conditions for any city worldwide
- 5-Day Forecast: View detailed weather predictions with daily and hourly breakdowns
- Location Detection: Automatic weather data for your current location using geolocation
- Unit Conversion: Toggle between Celsius (Β°C) and Fahrenheit (Β°F)
- Favorite Cities: Save and quickly access weather for your preferred locations
- Responsive Design: Optimized for desktop, tablet, and mobile devices
- Modern Glassmorphism Design: Beautiful glass-like interface with blur effects
- Smooth Animations: Floating weather icons and smooth transitions
- Interactive Elements: Hover effects and visual feedback
- Professional Color Scheme: Gradient backgrounds and consistent theming
- Loading States: Elegant loading indicators and error handling
- Current Temperature: Large, prominent display with weather icons
- Weather Description: Detailed weather conditions
- Humidity & Wind: Current atmospheric conditions
- Feels Like Temperature: Perceived temperature
- Pressure: Atmospheric pressure readings
- Visibility: Current visibility conditions
- Min/Max Temperatures: Daily temperature ranges
- Sunrise/Sunset Times: Daily solar information
- React.js 18: Modern React with hooks and functional components
- Material-UI (MUI): Professional UI component library
- Axios: HTTP client for API requests
- CSS3: Custom styling with animations and responsive design
- OpenWeatherMap API: Weather data and forecasts
- Geolocation API: Browser-based location detection
@mui/material: UI components@mui/icons-material: Icon library@emotion/react&@emotion/styled: CSS-in-JS stylingaxios: HTTP client
- Node.js (v14 or higher)
- npm or yarn package manager
- OpenWeatherMap API key
-
Clone the repository
git clone <repository-url> cd weather-app
-
Install dependencies
npm install
-
Get API Key
- Visit OpenWeatherMap
- Sign up for a free account
- Get your API key from the dashboard
- Replace
YOUR_API_KEYinsrc/App.jswith your actual key
-
Start the development server
npm start
-
Open your browser
- Navigate to
http://localhost:3000 - The app will automatically reload when you make changes
- Navigate to
- Enter a city name in the search field
- Click "Search" or press Enter
- View current weather conditions and forecast
- Click the location icon (π)
- Allow location access when prompted
- View weather for your current location
- Search for a city
- Click the heart icon (β€οΈ) to add/remove from favorites
- Access saved cities from the "Favorite Cities" section
- Click the Β°C/Β°F button to switch between temperature units
- All measurements update automatically
- React Hooks: useState, useEffect for component state
- Local Storage: Persistent storage for favorite cities
- Error Handling: Comprehensive error states and user feedback
- RESTful API Calls: Weather and geocoding endpoints
- Promise.all(): Concurrent API requests for better performance
- Error Boundaries: Graceful error handling for API failures
- Material-UI Grid System: Flexible layout system
- CSS Media Queries: Mobile-first responsive design
- Flexible Components: Adaptable UI elements
- Lazy Loading: Efficient component rendering
- Memoization: Optimized re-renders
- Debounced Search: Reduced API calls
- Primary: Purple gradient (#667eea to #764ba2)
- Background: Gradient backgrounds
- Text: White with transparency
- Accents: Blue and orange for weather icons
- Font Family: System fonts with fallbacks
- Hierarchy: Clear typographic scale
- Accessibility: High contrast ratios
- Floating Icons: Continuous gentle movement
- Hover Effects: Interactive feedback
- Page Transitions: Smooth fade-in effects
weather-app/
βββ public/
β βββ index.html
β βββ manifest.json
βββ src/
β βββ App.js # Main application component
β βββ App.css # Custom styles and animations
β βββ index.js # Application entry point
β βββ index.css # Global styles
βββ package.json # Dependencies and scripts
βββ README.md # Project documentation
- Weather Alerts: Integrate severe weather notifications
- Weather Maps: Add interactive weather maps
- Historical Data: Include past weather information
- Weather Widgets: Create embeddable weather components
- Theme Customization: Modify Material-UI theme
- Color Schemes: Add dark/light mode toggle
- Animation Tweaks: Adjust timing and effects
npm run build- Netlify: Drag and drop build folder
- Vercel: Connect GitHub repository
- GitHub Pages: Deploy from repository
- AWS S3: Static website hosting
- Lighthouse Score: 90+ (Performance, Accessibility, Best Practices)
- Bundle Size: Optimized with tree shaking
- Load Time: < 3 seconds on 3G
- API Response: < 1 second average
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- OpenWeatherMap: Weather data API
- Material-UI: UI component library
- React Community: Framework and ecosystem
Built with β€οΈ using React.js and Material-UI
Perfect for showcasing React skills, API integration, and modern web development practices in interviews!