Skip to content

πŸ“– Book Explorer App – An Android app built with Modern Android Concepts.
It lets users search and explore books from the Google Books API, view details, save favorites offline, and navigate seamlessly with Compose Navigation. Designed as a practice + showcase app to cover major modern Android concepts.

Notifications You must be signed in to change notification settings

shubhamgadekar/Books-Library

Repository files navigation

πŸ“š Book Explorer App

An Android app built with Jetpack Compose that lets you explore books using the Google Books API / OpenLibrary API.
This project is designed to practice and demonstrate modern Android development concepts like MVVM, Clean Architecture, Hilt, Flows, RoomDB, Paging 3, Navigation, and Unit Testing.


βœ… Build & Quality Status

Detekt Unit Tests & Coverage Coverage

This repository enforces static analysis (Detekt) and unit test coverage checks using GitHub Actions.


πŸ“Έ Screenshots

Home Screen Home Screen Home Screen
Home Screen Home Screen

✨ Features

  • πŸ”Ž Search books by keywords
  • πŸ“– View detailed book information (title, author, description, cover image)
  • ❀️ Save books to favorites/readList (stored locally with RoomDB)
  • πŸ“‘ Pagination with infinite scroll using Paging 3
  • πŸ‘€ Simple profile screen

πŸ› οΈ Tech Stack

  • UI: Jetpack Compose (Material 3, Navigation Compose)
  • Architecture: MVVM + Clean Architecture
  • Asynchronous: Kotlin Coroutines, Flow
  • Dependency Injection: Hilt
  • Networking: Retrofit + OkHttp
  • Local Storage: Room Database
  • Pagination: Paging 3
  • Testing: JUnit, MockK, Turbine
  • Static Analysis: Detekt

πŸ—οΈ Project Structure

