Code Monkey home page Code Monkey logo

newsapp's Introduction

Simple News Application

This application demonstrates clean architecture principles implemented with Jetpack Compose, MVVM, Coroutines, Flows, States, Hilt, and an abstracted repository layer.

Architecture

  • Clean Architecture: The application is divided into layers:
    • Presentation: View and ViewModel (MVVM) using Jetpack Compose
    • Data: Repository and data sources (remote)
    • Domain: Model and business logic
  • Jetpack Compose: Used for building the UI
  • MVVM: ViewModel handles data and business logic, exposing it to the View
  • Coroutines: Used to run asynchronous tasks
  • Flows: Used to handle data streams from the repository
  • States: Used to represent the current state of the application
  • Hilt: Used for dependency injection
  • Abstracted Repository Layer: Provides a single point of access to data, regardless of the source
  • Data Source Layers: Separate implementations for local and remote data sources

Features

  • Displays a list of news articles
  • Allows refreshing the news list
  • Shows a loading indicator while fetching data
  • Displays an error message if there is an error fetching data
  • Allows saving articles to favorites
  • Displays a list of favorite articles

Technology Stack

  • Android Studio
  • Kotlin
  • Jetpack Compose
  • MVVM
  • Coroutines
  • Flow
  • StateFlow
  • Hilt
  • Retrofit (remote data)
  • Dagger (dependency injection)
  • Jetpack Compose - Modern Android UI toolkit.
  • ViewModel - Architecture component for managing UI-related data.
  • MVVM - Model-View-ViewModel architectural pattern.
  • Coroutines - Kotlin's concise and expressive way of handling asynchronous programming.
  • Flows - Kotlin's reactive streams for asynchronous programming.
  • Hilt - Dependency injection library for Android.
  • Abstracted Repository Layer - Handling data operations and providing a clean API to the rest of the application.
  • Data Source Layers - Managing the source of data, whether it be a network or local database.

Getting Started

  1. Clone or download the project.
  2. Add your news api key (you can get it from News Api).
  3. Open the project in Android Studio.
  4. Build and run the application.

Contributing

Feel free to contribute to this project by creating pull requests.

License

This project is licensed under the MIT License 2.0.

Disclaimer

This project is intended for demonstration and educational purposes only and is not a complete or production-ready application.


newsapp's People

Contributors

rahuljidgedev avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.