A news tracking application developed with Kotlin

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

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 foldersapi.properties

Project Folder Structure

Project Folder StructureDescription
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 FolderDescription
This folder generally contains semi-independent classes from the project, project-specific constants, enums, and utilities.

data folder

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

di folder

di FolderDescription
This folder is where we manage dependency injection.

domain folder

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

presentation folder

presentation FolderDescription
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

GitHub

View Github

Leave a Reply

Your email address will not be published. Required fields are marked *