Weather app.
Here are new features that I thought would add value to the app:
- Locate the user and give the weather according to their position.
- Possibility to choose the degree type between C and F.
- Save favorite locations so that the user doesn't have to type the location everytime.
Here are some code improvements that could be made:
- Add placeholders for the images.
- Cover more tests.
- Handle network errors in a more specific way. (ex: log the network errors)
- Extract common Dp values into a separate file for reusability
I applied Clean Architecture (in the Uncle Bob sense) and chose to have a single 'app' module to keep things simple, but I've split the packages in a way I would if it was a multi-module project by feature. I have these packages for this single feature app:
- data
- domain
- presentation
- di
- Kotlin Coroutines - For asynchronous operations.
- Kotlin Flow - Works in hand with coroutines to handle asynchronous data.
- Compose - Library to create the UI components.
- Retrofit - For network calls.
- Hilt - For dependency injection.
- Coil - To load remote images.
- Moshi - Json library.
- MockK - Mocking library for tests.