Skip to content

Red hot chilli peppers music application with multimodule structure and Android Architecture Components

Notifications You must be signed in to change notification settings

LMedez/RHCP-FanArt-Android-Application

Repository files navigation

RHCP Fan art application

This Android application is a music streaming of Red hot chili peppers artist. It is built around the Universal Android Music Player

Screenshot

Features

  • 100% Kotlin
  • MVVM architecture
  • Reactive pattern
  • Android Architecture Components
  • Single activity pattern
  • Dependency injection
  • Testing (Upcoming)

Tech Stacks

  • Koin - Dependency injection.
  • Android Architecture Components - A collections of libraries that help you design rebust, testable and maintainable apps.
    • Room - Local persistence database.
    • ViewModel - UI related data holder, lifecycle aware.
    • LiveData - Observable data holder that notify views when underlying data changes.
    • Data Binding - Declarative way to bind data to UI layout.
    • View Binding - Bind the view file to class controller
    • Navigation component - Fragment routing handler.
  • Flow Stream of value that returns from suspend function.
  • Coroutine Concurrency design pattern for asynchronous programming.
  • Glide - Image loading.
  • Firestore - Remote data source

Architectures

MVVM

This follow Google recommended Guide to app architecture to structure our architecture based on MVVM, reactive UI using LiveData/Flow observables with data binding and view binding.

  • View: Activity/Fragment with UI-specific logics only.
  • ViewModel: It keeps the logic away from View layer, provides data streams for UI and handle user interactions.
  • Model: Repository pattern, data layers that provide interface to manipulate data from both the local and remote data sources. The local data sources will serve as single source of truth.

Package Structures

The project is Multimodule and each module has its own build.gradle file. All dependencies are managed by the Dependency.kt

RHCP Fan Art                            # Root Package
├── data                                # Data module
│   ├── com.luc.data                  
|      ├── di                           # DI modules
|      ├── firestore                    # Remote source data by Firebase Firestore
│      ├── local                        # Room database source data
|      └── repository                   # Repository for CRUD operations
|
├── domain                              # Domain module
│   ├── com.luc.domain            
|      ├── di                           # DI modules
|      ├── repository                   # Repository to use by use cases
|      └── usecases                     # Uses cases to manage data source
│
├── musicservice               
│   ├── com.luc.musicservice            
|      ├── di                           # DI modules for the music service
|      ├── extensions                   # Useful extensions for MediaMetadataCompat
|      ├── listeners                    # Listeners for music service events
|      ├── Datasource.kt                # Source of music data
|      ├── MusicNotificationManager.kt  # Manage all notification content 
|      ├── MusicService.kt              # Service for background music
|      └── MusicServiceConnection.kt    # Supporting class for connection with service
|             
├── presentation
|   ├── com.luc.presentation
│      ├── di                           # DI modules
│      └── viewmodel                    # ViewModels for user events
|
├── app                                 # App module
|   ├── com.luc.rhcpfanart
│      ├── di                           # DI modules
│      └── MainActivity.kt              # Start point of application
|
├── features                            # Feature package
|   ├── albumdetail                     # Albumdetail module
|   |  └── com.luc.albumdetail          
|   |     └── AlbumDetailFragment.kt    
|   |  
|   ├── home                            # Home module for home screen
|   |  └── com.luc.home
|   |     ├── albumfragment
|   |     ├── overviewfragment
|   |     ├── HomeFragment.kt
|   |     └── ViewPagerAdapter.kt
|   |     
|   ├── mediaplayer                      # Mediaplayer module for mediaplayer fragment that handles music events
|   |  └── com.luc.mediaplayer
|   |     ├── mediaplayerdetail
|   |     └── MediaPlayerFragment.kt
|   |      
|   ├── mymusic                          # mymusic module that manage the music of the user
|      └── com.luc.mymusic
|         ├── allsongsfragment
|         ├── favoritefragment
|         └── playlistfragment
|        
├── resources                           # Resource module for application resources such as animations,                                                           
|   ├── com.luc.resources                                     icons, colors, themes, items layout, etc.
│      ├── adapter                
│      ├── animation                
│      ├── utils                
│      └── AttrExtensions.kt            
│     
├── common                              # Common module
    ├── com.luc.common
       ├── entities                     # Common entities for local database
       ├── model                        # Models of data for application
       └── Utils.kt                     # Commons utils

About

Red hot chilli peppers music application with multimodule structure and Android Architecture Components

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages