A modern Android application to browse video games by genre using the RAWG API.
Built with modern Android stack and clean architecture principles.. The project is developed using Kotlin, Jetpack Compose, and follows Clean Architecture with the MVI (Model-View-Intent) pattern, demonstrating best practices in modularity, caching, and state management.
| Home Screen | Real-time Search | Local Search |
|---|---|---|
![]() |
![]() |
![]() |
| Game Details | Trailer by ExoPlayer | Game Details |
|---|---|---|
![]() |
![]() |
![]() |
| Home Screen with Shimmer | Wrong Search Screen | Network Error Screen |
|---|---|---|
![]() |
![]() |
![]() |
Based on the assignment brief requirements:
- ๐ฎ Browse Games by Genre: Displays a paginated list of games that can be filtered by selecting different genres (Action, RPG, Strategy, etc.).
- ๐ Local Search: Instantly filter the already-loaded games in-memory without making additional API calls.
- ๐ Game Details: View comprehensive info for a selected game, including name, image, release date, rating, and description.
- โก Offline-First (Caching):
- Automatically caches data locally using Room Database.
- List Screen: Uses
RemoteMediatorto cache paginated results. When offline, users can still view previously loaded games. - Details Screen: Instantly loads basic game info from the local cache, then fetches the full description from the API in the background and updates the UI seamlessly.
- ๐จ Material Design 3: Modern, responsive UI implemented completely with Jetpack Compose.
- ๐ฆ Robust State Handling: Clear visual states for Loading (Shimmer), Error (with Retry action), and Empty results.
This project uses the latest modern Android development tools:
| Category | Library/Tool |
|---|---|
| Language | Kotlin |
| UI Framework | Jetpack Compose (Material 3) |
| Architecture | Clean Architecture + MVI |
| DI | Koin |
| Network | Ktor |
| Local Database | Room Database |
| Async | Coroutines & Flow |
| Pagination | Paging 3 (Remote Mediator) |
| Image Loading | Coil |
| Testing | JUnit4, Mockk, Turbine, Compose UI Test |
| Build System | Gradle (Version Catalogs - TOML) |
| Version Control | Git Flow Workflow |
To run this project locally, follow these steps:
- Android Studio Ladybug (or newer).
- JDK 17 or higher.
git clone [https://github.com/YOUR_USERNAME/GameHub.git](https://github.com/YOUR_USERNAME/GameHub.git)
cd GameHubThis project requires a RAWG API Key.
Register at RAWG.io.
Request an API Key.
Open the local.properties file in the root directory of the project (create it if it doesn't exist).
Add your key as follows:
API_KEY="your_api_key_here"Sync Project with Gradle Files.
Select the app configuration.
Run on an Emulator or Physical Device.
- Filters already fetched games in memory.
- No additional API calls are made.
- Works instantly.
- Does not break pagination state.
This follows the assignment requirement to avoid extra API calls during search.
The app follows an Offline-First approach:
- Games are cached in Room database.
- On first load โ fetch from API and save locally.
- If network fails โ show cached data.
- RemoteMediator keeps local and remote data in sync.
The project includes comprehensive testing strategies:
Unit Tests: Covers Repositories using Mockk and Turbine.
To run tests via terminal:
./gradlew testDebugUnitTest # Run Unit Tests
This project utilizes the Git Flow branching model:
main: Production-ready code.
develop: Integration branch for features.
feature/*: Individual features (e.g., feature/caching, feature/search).
release/*: Preparation for a new production release.
Made with โค๏ธ by Mohammad Ashrf To Bosta Team








