WeatherApp is a modern weather application built using Kotlin, Jetpack Compose, and MVVM architecture. It provides real-time weather updates and forecast information by integrating a third-party weather API. The app also includes local data storage functionality with CRUD operations powered by Room and dependency injection with Hilt.
- Search for weather by:
- City name
- ZIP/Postal code
- GPS coordinates
- Real-time weather updates
- 5-day weather forecast
- Local data storage with CRUD functionality
- Save weather data for offline access
- Update and delete stored weather data
- Clean and modular MVVM architecture
- Jetpack Compose for building declarative and modern UI
- Dependency injection with Hilt
- Image loading with Coil
- Kotlin: Programming language
- Jetpack Compose: UI toolkit for declarative UI
- MVVM: Architectural pattern
- Hilt: Dependency injection
- Room: Local database for data persistence
- Retrofit: HTTP client for API requests
- KSP: Kotlin Symbol Processing for annotation processing
- Coil: Image loading library for Jetpack Compose
- Android Studio Electric Eel or later
- Minimum SDK: 24
- Target SDK: 34
- Kotlin version: 2.0.0
-
Clone the repository:
git clone https://github.com/vectorqi/Weather-App cd WeatherApp -
Open the project in Android Studio.
-
Add your API key in the
local.propertiesfile:WEATHER_API_KEY=your_api_key_here -
Build and run the project:
./gradlew clean build
The app uses a weather API to fetch real-time weather data. Replace your_api_key_here with your API key obtained from a weather API provider like:
app/
├── data/ # Repository, database, API services
├── di/ # Dependency injection modules
├── domain/ # Business logic and use cases
├── ui/ # Jetpack Compose UI components
├── viewmodel/ # ViewModels for managing UI state
├── MainActivity.kt # Entry point of the app
└── App.kt # Application class with Hilt configuration
Contributions are welcome! Feel free to:
- Open issues for bugs and feature requests
- Submit pull requests for new features and improvements
- Fork the repository.
- Create a new branch:
git checkout -b feature/your-feature-name
- Make changes and commit:
git commit -m "Add your commit message" - Push to your forked repository:
git push origin feature/your-feature-name
- Open a pull request.
This project is licensed under the MIT License.