The Weather Mobile App is a React Native application designed to provide real-time weather data for user-selected or current locations. The app features city management, detailed weather forecasts, and customizable settings. It integrates seamlessly with a weather API for accurate and up-to-date weather information.
- Weather Data:
- Fetch current weather and forecasts.
- Display temperature, humidity, wind speed, and more.
- Location Management:
- Automatically fetch user’s current location.
- Add, view, and remove favorite cities.
- Settings Customization:
- Toggle between Light and Dark themes.
- Reset application data.
- Persistent Data Storage:
- Use AsyncStorage to save user preferences and favorite cities.
- @react-native-community/geolocation: Fetch the user’s current location.
- axios: Handle API requests to fetch weather data.
- react-native-wind: Utility-first CSS styling for React Native components.
- react-native-heroicons: Icon library for enhancing UI.
- react-native-svg: Render SVG images for weather icons.
- react-native-uuid: Generate unique identifiers.
- react-native-rename: Rename the app during development.
- moment: Format and manage date/time data.
- dayjs: Lightweight date/time formatting alternative.
- @react-navigation/native: Core library for React Navigation.
- @react-navigation/stack: Implement stack-based navigation.
- @react-navigation/bottom-tabs: Create bottom tab navigations.
- react-native-safe-area-context: Respect device safe areas.
- react-native-gesture-handler: Handle touch gestures.
- react-native-screens: Optimize performance with native screen usage.
- @react-native-async-storage/async-storage: Persistent local storage.
- Weather API:
- Endpoint: WeatherAPI
- Provides weather details such as current conditions, forecasts, and weather images.
- NoirPro: Used throughout the app for a consistent and modern typography.
- OnBoard:
- Displays app features and collects location permissions during the first launch.
- Home:
- Shows current weather details and forecasts for the user’s location.
- Includes navigation options for Settings and Cities screens.
- Cities:
- Lists saved cities with options to view or remove them.
- Search:
- Allows users to search for and add new cities by name.
- Settings:
- Includes theme toggling and app reset functionality.
- searchCity: Search for a city by name.
- addCity: Add a city to the saved list.
- removeCity: Remove a city from the saved list.
- fetchCities: Fetch all saved cities from AsyncStorage.
- currentWeather: Fetch the current weather for a location.
- weatherForecast: Fetch the weather forecast for a location.
- getWeatherImage: Retrieve corresponding weather icons.
- getItem: Retrieve data from AsyncStorage.
- setItem: Save data to AsyncStorage.
- removeItem: Remove data from AsyncStorage.
- On first launch, the Onboarding screen is displayed.
- Subsequent launches will display the Home screen directly.
- The user is prompted to allow location access after onboarding.
- The current location (city, region, country) is fetched and stored in AsyncStorage.
- Weather data is retrieved using the stored location and displayed on the Home screen.
- Options include:
- Toggle between Light and Dark themes.
- Reset the app to its initial state by clearing AsyncStorage data.
- Displays a list of saved cities stored in AsyncStorage.
- Includes navigation options for adding a new city or returning to the Home screen.
- Search for cities using an input field.
- Add selected cities to AsyncStorage.
- Clone the repository.
- Run
npm installto install dependencies. - Start the Metro bundler with
npm start. - Run the application:
- For Android:
npm run android - For iOS:
npm run ios
- For Android:
- Notifications: Add weather alerts and reminders.
- Advanced Search: Enable filtering by country or region.
- Multi-Language Support: Provide localization for different languages.
- Integration with Wearables: Display weather data on smartwatches.
- Improved Weather Visuals: Add animations for different weather conditions.
The Weather Mobile App offers a clean and efficient solution for accessing real-time weather data. Its user-friendly features and responsive design make it a reliable tool for everyday weather tracking.