com.alpha.books_explorer/ 
β”‚ 
β”œβ”€β”€ data/                           # Data Layer (API + DB) 
β”‚   β”œβ”€β”€ local/                      # Room database 
β”‚   β”‚   β”œβ”€β”€ converters/ 
β”‚   β”‚   β”‚   β”œβ”€β”€ Converters.kt 
β”‚   β”‚   β”œβ”€β”€ dao/ 
β”‚   β”‚   β”‚   β”œβ”€β”€ FavBookDao.kt 
β”‚   β”‚   β”‚   β”œβ”€β”€ ReadingList.kt 
β”‚   β”‚   β”œβ”€β”€ entities/ 
β”‚   β”‚   β”‚   β”œβ”€β”€ BookEntity.kt 
β”‚   β”‚   β”‚   β”œβ”€β”€ ReadingListEntity.kt 
β”‚   β”‚   └── FavBookDatabase.kt 
β”‚   β”‚ 
β”‚   β”œβ”€β”€ paging/  
β”‚   β”‚   β”œβ”€β”€ BooksPagingSource.kt 
β”‚   β”œβ”€β”€ remote/                     # Retrofit API 
β”‚   β”‚   β”œβ”€β”€ BookApiService.kt 
β”‚   β”‚   └── dto/ 
β”‚   β”‚       β”œβ”€β”€ BookSearchResponse.kt 
β”‚   β”‚ 
β”‚   β”œβ”€β”€ repository/                 # Repository implementation 
β”‚   β”‚   └── BookRepositoryImpl.kt 
β”‚   β”‚ 
β”‚   └── mappers/                    # DTO ↔ Entity ↔ Domain 
β”‚       β”œβ”€β”€ BookMapper.kt 
β”‚ 
β”œβ”€β”€ domain/                         # Domain Layer (business logic) 
β”‚   β”œβ”€β”€ model/ 
β”‚   β”‚   β”œβ”€β”€ Book.kt 
β”‚   β”‚ 
β”‚   β”œβ”€β”€ repository/                 # Abstract repository interfaces 
β”‚   β”‚   └── BookRepository.kt 
β”‚   β”‚ 
β”‚   └── usecase/                    # Use cases 
β”‚       β”œβ”€β”€ GetBooksUseCase.kt 
β”‚       β”œβ”€β”€ SearchBooksUseCase.kt 
β”‚       β”œβ”€β”€ GetBookDetailsUseCase.kt 
β”‚       β”œβ”€β”€ SaveFavoriteBookUseCase.kt 
β”‚       └── GetFavoriteBooksUseCase.kt 
β”‚ 
β”œβ”€β”€ di/                             # Dependency Injection (Hilt) 
β”‚   β”œβ”€β”€ LocalDbModule.kt 
β”‚   β”œβ”€β”€ NetworkModule.kt 
β”‚ 
β”œβ”€β”€ presentation/                   # Presentation Layer 
β”‚   β”œβ”€β”€ ui/                         # Compose UI 
β”‚   β”‚   β”œβ”€β”€ home/ 
β”‚   β”‚   β”‚   β”œβ”€β”€ HomeScreen.kt 
β”‚   β”‚   β”‚   β”œβ”€β”€ HomeViewModel.kt 
β”‚   β”‚   β”‚   └── HomeUiState.kt 
β”‚   β”‚   β”œβ”€β”€ search/ 
β”‚   β”‚   β”‚   β”œβ”€β”€ SearchScreen.kt 
β”‚   β”‚   β”‚   β”œβ”€β”€ SearchViewModel.kt 
β”‚   β”‚   β”‚   └── SearchUiState.kt 
β”‚   β”‚   β”œβ”€β”€ details/ 
β”‚   β”‚   β”‚   β”œβ”€β”€ BookDetailScreen.kt 
β”‚   β”‚   β”‚   β”œβ”€β”€ BookDetailViewModel.kt 
β”‚   β”‚   β”‚   └── BookDetailUiState.kt 
β”‚   β”‚   β”œβ”€β”€ favorites/ 
β”‚   β”‚   β”‚   β”œβ”€β”€ FavoritesScreen.kt 
β”‚   β”‚   β”‚   β”œβ”€β”€ FavoritesViewModel.kt 
β”‚   β”‚   β”‚   └── FavoritesUiState.kt 
β”‚   β”‚   └── profile/ 
β”‚   β”‚       β”œβ”€β”€ ProfileScreen.kt 
β”‚   β”‚       β”œβ”€β”€ ProfileViewModel.kt 
β”‚   β”‚       └── ProfileUiState.kt 
β”‚   β”‚ 
β”‚   β”‚ 
β”‚   └── navigation/ 
β”‚       └── NavGraph.kt 
β”‚ 
β”œβ”€β”€ common/                         # Common utilities & helpers 
β”‚   β”œβ”€β”€ constants/ 
β”‚   β”‚   └── ApiConstants.kt 
β”‚   β”œβ”€β”€ utils/ 
β”‚   β”‚   β”œβ”€β”€ NetworkResult.kt        # Sealed class for Success/Error/Loading 
β”‚   β”‚   β”œβ”€β”€ Extensions.kt           # Common extension functions 
β”‚   β”‚   └── DispatcherProvider.kt   # For coroutines testability 
β”‚ 
β”œβ”€β”€ MainActivity.kt                  # Host Compose + Navigation 
└── BooksExplorerApplication.kt               # Application class (Hilt)  

πŸ”Œ API Reference

πŸ“š Learning Purpose

This app was built to cover:

  • Jetpack Compose UI + Navigation
  • RoomDB
  • Coroutines + Flows
  • Hilt Dependency Injection
  • MVVM + Clean Architecture
  • Retrofit Networking
  • Paging 3
  • Writing Unit Tests + enforcing coverage thresholds
  • Enforcing code quality with Detekt

πŸ‘¨β€πŸ’» Author

Shubham Gadekar

About

πŸ“– Book Explorer App – An Android app built with Modern Android Concepts.
It lets users search and explore books from the Google Books API, view details, save favorites offline, and navigate seamlessly with Compose Navigation. Designed as a practice + showcase app to cover major modern Android concepts.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages