Skip to content

Latest commit

ย 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ“ฐ DailyLens โ€“ Android News Application

Kotlin Compose Architecture

A modern Android News App built with Jetpack Compose, MVVM & Retrofit.
Real-time news by category with clean UI, pull-to-refresh, and robust error handling.


โœจ Highlights

  • ๐Ÿ“ฐ Real-time news updates
  • โšก Smooth Jetpack Compose UI
  • ๐Ÿ”„ Pull-to-refresh support
  • ๐ŸŒ™ Light / Dark mode toggle
  • ๐Ÿ“ฑ Tablet compatibility
  • ๐Ÿšจ Error handling for API & network

This app delivers the latest news across multiple categories with a smooth, responsive UI and supports both light & dark mode along with tablet compatibility.


โœจ Features

  • ๐Ÿ—‚๏ธ Browse news by categories (Business, Sports, Technology, etc.)
  • ๐ŸซŸ Splash Screen with App Icon
  • ๐Ÿ”„ Pull-to-refresh for latest updates
  • โšก Fast & responsive UI using Jetpack Compose
  • ๐Ÿง  MVVM architecture for clean and scalable code
  • ๐ŸŒ API integration using Retrofit
  • ๐Ÿšจ Robust error handling (network issues, API limits, invalid responses)
  • ๐Ÿ”— Open full articles in browser
  • ๐ŸŒ™ Light / Dark mode toggle
  • ๐Ÿ“ฑ Tablet mode compatibility
  • ๐ŸŽฏ Minimal, modern UI design

๐Ÿ“ฑ Tech Stack

Layer Technology
UI Jetpack Compose
Architecture MVVM
Networking Retrofit
Async Kotlin Coroutines
State Mgmt State / MutableState
Language Kotlin

๐Ÿ—๏ธ Project Structure

๐Ÿ“ฆ newspaperapp
โ”ฃ ๐Ÿ“‚ data
โ”ƒ โ”— ๐Ÿ“œ NewsRepository.kt
โ”ฃ ๐Ÿ“‚ ui
โ”ƒ โ”ฃ ๐Ÿ“œ NewsScreen.kt
โ”ƒ โ”ฃ ๐Ÿ“œ NewsItem.kt
โ”ƒ โ”— ๐Ÿ“œ NewsDetail.kt
โ”ฃ ๐Ÿ“‚ viewmodel
โ”ƒ โ”— ๐Ÿ“œ NewsViewModel.kt
โ”ฃ ๐Ÿ“‚ network
โ”ƒ โ”— ๐Ÿ“œ RetrofitInstance.kt
โ”— ๐Ÿ“œ MainActivity.kt

๐Ÿงญ Architecture Overview

This app follows the MVVM (Model-View-ViewModel) architecture with a unidirectional data flow.

flowchart TD

    UI[Jetpack Compose UI]
    VM[NewsViewModel]
    Repo[NewsRepository]
    API[Retrofit API Service]
    Network[Remote API]

    UI -->|User Actions| VM
    VM -->|Requests Data| Repo
    Repo -->|API Call| API
    API -->|HTTP Request| Network
    Network -->|JSON Response| API
    API -->|Parsed Data| Repo
    Repo -->|Articles List| VM
    VM -->|UI State Update| UI
Loading

๐Ÿ”„ Data Flow Explanation

  • UI Layer (Compose)
    Displays news and sends user interactions (refresh, category change)

  • ViewModel (NewsViewModel)
    Handles UI state (loading, success, error) and communicates with repository

  • Repository (NewsRepository)
    Fetches data from API and handles errors

  • Network Layer (Retrofit)
    Executes HTTP requests and parses responses


โšก State Handling Flow

flowchart LR

    Start[User Action / App Launch]
    Loading[Loading State]
    Success[Success State - Show Articles]
    Error[Error State - Show Message]

    Start --> Loading
    Loading --> Success
    Loading --> Error
Loading

๐ŸŽฌ Demo Videos

๐Ÿ“น App flow in mobile and tablet:

https://youtu.be/TcfplDax_m8?si=K_Gs6e-bRGGRmsd5

Demo Videos:

Sign.Up.mp4
Log-in.mp4
Category-selector.mp4
Home-news-category-page.mp4
news.details.mp4
profile.mp4
about-us-and-update-category.mp4
all-category-news.mp4
update-name-and-password.mp4
landscape.mode.mp4
without.internet.mp4

๐Ÿ”‘ API Key Setup (IMPORTANT)

โš ๏ธ This project does NOT include an API key for security reasons.

To run the app with full functionality:

  1. Get your API key from a news provider (e.g., GNews / NewsAPI)
  2. Open local.properties
  3. Add:
NEWS_API_KEY=your_api_key_here
  1. Ensure BuildConfig is configured to access this key

โš ๏ธ Notes

  • API rate limits may apply
  • Internet connection required
  • Some categories may return empty results depending on region
  • API key is required for full functionality

๐Ÿง  Learnings / Highlights

  • Implemented clean MVVM architecture
  • Managed UI state effectively with Compose
  • Handled real-world API failures gracefully
  • Built responsive UI supporting multiple screen sizes
  • Integrated dark/light theme handling

๐Ÿ”ฎ Future Improvements

  • ๐Ÿ” Search functionality
  • โค๏ธ Bookmark articles
  • ๐Ÿ—„๏ธ Room Database integration:
    • Offline caching of news
    • User authentication (Signup/Login)
  • ๐Ÿ”” Push notifications
  • ๐Ÿ“Š Better personalization & recommendations

๐Ÿ“„ License

Copyright (c) 2026 Kunal

All rights reserved.

Unauthorized use, reproduction, or distribution of this software, in whole or in part, is strictly prohibited without prior written permission from the author.

About

Modern Android News App built with Jetpack Compose, MVVM & Retrofit. Real-time news by category with clean UI, pull-to-refresh, and robust error handling. Requires your own API key.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors