Skip to content

Yusuf-Solmaz/NewsZone

Repository files navigation

NewsZone

API

NewsZone is a news reading application that allows users to follow daily news, search for news, save news, customize the homepage, and many other features.

Table of Contents

  1. Key Features
  2. Screenshots
  3. Demo
  4. Open-Source Libraries
  5. Architecture
  6. API
  7. Getting Started
  8. Contact
  9. Licence

Key Features

  • Determine Category: NewsZone helps you set the category of news to be displayed on the homepage. You can change this category at any time.
  • Navigate the News: Get breaking news and read news in the category of your choice.
  • Check News Details: Browse the details of the news you clicked on. Read as you wish.
  • Get the News Summary: NewsZone works with Gemini to allow you to get a summary of the news without reading the full story.
  • Save and Delete News: Save news stories you like or want to read later, or delete them if you no longer need them.
  • Share the News: You can go to the web page of the news you want or share the news with your friends.
  • Search for News: Search news by popularity, publication time, relevance, title, description, content and date.
  • Get the Latest News with Notification: NewsZone ensures you get the latest news every hour with a notification.
  • Navigate Offline: NewsZone allows you to read news even when you are not connected to the internet.

Screenshots

Splash Onboarding Determine Category
Home News Detail News Summary
Search Search Options Saved News
Settings Light Mode Language Exchange Notification

Demo

newszone.1.mp4

Open-Source Libraries

  • WorkManager - Used for managing and scheduling deferrable, asynchronous tasks that are expected to run even if the app is closed or the device restarts.
  • Paging 3 - This library is optimized to manage the paging process and keep the UI responsive when loading data.
  • Hilt - Used for dependency injection, simplifying the management of application components.
  • Jetpack Compose - A modern toolkit for building native UI in Android.
  • Navigation - Handles in-app navigation in a type-safe manner.
  • Coroutines - Provides a simple way to manage background threads, making asynchronous programming easier and more efficient.
  • Flow - A reactive streams API in Kotlin used for managing data streams asynchronously.
  • DataStore - Handles data storage and persistence, replacing SharedPreferences for more complex data structures.
  • MVVM - A design pattern used to separate concerns, making the application more modular, testable, and maintainable.
    • Lifecycle - Manages Android lifecycle-aware components.
    • ViewModel - Stores UI-related data that isn't destroyed on UI changes.
    • UseCases - Located domain layer that sits between the UI layer and the data layer.
    • Repository - Located in the data layer that contains application data and business logic.
  • Retrofit A type-safe HTTP client for Android and Java
  • OkHttp An HTTP client that efficiently makes network requests
  • Gson - A library for serializing and deserializing JSON data.
  • Lottie Animation - Used to display animations in the app.
  • Coil - An image-loading library for Android backed by Kotlin Coroutines.
  • Gemini - A powerful AI model developed by Google, designed to assist with natural language understanding, generation, and multimodal tasks, providing advanced capabilities for building intelligent applications.

Architecture

This Android app uses the MVVM (Model-View-ViewModel) pattern and Clean Architecture principles, organized into four main modules for better scalability and maintainability.

MVVM

  • Model: Manages data and business logic, separate from the UI.
  • View: Displays the data and interacts with the user.
  • ViewModel: Connects the View and Model, handling UI-related logic and state management.

Clean Architecture & Multi Module

  • App Module: The core module that integrates all other modules and provides the main entry point of the application.
  • Data Module: Handles data sources, such as APIs and databases, and provides data to the Domain Layer.
  • Domain Module: Contains the core business logic and use cases, which are independent of external frameworks.
  • Presentation (Feature) Module: Encapsulates the app's features, allowing for modular development and testing of individual functionalities.

image

API

The application integrates with the following APIs:

  • News API: Provides news data. More information can be found here.
  • Gemini API: Provides a summary of the news. More information can be found here.

Getting Started

  • If You Want to Run the App on Android Studio:
  1. Clone this repository to your preferred directory using the following command:
git clone https://github.com/Yusuf-Solmaz/NewsZone
  1. Open the cloned project in Android Studio.

    Configuration Steps

  2. Create api.properties file in the project directory.

  3. Add the following line with your API keys (for news and Gemini API ) and to api.properties:

API_KEY=YOUR_API_KEY_HERE
GEMINI_API_KEY=YOUR_GEMINI_API_KEY_HERE
  1. Build and run the app on an emulator or a physical device.

Contact

Yusuf Mücahit Solmaz - yusufmucahitsolmaz@gmail.com linkedin

Licence

This project is licensed under the MIT License. See the LICENSE file for details.