Weather is a simple Kotlin Multiplatform application built with Compose Multiplatform that gets weather information data for a specific city.
- user can get today's weather data
- user can get weather data for the next 7 days
- user can get the last 14 days weather data
Loading | Today | More |
---|---|---|
Loading | Today | More |
---|---|---|
This project uses the MVI(Model - View - Intent) architecture based on UDF(Unidirectional Data Flow) and Reactive programming.
Why?
- more clear and intentional separation of concerns
- single source of truth for our UI state which can only be mutated by intent/actions
- simpler and more direct UI testability, since we can define how the UI should look like with our state objects
sources
remotesource
- handles getting data from any server/remote source
localsource
- handles getting cached device data
data
- handles getting and mutating data from needed sources
domain
- handles encasing business logic for reuse
ui
- handles displaying data on device
The app includes both unit and instrumented tests.
- Remote
WeatherRemoteSource |
---|
- Local
WeatherLocalSource |
---|
In Progress |
- Repositories
WeatherRepository |
---|
- Extensions
DateTime |
---|
String |
---|
Int |
---|
GetCurrentWeatherDataUseCase |
---|
GetHistoryWeatherDataUseCase |
---|
- screen-model
WeatherDetailScreenModel |
---|
WeatherListScreenModel |
---|
- screens
Instrumented tests can only run on the JVM so in this app's instance they will run on
androidTest
WeatherDetailScreen |
---|
WeatherListScreen |
---|
In Progress |
Title | Description |
---|---|
Kotlin | fun programming language |
KMP - Kotlin Multiplatform | cross platform framework |
CMP - Compose Multiplatform | declarative UI rendering framework |
Ktor | networking client framework |
Title | Description |
---|---|
Kotlinx-DateTime | date/time library |
Kotlinx-Coroutines | async programming |
Kotlinx-Serialization | serialization |
Kamel | image loading |
Voyager | navigation |
Koin | dependency injection |
- Sources
- add a local cache for the weather forecast
- Data
- get the current day's weather forecast as a flow
- handle getting data from the remote source and caching it on device
- UI
- fix the UX on the dates list screen
- add Air Quality to the details(IMPORTANT!!!)
- add setup screen for selecting, country, unit of measurement & language
- add check to show if country has snow or not
- add ability change selected data
- add ability to change time from 24hour to 12 hour