Skip to content

Latest commit

 

History

History
176 lines (134 loc) · 9.4 KB

README.md

File metadata and controls

176 lines (134 loc) · 9.4 KB

News Go - Your daily shot of news on the go 🚀

About NewsGo

NewsGo is a news feed application built using Kotlin Multiplatform Mobile. NewsGo currently offers Android and iOS Applications with Desktop and Website support to be added soon.

  • Material You based theming with dynamic color support in Android App
  • Support for both dark and light themes. 🌗
  • Clean Code Quality with best practices, great for learning
  • World Wide News Support

Android App

Android Banner

iOS App

iOS Banner

Application Install

You can Install and test latest NewsGo app from below 👇

NewsGo

For iOS App, please clone the project and build it, or if possible contribute the installable file 😅

Setup

  • Clone the repository on your machine.
  • Create account on News Api and get your api key
  • If you want crash and analytics reporting, create a project on Firebase, enable crashlytics and analytics and paste the google.services.json file in androidApp directory for android else remove the firebase dependencies from android and project gradle files.

Open Secrets.kt and add your api key

object Secrets {
    const val API_KEY = "" // your api key here
}

App Features

  • Get all the latest news, with options to view from categories like Sports, Tech and many more
  • Save articles to view them offline
  • Search from millions of articles and read whatever you want
  • Read News from all around the world with Country Specific News

ScreenShots 📷

Android

HomeScreen SavedScreen Seacrch Screen ArticleScreen

iOS

HomeScreen SavedScreen Seacrch Screen ArticleScreen

Technical Details 💻

Shared

  • NewsGo's codebase follows Android's recommended architecture
  • Shared ViewModels as well, so the only thing which is not shared is the UI.
  • Reactive data management using Kotlin Flows which makes state auto-update when any changes happen in data.
  • Asychronous handling of data using Kotlin Coroutines.
  • NewsGo supports offline caching so you dont have to look at an empty screen while loading 😄
  • NewsGo's code follows all the best practices and software development principles like SOLID which makes it a very good learning resource for beginners.
  • Code is properly linted using Kt-lint.

Android

  • NewsGo android app is built using Kotlin.
  • App User Interface is built using Jetpack Compose. No more XML 😜
  • Code follows Dependency Injection practices using Hilt.
  • NewsGo's codebase follows Android's recommended architecture
  • Material 3 based theming with dynamic colors based on your phone's wallpaper

iOS

  • NewsGo iOS app is built using Swift.
  • User Inteface is built using Swift UI
  • iOS 16 bases theming.

Built With 🛠

  • Kotlin - First class and official programming language for Android development.
  • Kotlin Multiplatform Mobile - Kotlin Multiplatform Mobile is an SDK for iOS and Android app development. It offers all the combined benefits of creating cross-platform and native apps.
  • Swift - Swift is a powerful and intuitive programming language for iOS, iPadOS, macOS, tvOS, and watchOS.
  • Swift UI - SwiftUI helps you build great-looking apps across all Apple platforms with the power of Swift — and surprisingly little code.
  • Coroutines - For asynchronous and more..
  • Flow - A cold asynchronous data stream that sequentially emits values and completes normally or with an exception.
  • StateFlow - StateFlow is a state-holder observable flow that emits the current and new state updates to its collectors.
  • SharedFlow - A SharedFlow is a highly-configurable generalization of StateFlow.
  • Android Architecture Components - Collection of libraries that help you design robust, testable, and maintainable apps.
    • ViewModel - Stores UI-related data that isn't destroyed on UI changes.
  • Dependency Injection -
    • Hilt-Dagger - Standard library to incorporate Dagger dependency injection into an Android application.
    • Hilt-ViewModel - DI for injecting ViewModel.
  • Timber - A simple logging library for android.
  • Coil - An image loading library for Android backed by Kotlin Coroutines.
  • Material 3 Android - Material 3 components for Android in Jetpack compose
  • Kotlin Serialization - Kotlin's own Serialization Api.
  • Kotlin DateTime - A multiplatform Kotlin library for working with date and time.
  • SQL Delight - SQLDelight generates typesafe kotlin APIs from your SQL statements.
  • Ktor Client - Create asynchronous client and server applications. Anything from microservices to multiplatform HTTP client apps in a simple way.
  • News Api - Public API to get news data

Package Structure

Shared

dev.vaibhav.newsapp     # Root Package
.
├── data                # For data handling.
|   ├── local           # Database and Local Datasources
|   ├── remote          # Remote DataSources
│   ├── model           # Model data classes and mappers, both remote and local entities of Data Layer
│   └── repo            # Repository Implementations
|
├── domain              # Domain Layer to abstract data layer details from UI   
|   ├── models          # Model Data Classes for Domain Layer
│   ├── mappper         # Mappers from Data layer models to Domain Layer models
|   ├── usecases        # Use-Case Classes for business logic
|   └── repo            # Repository Definitions
|
├── presentation        # Presentation Layer for UI State and Shared View Model
|   ├── article         # State and ViewModel for Article Detail Screen. 
|   ├── saved           # State and ViewModel for Saved Articles Screen. 
|   ├── home            # State and ViewModel for Home Screen. 
|   └── search          # State and ViewModel for Search Screen.
|
└── utils               # Utility Classes / Kotlin extensions

sqldelight.database     # Database Package containing all SQL Queries

Android App

dev.vaibhav.newsapp.android
.
├── di                  # Dependency Injection             
│   └── module          # DI Modules
|
├── presentation        # UI/View layer
|   ├── components      # All UI Components
|   ├── screens         # All App Screens 
|   └── theme           # Theming classes
|
└── utils               # Utility Classes / Kotlin extensions

iOS App

dev.vaibhav.newsapp.iosApp
.
├── ui 
    ├── components      # Ui Components            
    └── screens         # App Screens

Architecture

This app uses MVVM (Model View View-Model) architecture.


If you like my projects and want to support me to build more cool open source projects

"Buy Me A Coffee"

Contact

If you need any help, you can connect with me.

Visit:- Vaibhav Jaiswal