Skip to content
This repository was archived by the owner on Sep 4, 2024. It is now read-only.

Commit e8187ca

Browse files
Added Rick and Morty App
1 parent 2b72ebf commit e8187ca

File tree

217 files changed

+7985
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

217 files changed

+7985
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Android Build
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
push:
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v2
15+
16+
- name: Set Up JDK
17+
uses: actions/setup-java@v1
18+
with:
19+
java-version: 11
20+
21+
- name: Run KtLint
22+
run: ./gradlew ktlintCheck
23+
24+
- name: Run Tests
25+
run: ./gradlew testDebugUnitTest --stacktrace
26+
27+
- name: Build Project
28+
run: ./gradlew assembleDebug

Rick-and-Morty/.gitignore

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Built application files
2+
*.apk
3+
*.aar
4+
*.ap_
5+
*.aab
6+
# Files for the ART/Dalvik VM
7+
*.dex
8+
# Java class files
9+
*.class
10+
# Generated files
11+
bin/
12+
gen/
13+
out/
14+
# Uncomment the following line in case you need and you don't have the release build type files in your app
15+
# release/
16+
# Gradle files
17+
.gradle/
18+
build/
19+
# Local configuration file (sdk path, etc)
20+
local.properties
21+
# Proguard folder generated by Eclipse
22+
proguard/
23+
# Log Files
24+
*.log
25+
# Android Studio Navigation editor temp files
26+
.navigation/
27+
# Android Studio captures folder
28+
captures/
29+
# IntelliJ
30+
*.iml
31+
.idea/
32+
# .idea/workspace.xml
33+
# .idea/tasks.xml
34+
# .idea/gradle.xml
35+
# .idea/assetWizardSettings.xml
36+
# .idea/dictionaries
37+
.idea/libraries
38+
# Android Studio 3 in .gitignore file.
39+
.idea/caches
40+
.idea/modules.xml
41+
# Comment next line if keeping position of elements in Navigation Editor is relevant for you
42+
.idea/navEditor.xml
43+
# Keystore files
44+
# Uncomment the following lines if you do not want to check your keystore files in.
45+
*.jks
46+
*.keystore
47+
# External native build folder generated in Android Studio 2.2 and later
48+
.externalNativeBuild
49+
.cxx/
50+
# Google Services (e.g. APIs or Firebase)
51+
google-services.json
52+
# Freeline
53+
freeline.py
54+
freeline/
55+
freeline_project_description.json
56+
# fastlane
57+
fastlane/report.xml
58+
fastlane/Preview.html
59+
fastlane/screenshots
60+
fastlane/test_output
61+
fastlane/readme.md
62+
# Version control
63+
vcs.xml
64+
# lint
65+
lint/intermediates/
66+
lint/generated/
67+
lint/outputs/
68+
lint/tmp/
69+
# lint/reports/
70+
# MacOS
71+
.DS_Store
72+
# App Specific cases
73+
app/release/output.json
74+
.idea/codeStyles/

