Skip to content

News app πŸ—žοΈ showcasing MVI architecture combined with Architecture Components

License

Notifications You must be signed in to change notification settings

AkshayChordiya/NewsAppMVI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

NewsApp πŸ—žοΈ

GitHub license

The news app is based upon NewsSampleMVVM but showcases MVI architecture pattern combined with power of ViewModel and LiveData, thanks to Roxie library

What's the app about?

It's a simple news app πŸ—žοΈwhich uses NewsAPI to fetch top news headlines from the API. The main aim of this app is to show how MVI helps in managing state combined with power of ViewModel and LiveData to make our lives easier.

The idea is to add new features With time to build a full-fledge app while making it easier to understand the codebase.

Steps to run πŸƒ

  • Go to NewsAPI and generate an API key (It's only 2 steps!)
  • Create new file -> credentials.properties
  • Add the API key as shown below: NEWS_API_KEY = "YOUR_API_KEY"
  • Build and run the app
  • Enjoyyyyy πŸŽ‰

Components used

  • Architecture Components [ViewModel, LiveData, Lifecycle]
  • Roxie library for MVI implementation
  • Dagger for Dependency Injection

Dependency Graph πŸ”ͺ

The following diagram shows the dependency graph of the app.

News App Dependency Graph

Generated by Daggraph

Architecture

The app uses uni-directional flow of state of the app1 to have predictable state machine style architecture. It's inspired by MVVM and MVI hence it uses the following MVVM architecture while leveraging state management with MVI.

Architecture

Data flow1

The uni-directional pipeline for the flow of state.

Source: Building MVI apps with Roxie

Data flow

Testing

Super important and all the test cases will come soon.


Screenshots

NewsApp Main Page


Learn Architecture Components πŸ“–

Trying to learn the new Architecture Components? I have wrote a series of articles to understand Android Architecture Components. Feel free to check it out to learn more.

Extra - Caster.io Course and Podcast


Contributing πŸ’

Please read CONTRIBUTING.md for contributions.

License

The MIT License (MIT)

Copyright (c) 2019 Akshay Chordiya

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

About

News app πŸ—žοΈ showcasing MVI architecture combined with Architecture Components

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages