This is a complete app that demonstrate how to build an Android application using the Uncle Bob's Clean Architecture approach.
The trick of the project is to demonstrate best practices, provide a set of guidelines, and present modern Android Application Architecture that is modular, scalable, maintainable and testable, suitable for bigger teams and long application lifecycle management.
You can Install and test latest Blogfy Android app π
- The server's client ID user for firebase google authentication is provided from 'local.properties' file.
- The firestore image bucket URL path is provided from 'local.properties' file.
This is our REST API built using Ktor Framework deployed on Heroku.
Navigate to the link in below π
https://github.com/Zlagi/blogfy-api π₯
- Basic authentication (Ktor REST API)
- Social media authentication (Firebase)
- Bottom navigation bar, bottom sheet, loading and confirmation dialogs π¨
- Create, update and delete blog.
- Upload blog images to Firebase storage.
- Push notifications.
- Fetch blogs with pagination support.
- Display blog search results using spring physics. π«
- Display search history before making search query and possibility to clear them all or individually. π
- Fetch user account properties periodically.
- Update user password.
- Refresh access token periodically (20 minutes lifetime). π
- Revoke refresh token when the user sign out.
- Tests (mocks and fakes).
- Kotlin - First class and official programming language for Android development.
- Coroutines - For asynchronous and more..
- Flow - A cold asynchronous data stream that sequentially emits values and completes normally or with an exception.
- Android Architecture Components - Collection of libraries that help you design robust, testable, and maintainable apps.
- ViewModel - Stores UI-related data that isn't destroyed on UI changes.
- ViewBinding - Generates a binding class for each XML layout file present in that module and allows you to more easily write code that interacts with views.
- Room - SQLite object mapping library.
- WorkManager - WorkManager is an API that makes it easy to schedule deferrable, asynchronous tasks that are expected to run even if the app exits or the device restarts.
- Navigation Component Navigation refers to the interactions that allow users to navigate across, into, and back out from the different pieces of content within your app.
- Jetpack Security
- Encrypted SharedPreference - Used to store key-value data using encryption.
- Dependency Injection -
- Hilt-Dagger - Standard library to incorporate Dagger dependency injection into an Android application.
- Hilt-ViewModel - DI for injecting
ViewModel
. - Hilt-WorkManager - DI for injecting
WorkManager
. - Assisted Inject with Dagger - Manually injected dependencies for your JSR 330 configuration.
- Retrofit - A type-safe HTTP client for Android and Java.
- Moshi - A modern JSON library for Kotlin and Java.
- Moshi Converter - A Converter which uses Moshi for serialization to and from JSON.
- OkHttp - A library developed by Square for sending and receive HTTP-based network requests
- Material Components for Android - Modular and customizable Material Design UI components for Android.
- LeakCanary - Memory leak detection library for Android.
- Truth - Performing assertions in tests.
- Turbine - Testing library for kotlinx.coroutines Flow.
- Mockk - Mocking library for Kotlin.
- Robolectric - Robolectric is a framework that brings fast and reliable unit tests to Android. Tests run inside the JVM on your workstation in seconds.
- Firebase Storage - Cloud Storage for Firebase is a powerful, simple, and cost-effective object storage service built for Google scale.
- Firebase Authentication - Provides backend services, easy-to-use SDKs, and ready-made UI libraries to authenticate users to your app.
- Firebase Crashlytics - Tracks, prioritizes & fixes stability issues that erode app quality
- Coil - An image loading library for Android backed by Kotlin Coroutines.
- Lottie - Render After Effects animations.
- CanHub - Android image cropper.
- Firecoil - Load images from Cloud Storage for Firebase in your Android app (through a StorageReference).
- One Signal - For push notifications.
- Kluent - "Fluent Assertions" library written specifically for Kotlin.
CI is utilizing GitHub Actions. Complete GitHub Actions config is located in the .github/workflows folder.
Series of workflows runs (in parallel) for every opened PR and after merging PR to main
branch:
./gradlew lintDebug
- runs Android lint./gradlew testDebugUnitTest
- run unit tests
- Increase tests coverage in the data layer.
- Improve code quality.
- Leaky memory: this issue produced when the user navigate from FeedFragment to BlogDetailFragment before the image loading is complete and vice-versa.
This is project is to inspire you and should handle most of the common cases, but please take a look at additional resources.
Other high-quality projects will help you to find solutions that work for your project:
- Bug fixes and Pull Requests are highly appreciated and you're more than welcome to send us your feedbacks <3
Copyright 2022 Haythem Mejerbi.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.