Explorer is a modern Android application that demonstrates contemporary Android development practices. It allows users to search for countries and view detailed information using the RestCountries API.
- 🔍 Country Search: Search for countries by name with real-time debounced input
- 🏳️ Country Listing: View search results with country flags and official names
- 📄 Country Details: Full text search with detailed country information (name, capital, region, subregion)
- ⚡ Reactive UI: Loading states and error handling with smooth user experience
- 🏗️ Clean Architecture: Built with MVI (Model-View-Intent) pattern for maintainable code
- 📱 Modern UI: Edge-to-edge design with Material 3 components
- 🔧 Custom Logging: Automatic tagging system for better debugging and monitoring
- Kotlin 2.0.21: Primary programming language with latest features
- Jetpack Compose: Declarative UI toolkit with Material 3 design
- Coroutines & Flow: Asynchronous programming and reactive data streams
- Hilt/Dagger: Dependency injection framework
- Retrofit 2.9.0: Type-safe HTTP client for API communication
- Kotlinx Serialization: Modern JSON parsing and serialization
- ViewModel: Lifecycle-aware UI state management
- Navigation Compose: Type-safe navigation between screens
- MVI Architecture: Unidirectional data flow pattern
- Detekt: Static code analysis for code quality
- Mockito & Turbine: Comprehensive testing framework
- Android Studio: Iguana (2023.2.1) or newer
- Android SDK: API level 24 (Android 7.0) or higher
- Java: JDK 11 or higher
- Clone the repository:
git clone https://github.com/YOUR_USERNAME/Explorer.git cd Explorer - Open in Android Studio: Open the project in Android Studio and let it sync dependencies automatically.
- Build and Run:
Or use Android Studio's "Run" button to build and install on an emulator or device.
./gradlew assembleDebug
app/src/main/java/com/ferrarib/explorer/
├── 🎯 presentation/ # UI Layer (Compose + ViewModels)
│ ├── home/ # Home screen with navigation menu
│ ├── search/ # Country search feature
│ └── countrydetails/ # Detailed country information view
├── 📊 data/ # Data Layer
│ └── repository/ # Repository implementations
├── 🔧 core/ # Core Infrastructure
│ ├── data/ # Network models and API definitions
│ ├── di/ # Dependency injection modules
│ ├── ui/ # Reusable UI components & Material 3 theme
│ │ └── theme/ # Material 3 theme configuration (Color, Theme, Type)
│ └── utils/ # Utilities (AppLogger, etc.)
├── 🏛️ domain/ # Business Logic Layer
└── 🧭 navigation/ # App navigation setup
- MVI Pattern: Unidirectional data flow with State, Action, and Effect
- Repository Pattern: Centralized data access and caching
- Dependency Injection: Hilt modules for clean separation of concerns
- Custom Components: Reusable UI components (AppBar, MenuButton)
- Debounced Search: Performance-optimized search with 800ms delay
The project includes comprehensive testing:
# Run unit tests
./gradlew test
# Run instrumented tests
./gradlew connectedAndroidTest
# Run static analysis with Detekt
./gradlew detekt- Unit Tests: ViewModel logic with Mockito and Turbine
- UI Tests: Compose UI testing with Espresso
- Integration Tests: Repository and API integration
- Static Analysis: Code quality checks with Detekt
Contributions are welcome! Please follow these steps:
- Fork the Project
- Create a Feature Branch:
git checkout -b feature/amazing-feature - Run Tests: Ensure all tests pass before committing
- Commit Changes:
git commit -m 'Add amazing feature' - Push to Branch:
git push origin feature/amazing-feature - Open a Pull Request
- Follow Kotlin coding conventions
- Use Detekt for static analysis
- Write tests for new features
- Update documentation as needed
- Home Screen: Simple navigation menu to access app features
- Search Screen: Real-time country search with flag display
- Results List: Clean listing with country flags and official names
- Loading States: Smooth loading indicators and error handling
This project is distributed under the terms of the license. See the LICENSE file for more details.