A modern, beautifully designed weather application built with React Native and Expo. Get real-time weather information and forecasts for your current location with an intuitive user interface and smooth animations.
- Current Weather Display: View real-time temperature, weather conditions, and weather descriptions for your current location
- 5-Day Forecast: See detailed 5-day weather forecasts with hourly breakdowns
- Location Services: Automatic detection and tracking of your current location
- Beautiful UI: Dynamic weather-appropriate background images and weather icons
- Responsive Design: Works seamlessly on iOS, Android, and web platforms
- Weather Icons: Large, clear weather condition icons for intuitive weather visualization
- Dynamic Backgrounds: Background images that change based on current weather conditions
- Loading States: Smooth loading indicators while fetching data
- Error Handling: User-friendly error messages with quick access to settings when needed
- Framework: React Native with Expo
- Language: TypeScript
- Navigation: Expo Router
- Weather Data: OpenWeather API
- Location Services: Expo Location
- UI Components: React Native native components
- Animations: Lottie React Native for smooth animations
- Icons: Expo Vector Icons (Ionicons)
- Date/Time: Day.js for date manipulation
- Maps: React Native Maps support
- State Management: React Hooks
Before you begin, ensure you have the following installed:
- Node.js (v18 or higher)
- npm or yarn package manager
- Expo CLI:
npm install -g expo-cli - OpenWeather API Key: Get one free at openweathermap.org
git clone https://github.com/pthanksdev/Atmos_Weather_App.git
cd Atmos_Weather_App-mainnpm installCreate a .env file in the root directory with your OpenWeather API key:
EXPO_PUBLIC_OPEN_WEATHER_KEY=your_api_key_herenpm startThis will start the Expo development server. You can then:
- Press
ito open on iOS simulator - Press
ato open on Android emulator - Press
wto open in web browser - Scan the QR code with Expo Go app on your physical device
bweather-main/
├── app/ # App screens and navigation
│ ├── _layout.tsx # Root layout component
│ └── index.tsx # Main weather screen
├── assets/ # Static assets
│ ├── images/ # App icons and splash screen
│ └── weather-backgrounds/ # Dynamic weather background images
│ └── weather-icons/ # Weather condition icons
├── components/ # Reusable React components
│ ├── ForecastListItem.tsx # Individual forecast item component
│ └── ForecastSection.tsx # Forecast list container
├── constants/ # Application constants
│ ├── weatherBackgrounds.ts # Background image mappings
│ └── weatherIcons.ts # Weather icon mappings
├── hooks/ # Custom React hooks
│ └── useCurrentLocation.ts # Location detection hook
├── services/ # API services
│ └── openWeather.ts # OpenWeather API integration
├── types/ # TypeScript type definitions
│ └── openWeather.ts # API response types
├── utils/ # Utility functions
│ ├── forecast.ts # Forecast data utilities
│ ├── http.ts # HTTP request helper
│ ├── time.ts # Time formatting utilities
│ ├── url.ts # URL building utilities
│ ├── weatherBackground.ts # Background selection logic
│ └── weatherIcon.ts # Icon selection logic
├── package.json # Project dependencies
├── app.json # Expo configuration
├── tsconfig.json # TypeScript configuration
└── README.md # This file
- Displays current weather information
- Shows temperature and weather conditions
- Lists 5-day forecast
- Handles location permissions and error states
- Displays list of forecast items
- Scrollable forecast view
- Organized weather data presentation
- Individual forecast card component
- Shows temperature, weather icon, and time
- Compact forecast information display
- Manages location permission requests
- Handles GPS coordinate retrieval
- Provides loading and error states
- Fetches current weather data
- Fetches 5-day forecast data
- Handles API authentication
Create a .env file or set environment variables:
EXPO_PUBLIC_OPEN_WEATHER_KEY=your_openweather_api_keyThe API key is obtained from OpenWeather API (free tier available).
npm start # Start development server
npm run dev # Start in development mode
npm run android # Start Android emulator
npm run ios # Start iOS simulator
npm run web # Start web browser version
npm run lint # Run ESLint code checkerEdit constants/weatherIcons.ts to change weather condition icon mappings.
Edit constants/weatherBackgrounds.ts to customize background images for different weather conditions.
Modify services/openWeather.ts to change weather API endpoints or settings.
Contributions are welcome! Please feel free to:
- 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 open source and available under the MIT License.
- Ensure you've created a
.envfile with your OpenWeather API key - The variable must be prefixed with
EXPO_PUBLIC_to be accessible in the app
- On physical devices: Go to Settings → App Permissions → Location → Allow
- The app will show a settings button to quickly access location settings
- Ensure the app has foreground location permission
- Verify your OpenWeather API key is valid and not expired
- Check your internet connection
- Ensure the API key has access to current weather and forecast endpoints
- Clear cache:
expo start -c - Reinstall dependencies:
rm -rf node_modules && npm install - Reset project:
npm run reset-project
- Expo Documentation
- React Native Documentation
- OpenWeather API Docs
- TypeScript Handbook
- Expo Router Guide
For issues, questions, or suggestions, please open an issue in the repository or contact the development team.
Made by pthanks using React Native and Expo
"# Atmos_Weather_App"