This is the first Android app I built using Deep Seek (via the Cline client).
World News is an Android application built with Kotlin and Jetpack Compose that fetches and displays the latest top headlines from NewsAPI.org. It presents a clean, scrollable list of news articles with images, and lets you tap any article to read the full content in-app.
| Technology | Purpose |
|---|---|
| Kotlin | Primary language |
| Jetpack Compose (Material3) | Declarative UI framework |
| Ktor Client (CIO engine) | Networking — fetches news from the API |
| Kotlinx Serialization | JSON deserialisation for API responses |
| Jetpack Navigation Compose | In-app screen navigation (list → detail) |
| Coil (Compose) | Asynchronous image loading for article thumbnails |
| Jetpack ViewModel + StateFlow | MVVM architecture and reactive UI state |
| AndroidX Lifecycle | Lifecycle-aware components |
| JUnit + Ktor Mock + Compose UI Test | Unit and UI testing |
The app follows the MVVM (Model-View-ViewModel) pattern with a Repository layer:
UI (Compose Screens) → ViewModel → Repository → NewsApiService (Ktor) → NewsAPI.org
- Model —
Article,NewsResponsedata classes with@Serializable - Network —
NewsApiServiceusing Ktor with Content Negotiation + JSON - Repository —
NewsRepositoryas a single source of truth (with optional caching) - ViewModel —
NewsViewModelexposes aStateFlow<NewsUiState>to the UI (Loading / Success / Error) - UI —
NewsListScreen(scrollable card list),NewsDetailScreen(full article view)
- 📰 Fetches real-time top headlines from NewsAPI
- 🖼️ Displays article images, titles, descriptions, and source badges
- 🔍 Tap any article to read the full content in a scrollable detail screen
- ⏳ Loading spinner and error handling with user-friendly messages
- 📱 Material3 design with a dark/light theme
- Get a free API key from https://newsapi.org/register
- Open
Constants.ktand replace the placeholder with your key:const val NEWS_API_KEY = "your_api_key_here"
- Build and run the app on an emulator or device (min SDK 30).
app/
├── src/
│ ├── main/
│ │ ├── java/com/example/firstappwithdeepseek/
│ │ │ ├── Constants.kt # API config (base URL, key)
│ │ │ ├── MainActivity.kt # Single activity entry point
│ │ │ ├── model/
│ │ │ │ ├── Article.kt # Data model
│ │ │ │ └── NewsResponse.kt # API response model
│ │ │ ├── network/
│ │ │ │ └── NewsApiService.kt # Ktor HTTP client
│ │ │ ├── repository/
│ │ │ │ └── NewsRepository.kt # Data repository
│ │ │ ├── ui/
│ │ │ │ ├── navigation/
│ │ │ │ │ └── AppNavigation.kt # NavHost + routes
│ │ │ │ ├── screen/
│ │ │ │ │ ├── NewsListScreen.kt # Article list
│ │ │ │ │ └── NewsDetailScreen.kt # Article detail
│ │ │ │ ├── theme/ # Material3 theme
│ │ │ │ └── viewmodel/
│ │ │ │ └── NewsViewModel.kt # UI state management
│ │ │ └── ...
│ │ └── res/ # Resources (strings, etc.)
│ ├── test/ # Unit tests (ViewModel + API)
│ └── androidTest/ # UI tests (Compose)
- The app uses the free tier of NewsAPI, which provides top headlines. For production use, consider upgrading or adding a caching layer.
- This project was built entirely with the assistance of Deep Seek through the Cline client — an AI-powered development workflow.