Skip to content

๐Ÿ“ Notes App built with MVVM pattern using Jetpack Compose, Coroutines, Hilt and Room

Notifications You must be signed in to change notification settings

eun-jegal/MyNotes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

5 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

My Notes

๐Ÿ“ Notes App built with MVVM pattern using Jetpack Compose, Coroutines, Hilt and Room


ย 


Tech Stack

  • Minumum SDK Level: 21
  • 100% Kotlin
  • Architecture
    • MVVM Pattern: Industry-recognized software architecure pattern supported by Google
  • Jetpack Compose: Modern toolkit for building Android user interfaces using a declarative programming model
  • ViewModel: Exposes data streams as a state holder
  • Hilt: Dependency injection library built on top of Dagger benefit from the compile-time correctness, runtime performance, scalability, and Android Studio support
  • Coroutines: Concurrency design pattern provided by Kotlin

Architecture

My Notes demonstrates MVVM architecture by separating multiple app components into two main layers - UI and Data. Following the core Android design principles, the app is scalable, maintainable and testable.

  • Architectural Principles
    • Separations of concerns
    • Drive UI from data models
    • Single source of truth
    • Unidirectional Data Flow

Architecture Overview

Pokedex App follows the unidirectional data flow by adapting architectural layering. The app responds accordingly to user events and update ui states.

UI Layer

UI layer displays the application data and serves as the primary point for user interactions. Whenever the app data changes, the UI should update to reflect changes made by either user interaction or external input.

  • The main activity hosts the navigation controller and navigates through two screens - PokemonListScreen and PokemonDetailScreen depending on user interactions.
  • PokemonListViewModel requests data to the data layer and PokemonListScreen updates UI observing states held by ViewModel.
  • PokemonDetailViewModel is responsible for fetching pokemon details and updates states for PokemonDetailScreen.

Domain Layer

Domain layer is reponsible for containing application data and business logics. The data layer is consisted of repositories and data sources. It is important to keep each repository as a single source of truth.

  • PokemonRepository is a single source of truth and requests data from the remote data source.
  • PokemonRepository requests network responses to PokeAPI server using Retrofit library.

Data Layer

Data layer is reponsible for containing application data and business logics. The data layer is consisted of repositories and data sources. It is important to keep each repository as a single source of truth.

  • PokemonRepository is a single source of truth and requests data from the remote data source.
  • PokemonRepository requests network responses to PokeAPI server using Retrofit library.

References

This project was built to understand how to build a clean architecture Jetpack Compose app using differnt types of Android libraries.

  • Youtube Tutorial: Step-by-step tutorial to build My Notes app
  • About

    ๐Ÿ“ Notes App built with MVVM pattern using Jetpack Compose, Coroutines, Hilt and Room

    Topics

    Resources

    Stars

    Watchers

    Forks

    Releases

    No releases published

    Packages

    No packages published

    Languages