Skip to content

khatv911/forecastapp

Repository files navigation

ForeCast

A small application with SOLID principles, MVVM design pattern, backed by Android Architecture Components + Kotlin Coroutine.

Code structure

folders

  1. ui with MainActivity and its ViewModel.
  • MainActivity will observe and react to changes in viewmodel's livedata
  • MainActivity can also trigger a search by calling viewmodel#searchCity
  • ViewModel will query the forecasts from repository (its single source-of-truth) and update it's livedata upon receiving data.
  1. repository hosts the WeatherRepository, it acts like a mediator for network and cache data. It also performs the caching logics.
  2. persistence contains cache data(backed by Room and a simple cache for search query)
  3. network backed by Retrofit api and its related responses
  4. DependenciesContainer will wire all required dependencies and got initialized in App#onCreate

Testing

  1. Mockk for mock test
  2. Robolectric with Androidx Test support.

Checklists

  1. Programming language: Kotlin is required, Java is optional.
  2. Design app's architecture (suggest MVVM)
  3. Apply LiveData mechanism
  4. UI should be looks like in attachment.
  5. WriteUnitTests
  6. AcceptanceTests
  7. Exceptionhandling
  8. Cachinghandling
  9. SecureAndroidappfrom:
  • Decompile APK
  • Rooted device
  • Data transmission via network
  • Encryption for sensitive information
  1. Accessibility for Disability Supports:
  • Talkback:Useascreenreader.
  • Scaling Text: Display size and font size: To change the size of items on your screen, adjust the display size or font size.
  1. Entity relationship diagram for the database and solution diagrams for the components, infrastructure design if any