A modern, adaptive Android application for Rick and Morty enthusiasts, built with Jetpack Compose, Material 3, and Clean Architecture.
- Adaptive Layouts: Supports various screen sizes using
NavigationSuiteScaffold(Bottom Bar for mobile, Navigation Rail for landscape/tablets). - Authentication: Secure user login and signup flow powered by Firebase Auth.
- Characters: Explore the vast multiverse of Rick and Morty characters with custom infinite scroll.
- Locations: Discover all the weird and wonderful places in the show with infinite scroll.
- Episodes: Browse through all seasons and episodes with infinite scroll.
- Favorites: Save your favorite characters, locations, and episodes for quick access.
- Profile: Manage your user profile and settings with a polished Material 3 UI.
- Performance: Optimized for speed and smoothness using Baseline Profiles.
The project is built following Clean Architecture principles and the MVVM (Model-View-ViewModel) pattern to ensure scalability, maintainability, and testability.
- Domain Layer: The heart of the application. Contains Entities, Repository Interfaces, and Use Cases. It is purely Kotlin/Java and has no dependencies on the Android framework.
- Data Layer: Responsible for data retrieval and persistence. Implements the Domain's Repository interfaces using Retrofit for network calls and Room for local storage.
- Presentation Layer: Handles the UI and user interaction. Built with Jetpack Compose, it follows the MVVM pattern where ViewModels interact with Use Cases and expose state via Kotlin Flow and Compose State.
The project is modularized to improve build performance and enforce a clear separation of concerns:
:app: The main entry point. Contains the implementation of core features (Characters, Locations, Episodes, Favorites, Profile).:auth: A feature module dedicated to authentication logic, including login and signup screens.:common: A core module providing shared resources, utilities, and base classes used across the entire project.:benchmark: A dedicated module for performance testing using Macrobenchmark and Baseline Profile generation.
- Language: Kotlin
- UI: Jetpack Compose with Material 3 Adaptive Navigation.
- Dependency Injection: Hilt (Dagger).
- Networking: Retrofit with Gson.
- Local Database: Room.
- Image Loading: Coil.
- Navigation: Type-safe Compose Navigation using Kotlin Serialization.
- Concurrency: Kotlin Coroutines & Flow.
- Firebase:
- Authentication: User identity management.
- Analytics: Understanding user engagement.
- Crashlytics: Real-time crash reporting.
The app uses Jetpack Macrobenchmark to measure critical user journeys (CUJs) like app startup and list scrolling. We also utilize Baseline Profiles to significantly improve app startup time and reduce jank.
To run benchmarks:
- Ensure you have a rooted device or emulator with API 24+.
- Run the command:
./gradlew :benchmark:connectedCheck
The project includes a robust testing suite covering all architectural layers:
- Unit Tests:
- Instrumented Tests:
- Tools: Compose UI Test library.
- Coverage: Verified UI components and user interaction flows on actual devices/emulators.
- Database Tests:
- Coverage: Room DAO operations are verified using in-memory databases.
The project is configured with GitHub Actions for automated quality assurance.
- Build Automation: Every push and pull request triggers a full project build.
- Static Analysis: Automated Lint checks ensure adherence to coding standards.
- Automated Testing: All unit tests are executed automatically in the CI environment to prevent regressions.
- Configuration: See
.github/workflows/android.ymlfor the detailed workflow setup.
To maintain high code quality and consistent formatting, run these commands locally before committing your changes:
| Task | Command |
|---|---|
| Format Code | ./gradlew spotlessApply |
| Check Formatting | ./gradlew spotlessCheck |
| Full Lint Check | ./gradlew lint |
| Unit Tests | ./gradlew test |
| Static Analysis (app) | ./gradlew :app:lintDebug |
Note:
spotlessApplyuses ktlint to automatically format your Kotlin code and Gradle scripts. After running lint, you can find detailed HTML reports in:[module]/build/reports/lint-results-debug.html
All data is provided by The Rick and Morty API.
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Developed with ❤️ by Mukesh