Rick-and-Morty/README.md

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
[![Akhilesh StackOverflow](https://img.shields.io/badge/Akhilesh-StackOverflow-orange.svg?style=for-the-badge)](https://stackoverflow.com/users/1548824/akhilesh0707)
2+
[![Akhilesh LinkedIn](https://img.shields.io/badge/Akhilesh-LinkedIn-blue.svg?style=for-the-badge)](https://www.linkedin.com/in/akhilesh0707/)
3+
4+
# Rick-and-Morty
5+
The Rick And Morty - App consuming a [Rick and Morty API](https://rickandmortyapi.com/) to display Characters it has been built with clean architecture principles, Repository Pattern, and MVVM pattern as well as Architecture Components.
6+
7+
This app shows the usage of the new Navigation Architecture Component in collaboration with the Bottom Navigation view with separate back stack history for each tab.
8+
9+
**App features:**
10+
- List of Rick and Morty characters
11+
- Detail of characters
12+
- Bookmark character
13+
- Light/ Dark theme.
14+
15+
## Screenshots
16+
<img alt="List" src="art/screenshot.png">
17+
18+
## Architecture
19+
Uses concepts of the notorious Uncle Bob's architecture called [Clean Architecture](https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html).</br>
20+
21+
* Better separation of concerns. Each module has a clear API., Feature related classes life in different modules and can't be referenced without explicit module dependency.
22+
* Features can be developed in parallel eg. by different teams
23+
* Each feature can be developed in isolation, independently from other features
24+
* faster compile time
25+
<img src="art/app_architecture.png">
26+
27+
## Modules:
28+
* **rick-and-morty-ui** - It uses all the components and classes releated to Android Framework. It gets the data from presentation layer and shows on UI. (**access all the modules**)
29+
* **data** - The data layer implements the repository interface that the domain layer defines. This layer provide a single source of truth for data. (Kotlin module that **can only access domain module**)
30+
* **remote** - Handles data interacting with the network. (**can only access data module**)
31+
* **cache** - Handles data interacting with the local storing (Room DB). (**can only access data module**)
32+
* **domain** - The domain layer contains the UseCases that encapsulate a single and very specific task that can be performed. This task is part of the business logic of the application. (Kotlin module that **cannot access any other module**)
33+
* **presentation** - MVVM with ViewModels exposing LiveData that the UI consume. The ViewModel does not know anything about it's consumers. (Android module that **can only access domain module**)
34+
35+
## MAD Scorecard
36+
[<img src="art/mad_scorecard.png">](https://madscorecard.withgoogle.com/scorecards/1519405986/)
37+
38+
## Tech stack - Library:
39+
40+
- [Kotlin](https://kotlinlang.org/)
41+
- [Coroutines](https://github.com/Kotlin/kotlinx.coroutines) - A coroutine is a concurrency design pattern that you can use on Android to simplify code that executes asynchronously
42+
- [Flow](https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/) - Flow is used to pass (send) a stream of data that can be computed asynchronously
43+
- [Dagger-Hilt](https://developer.android.com/training/dependency-injection/hilt-android) - for dependency injection.
44+
- [Kotlin-DSL](https://docs.gradle.org/current/userguide/kotlin_dsl.html) - Used to handle gradle dependencies and config versions
45+
- JetPack
46+
- [LiveData](https://developer.android.com/topic/libraries/architecture/livedata) - For reactive style programming (from VM to UI).
47+
- [Lifecycle](https://developer.android.com/jetpack/androidx/releases/lifecycle) - Used get lifecyle event of an activity or fragment and performs some action in response to change
48+
- [ViewModel](https://developer.android.com/topic/libraries/architecture/viewmodel) - Stores UI-related data that isn't destroyed on UI changes.
49+
- [Room](https://developer.android.com/topic/libraries/architecture/room) - Used to create room db and store the data.
50+
- [Navigation](https://developer.android.com/guide/navigation/navigation-getting-started) - Used to navigate between fragments
51+
- [Data Binding](https://developer.android.com/topic/libraries/data-binding) - Used to bind UI components in your XML layouts.
52+
- [Material-Components](https://github.com/material-components/material-components-android) - Material design components like ripple animation, cardView.
53+
- [Retrofit](https://github.com/square/retrofit) - Used for REST api communication.
54+
- [OkHttp](http://square.github.io/okhttp/) - HTTP client that's efficient by default: HTTP/2 support allows all requests to the same host to share a socket
55+
- [Moshi](https://github.com/square/moshi) - Used to convert Java Objects into their JSON representation and vice versa.
56+
- [Timber](https://github.com/JakeWharton/timber) - Used for logging.
57+
- [Glide](https://bumptech.github.io/glide/) - Glide is a fast and efficient image loading library for Android
58+
59+
## TODO
60+
- [X] CI/CD (Github Actions, Bitrise, CircleCI)
61+
- [X] Unit test
62+
- [X] Jacoco for test coverage
63+
- [X] Ktlint or Detekt
64+
- [ ] Use Jetpack Compose
65+
66+
## Reference repository
67+
This repository code is mostly inspired by [Android-Clean-Architecture-Boilerplate](https://github.com/bufferapp/android-clean-architecture-boilerplate).
68+
69+
## Find this repository useful? :heart:
70+
Support it by joining __[stargazers](https://github.com/akhilesh0707/Rick-and-Morty/stargazers)__ for this repository. :star: <br>
71+
And __[follow](https://github.com/akhilesh0707)__ me for my next creations! 🤩
72+
73+
## Contributions
74+
Please feel free to file an issue for errors, suggestions or feature requests. Pull requests are also encouraged.
75+
423 KB
Loading

Rick-and-Morty/art/dark_detail.png

378 KB
Loading

Rick-and-Morty/art/dark_list.png

651 KB
Loading
67.9 KB
Loading
378 KB
Loading

Rick-and-Morty/art/light_list.png

654 KB
Loading
68.9 KB
Loading

0 commit comments

Comments
 (0)