A modern Android News Application built using Jetpack Compose, MVVM Architecture, and Dagger dependency injection. This project demonstrates best practices in Android development, including clean architecture, reactive UI, and robust networking.
- Top Headlines: Stay updated with the latest news from around the world.
- News Sources: Browse news from various reputable publishers.
- Search: Search for specific news articles or topics.
- Filters: Filter news based on Country and Language.
- Offline Support: Basic logging and error handling for a seamless experience.
- Modern UI: Fully built with Jetpack Compose following Material 3 design guidelines.
- Language: Kotlin
- UI Framework: Jetpack Compose (Material 3)
- Architecture: MVVM (Model-View-ViewModel)
- Dependency Injection: Dagger 2
- Networking: Retrofit 2 & OkHttp
- Image Loading: Coil & Fresco
- Async Programming: Kotlin Coroutines & Flow
- Jetpack Components:
- ViewModel
- Lifecycle
- Compose Navigation
com.sundramsingh.newsapp
├── data # Data layer (API, Models, Repositories)
│ ├── api # Retrofit interfaces
│ ├── model # Data classes for API responses
│ └── repository # Single source of truth for data
├── di # Dependency Injection (Modules, Components)
├── ui # UI layer (Compose Screens & ViewModels)
│ ├── topheadline # Top headlines screen
│ ├── search # News search functionality
│ ├── newssources # News sources screen
│ ├── country # Country selection
│ ├── language # Language selection
│ └── theme # Material 3 Theme definitions
├── common # Shared utilities and constants
└── NewsAppApplication # Application class
- Clone the repository:
git clone https://github.com/sundramsingh/NewsApp-MVVM-Architecture.git
- Open in Android Studio:
- File > Open > Select the project folder.
- API Key:
- Obtain an API key from NewsAPI.org.
- (Optional) Add your API key to the project (e.g., in a
local.propertiesor constant file as per your implementation).
- Build & Run:
- Sync Gradle and run the app on an emulator or physical device.
The project includes unit and UI tests:
- Unit Tests: Located in
app/src/test. - Instrumentation Tests: Located in
app/src/androidTest(including Compose UI tests).
This project is licensed under the MIT License - see the LICENSE file for details.