Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BookFinder

BookFinder is a small Android coding-challenge app for searching the Project Gutenberg catalogue through the public Gutendex API. Users can search by title or author, filter by language, inspect book details, keep recent searches, and save supported book files for offline use.

Architecture

The app uses a simple MVVM structure:

  • data/network: Retrofit API, DTOs, and mappers.
  • data/local: DataStore recent searches, JSON saved-book metadata, and app-local file downloads.
  • data/repository: BookRepository as the boundary between UI and data sources.
  • domain/model: clean book models and format selection logic.
  • ui/search and ui/details: Compose screens and ViewModels.

Koin provides dependency injection for repositories, storage, networking, and ViewModels.

Main Libraries

  • Kotlin
  • Jetpack Compose + Material 3
  • Coroutines + Flow
  • Retrofit + OkHttp
  • Moshi
  • DataStore Preferences
  • Koin
  • JUnit + kotlinx-coroutines-test

Build

.\gradlew.bat assembleDebug

Run Tests

.\gradlew.bat testDebugUnitTest

Known Tradeoffs

  • Gutendex responses can be slow, sometimes close to a minute. The app keeps the UI responsive, shows patient loading copy, and uses bounded long timeouts.
  • Saved book metadata is stored as local JSON instead of Room because the data set is small and simple.
  • Opening saved files depends on another app being installed that can handle the saved MIME type. If no viewer exists, the app keeps the file saved and explains the issue.
  • Gutenberg download URLs may redirect to cleartext HTTP, so cleartext is allowed only for Gutenberg domains.

AI Usage Disclosure

AI assistance was used to scaffold and iterate on the implementation, tests, and review fixes. The final code was reviewed through local builds, unit tests, and emulator debugging. Decisions such as keeping JSON metadata instead of Room, using Koin only for simple DI, and adding targeted tests were made to keep the project interview-friendly and maintainable.

About

Android app for searching Project Gutenberg books with offline downloads. Built with Kotlin, Jetpack Compose, MVVM, Coroutines, Retrofit, DataStore, and Koin.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages