ReadX is a modern Android application that showcases Tolkien's books using the Open Library API. Built with Jetpack Compose and following clean architecture principles, it demonstrates modern Android development practices.
- 📚 Browse Tolkien's books with cover images and details
- 🎨 Clean and intuitive Material 3 UI
- 📱 Responsive grid layout
- 🖼️ Edge-to-edge design
- 🌓 Dark theme support
⚠️ Error handling and retry mechanism- ⌛ Loading states
The app follows Clean Architecture principles with a clear separation of concerns:
- Presentation Layer: Compose UI, ViewModels
- Domain Layer: Use Cases, Repository Interfaces
- Data Layer: Repository Implementations, API Services, DTOs
- UI:
- Jetpack Compose
- Material 3
- Architecture Components
- 📱 ViewModel
- 🧭 Navigation
- 💉 Hilt (Dependency Injection)
- Networking
- Retrofit
- OkHttp
- Gson
- Image Loading:
- Coil 3
- Concurrency:
- Kotlin Coroutines & Flows
- Build System:
- Gradle with Version Catalog
- Android Studio Iguana or later
- ☕ JDK 17
- 📱 Android SDK with minimum API level 24
- Clone the repository: git clone https://github.com/yourusername/ReadX.git
- Open the project in Android Studio
- Sync the project with Gradle files
- Run the app on an emulator or physical device
app/
├── build.gradle.kts # Module-level Gradle build file
├── src/
│ └── main/
│ ├── java/com/tamersarioglu/readx/
│ │ ├── data/ # Data layer (repositories, API, models)
│ │ ├── domain/ # Domain layer (use cases, models)
│ │ ├── di/ # Dependency injection modules
│ │ ├── presentation/ # UI layer (screens, viewmodels)
│ │ └── utils/ # Utility classes
│ └── res/ # Resources
- UI Layer interacts with ViewModel
- ViewModel executes Use Cases
- Use Cases communicate with Repository
- Repository fetches data from API
- Data flows back through the layers using Kotlin Flow
AuthorApi
: Interface for the Open Library APIBooksRepositoryImpl
: Implementation of the repository pattern- Data models and mappers
Book
: Domain modelBooksRepository
: Repository interfaceGetBooksUseCase
: Use case for fetching books
BooksViewModel
: Manages UI state and business logic- Compose UI components (BookCard, BookGrid, etc.)
- Navigation setup
The app uses the Open Library API to fetch Tolkien's books:
- Base URL:
https://openlibrary.org/
- Endpoints:
- Search:
/search.json
- Search:
- Parameters:
author
: Author name (fixed to "tolkien")sort
: Optional sorting parameter
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
- Open Library API for providing the book data
- Material Design 3 for the design system
- The Jetpack Compose team for the modern UI toolkit