A React-based web application that displays real-time weather information along with a 5-day / 3-hour forecast using a public weather API.
This project helped me understand API integration, state management, and handling large JSON data efficiently in React.
- Search weather by city name
- Displays current temperature and "feels like" temperature
- Shows 5-day / 3-hour forecast
- Filters and transforms large API response data
- Implements debouncing to reduce unnecessary API calls
- Manually caches previous search results to improve performance
- Visualizes forecast data using charts
- Frontend: React.js, JavaScript, HTML, CSS
- API: OpenWeather API
- Concepts: State management, API calls, async/await, data transformation
- The user types a city name.
- Debouncing delays the API request until the user stops typing.
- The app checks if the result is already stored in cache.
- If cached, the stored result is used instead of calling the API again.
- If not cached, a new request is sent to the weather API.
- The large JSON response is filtered and transformed before rendering.
- React updates the UI dynamically using state.
- Faced a CORS error while fetching data and resolved it by understanding cross-origin policies.
- Optimized performance by implementing debouncing to prevent excessive API calls.
- Improved efficiency by manually caching previous search results.
- Processed and structured large forecast data before rendering charts.
- Sending and handling API requests in frontend applications
- Working with large JSON data
- Implementing debouncing for performance optimization
- Building a simple caching mechanism manually
- Debugging CORS-related issues
- Writing cleaner and more structured React logic
- Add loading spinner
- Improve error handling
- Add weather animations
- Implement global state management