Skip to content

cepero91/HackerNews

Repository files navigation


Hacker News

Clean Architecture Android app with an offline-first approach

Download

Problem to solve

  1. Get data from https://hn.algolia.com/api/v1/search_by_date?query=android and cache it for loading when device is offline
  2. Ability to delete an article and prevent it from being reinserted when the data has been refreshed (Swipe to Delete)
  3. Pull to Refresh
  4. View the article on a webview (within the app)

Third Party Libraries and Jetpack Component used to solve the problems

  1. ViewModel & LiveData
  2. Coroutine Flow
  3. Paging3 (RemoteMediator for offline-first approach)
  4. Koin (Dependency Injection)
  5. Room
  6. Retrofit
  7. Navigation Component
  8. LeakCanary
  9. Material Design, Lottie and Toasty (UI)

Screenshot

splash
Splash
splash
Listing
splash
Detail
splash
Swipe To Delete
splash
Internet Error

Aditional Note

I know that better solutions can always be found, so feel free to give some criticism to improve the current one.

"It is not enough for code to work."

Robert C. Martin