https://github.com/pokk/dropbeat
A Music Player with downloading, playing, searching, exploring functions.
https://github.com/pokk/dropbeat
android-app caching clean-architecture detekt dynamic-features exoplayer2 kodein-di mmkv modulization retrofit2-coroutines room usecase viewmodel-livedata
Last synced: 12 months ago
JSON representation
A Music Player with downloading, playing, searching, exploring functions.
- Host: GitHub
- URL: https://github.com/pokk/dropbeat
- Owner: pokk
- License: mit
- Created: 2020-05-11T14:54:08.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-09T12:47:21.000Z (over 3 years ago)
- Last Synced: 2023-03-04T15:44:09.795Z (about 3 years ago)
- Topics: android-app, caching, clean-architecture, detekt, dynamic-features, exoplayer2, kodein-di, mmkv, modulization, retrofit2-coroutines, room, usecase, viewmodel-livedata
- Language: Kotlin
- Homepage:
- Size: 3.54 MB
- Stars: 16
- Watchers: 4
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
DropBeat
# System Overview
## Module Dependency Graph

## Architecture of each feature module
Basically, our project is using single activity and multiple fragments.
#### The Feature of Clean Architecture
The **clean architecture** known to everyone, the purpose is dividing each layer and make them independent. I will say
the **clean architecture** is separating modules **horizontally**.
#### The Feature of Dynamic Feature
**Dynamic Feature** were published by few yeas ago. Briefly, as the word says, it makes each feature to a module. I will
say the **dynamic feature** is separating modules **vertically**.
We decided to get both advantages with an easier way and mix them together to our project. To mix them, the **dynamic
feature** will be the ***main*** architecture and **clean architecture** will be inside each feature module.
There are so many strict rules in the origin clean architecture, e.g. an object on the **presentation layer** won't
access a class from the **data layer**, or each layer has their own data classes, the mapper classes, ...etc.
If keeping the rules here, this project will be a hugh project and only one maintainer is me 😢. This project is still
keeping the basic rules, but we need to have a compromise with those features.

### Detail of Presentation Layer
- Activity/Fragment:
- **ViewModel**: It handles the view state and data, and the **view logic**. Also, it helps a view to connect a usecase.
Three types of them, **ViewModel**, **AndroidViewModel**, **SavedStateViewModel** will be used.
### Detail of Domain Layer
The business logic will be here mostly.
- **OneShot UseCase**: This is one time fetching, just send a request and get a response, eg. normal restful api
request.
- **Observable UseCase**: For the local database, once the data we are observing is changed, the observable usecases
will keep receiving the changing until the observing finishes.
### Detail of Data Layer
- **Repository**:
- 3 Layer Cache: We would like to have a cache system. One path is for fetching data from the remote server; another
path is for the local database.

- Data Model:
# Snapshot of App
| | | | |
|:---------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------|
|  |  |  |  |
|  |  |  | |
# Licence
```
MIT License
Copyright (c) 2021 Jieyi
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.
```