Skip to content

Latest commit

 

History

History
116 lines (70 loc) · 4.29 KB

README.md

File metadata and controls

116 lines (70 loc) · 4.29 KB

KotNews | A Kotlin-powered News App

It is a news tracking application developed with Kotlin. MVVM Clean Architecture has been used, and it includes popular and up-to-date libraries.

The purpose of this repository is to serve as a guide for beginners.

cover_image

Contents

Preview

KotNews.mp4

Setup

  • Clone the repository
  • Create a file named api.properties in the root folder
  • Define two constant variables named API_BASE_URL and API_KEY inside it.
  • Get an API key from https://newsapi.org
root folders api.properties
image image

Project Folder Structure

Project Folder Structure Description
The folder structure of the project is as shown on the left. The Clean Architecture approach has been used. Below are the explanations and details of the folders.
  • core
  • data
  • di
  • domain
  • presentation

core folder

core Folder Description
This folder generally contains semi-independent classes from the project, project-specific constants, enums, and utilities.

data folder

data Folder Description
This folder contains classes where we get, manage, and distribute the data.

di folder

di Folder Description
This folder is where we manage dependency injection.

domain folder

domain Folder Description
This folder is where we can access data from a single repository and manage our use-cases

presentation folder

presentation Folder Description
This folder is where we manage our UI components. We manage many components such as Activities, Fragments, ViewModels, and Adapters in this folder.

App.kt file

This class extends the Application class and is annotated with the @HiltAndroidApp annotation.

@HiltAndroidApp
class App: Application()

Project Architecture

In this project, a modular architecture is designed using Clean Architecture and MVVM approaches to make the development and maintenance of the application easier. Clean Architecture ensures that each layer of the application is independent of each other and responsible for a specific task.

KotNews Architecture

Dependencies

  • Navigation
  • Coroutines
  • Retrofit
  • GSON
  • OkHttp
  • Lifecycle [ViewModel - LiveData]
  • Dagger & Hilt
  • Glide
  • Paging 3
  • Lottie
  • Room