Skip to content

NewsGo - Your daily shot of news on the Go. NewsGo is a Kotlin Multiplatform Mobile Application for Android and iOS.

License

Notifications You must be signed in to change notification settings

Vaibhav2002/NewsGo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

98 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

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

About

NewsGo - Your daily shot of news on the Go. NewsGo is a Kotlin Multiplatform Mobile Application for Android and iOS.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published