Users can view and add weather information for multiple cities of their choice with this app.
It provides a 48-hour forecast, an 8-day forecast, and current weather conditions.
The program can also detect the user’s location to provide accurate local weather information.
This project uses the Open-Meteo API to fetch weather data.
The architecture of this application relies and complies with the following points below:
- A single-activity architecture, using the ViewPager2 to display a collection of fragments in a scrollable, swipeable interface.
- Pattern Model-View-ViewModel(MVVM) which facilitates a separation of development of the graphical user interface.
- Android architecture components which help to keep the application robust, testable, and maintainable.
com.yassineabou.weather # Root package
├── data # For data modeling layer
│ ├── local # Local persistence database
| ├── model # Model classes
│ ├── remote # Remote data source
│ └── repository # Repositories for single source of data
|
├── di # Dependency injection modules
│
├── ui # Activity / Fragment / ViewModel
│ ├── addLocation # Allows user to add new locations
│ ├── currentWeather # Presents current weather details
| ├── dailyForecast # Showcases daily weather forecast
| ├── hourlyForecast # Illustrates hourly weather forecast
| ├── listLocations # Lists saved locations
| ├── PagerAdapter # Adapter for viewPager2
| ├── MainActivity # Single activity
│ └── MainViewModel # Shared viewModel
|
├── utils # Utility classes / Kotlin extensions
└── WeatherApplication # Application
- Baseline Profiles (Performance optimization tool)
- ViewPager2 (Swipeable pager)
- Dots Indicator (Material view pager dots indicator)
- Data Binding (Bind views)
- StateFlow (State observable)
- ViewModel (Store and manage UI-related data)
- Kotlin Coroutine (Light-weight threads)
- Google Play services (Google service integration)
- Moshi (JSON serialization)
- Hilt (Dependency injection for android)
- Retrofit2 (HTTP client for APIs)
- Room (Abstraction layer over SQLite)
- Sdp (Scalable size unit)
- DataStore (Key-value storage)
- Ssp (Scalable size unit for texts)
- Kpermissions (Coroutines based runtime permissions)
We welcome contributions to our project! Please follow these guidelines when submitting changes:
- Report bugs and feature requests by creating an issue on our GitHub repository.
- Contribute code changes by forking the repository and creating a new branch.
- Ensure your code follows our coding conventions.
- Improve our documentation by submitting changes as a pull request.
Thank you for your interest in contributing to our project!
Copyright 2023 Yassine Abou
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.