A complete app that demonstrate how to build an Android application using the Uncle Bob's Clean Architecture approach

Overview

Blogfy ๐Ÿ“ท

Build (API) Android Lint Testing Release

๐Ÿ’ก About the Project

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 ๐Ÿ‘‡

Blogfy

๐Ÿ’ก API:

This is our REST API built using Ktor Framework deployed on Heroku.
Navigate to the link in below ๐Ÿ‘‡

https://github.com/Zlagi/blogfy-api ๐Ÿ”ฅ

Features ๐Ÿ‘“

  • 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 suggestions 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).

Screenshots โœจ

Built with ๐Ÿ› 

  • 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 pipeline

CI is utilizing GitHub Actions. Complete GitHub Actions config is located in the .github/workflows folder.

PR Verification

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

Upcoming improvements

  • Increase tests coverage in the data layer.
  • Improve code quality.

Known issues

  • Leaky memory: this issue produced when the user navigate from FeedFragment to BlogDetailFragment before the image loading is complete and vice-versa.

Inspiration

This is project is to inspire you and should handle most of the common cases, but please take a look at additional resources.

Android projects

Other high-quality projects will help you to find solutions that work for your project:

Contribute

  • Bug fixes and Pull Requests are highly appreciated and you're more than welcome to send us your feedbacks <3

License

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.
You might also like...
Connect is an Android Application to connect people for a project and can then work on the application to efficiently complete the project
Connect is an Android Application to connect people for a project and can then work on the application to efficiently complete the project

Connect is an Android Application to connect people for a project and can then work on the application to efficiently complete the project

Note-app - A sample project that presents a modern approach to Android application development
Note-app - A sample project that presents a modern approach to Android application development

Note-app - A sample project that presents a modern approach to Android application development

 ๐ŸฒFoodium is a sample food blog Android application ๐Ÿ“ฑ built to demonstrate the use of Modern Android development tools - (Kotlin, Coroutines, Flow, Dagger 2/Hilt, Architecture Components, MVVM, Room, Retrofit, Moshi, Material Components).
๐ŸฒFoodium is a sample food blog Android application ๐Ÿ“ฑ built to demonstrate the use of Modern Android development tools - (Kotlin, Coroutines, Flow, Dagger 2/Hilt, Architecture Components, MVVM, Room, Retrofit, Moshi, Material Components).

Foodium ๐Ÿฒ Foodium is a sample food blog ๐Ÿฒ Android application ๐Ÿ“ฑ built to demonstrate use of Modern Android development tools. Dedicated to all Andr

Weather application example with Android Architecture components and Clean Architecture

Weather application example with Android Architecture components and Clean Architecture Weather app that shows how to architect an android app in a cl

This is a sample Android project that presents a modern approach to Android application development.

Movies It is a sample app that shows information about movies and series. The goal is build a scalable, maintainable and testable app, implementing go

Chat is a sample project that presents a modern, 2021 approach to Android application development.
Chat is a sample project that presents a modern, 2021 approach to Android application development.

Chat for Android Chat is a sample project that presents a modern, 2021 approach to Android application development. Screenshots ๐Ÿ“ท

NewsSpac-MVVM-CleanArch-TDD - The App uses MVVM architecture together with Clean architecture

Aplicativo NewsSpace Arquitetura O App utiliza a arquitetura MVVM em conjunto co

Android app built with MVP architectural approach and uses Marvel Comics API that allows developers everywhere to access information about Marvel's vast library of comics. :zap:
Android app built with MVP architectural approach and uses Marvel Comics API that allows developers everywhere to access information about Marvel's vast library of comics. :zap:

Villains & Heroes Android app built with MVP architectural approach and uses Marvel Comics API that allows developers everywhere to access information

A movies application built Using clean architecture and MVVM (Model-view-viewModel).
A movies application built Using clean architecture and MVVM (Model-view-viewModel).

Movies-App This is a movies application which fecthes upcoming and popular movies from the movie Database(TMBD). It is built Using clean architecture

Owner
Haythem Mejerbi
Mobile developer and kotlin enthusiast
Haythem Mejerbi
Android app which fetches a sample movies list to display. Built using Kotlin and latest Android tech stack, with an approach to clean architecture.

movies-sample-app This is an Android app which fetches a sample movies list to display. Built using Kotlin and latest Android tech stack, with an appr

Nadeem Ahmed 1 Oct 21, 2021
Easy Note: Building a Notes app using MVVM, JetPack Compose with a clean multi-module architecture approach.

Easy Note Easy Note: Notes app using JetPack Compose and MVVM with a clean architecture approach. This app shows the usage of the new Navigation Archi

Akhilesh Patil 10 Dec 17, 2022
Food Recipes - Android application built with Jetpack compose, MVVM and clean architecture approach.

Food Recipes Android application that consuming (https://spoonacular.com/food-api) "Recipes api". It has been built with clean architecture principles

Mahmoud Elshahat 26 Jan 29, 2023
The Rick And Morty - MVVM with a clean architecture approach using some of the best practices in Android Development.

Rick-and-Morty The Rick And Morty - App consuming a Rick and Morty API to display Characters it has been built with clean architecture principles, Rep

Akhilesh Patil 61 Jan 7, 2023
๐Ÿ“’ NotyKT is a complete ๐Ÿ’ŽKotlin-stack (Backend + Android) ๐Ÿ“ฑ application built to demonstrate the use of Modern development tools with best practices implementation๐Ÿฆธ.

NotyKT ??๏ธ NotyKT is the complete Kotlin-stack note taking ??๏ธ application ?? built to demonstrate a use of Kotlin programming language in server-side

Shreyas Patil 1.4k Jan 8, 2023
Episodie is a TV show time tracker app with unusual design written in kotlin and clean architecture approach. Get to know how much time you spent watching tv shows.

Episodie Episodie is a TV show time tracker app with unusual design. Get to know how much time you spent watching tv shows. Track easily overall progr

Przemek 126 Dec 7, 2022
Small app to demonstrate app modularization combined with clean architecture

Football Hightlights Sample Sample project, exploring the app Modularization in combination with some concepts of the clean architecture, in particula

null 1 Oct 31, 2021
๐Ÿ›’A Minimal Expense E-Commerce App built to demonstrate the use of modern android architecture components [Navigation, Room, MotionLayout, etc..] with MVVM Architecture. โœ”

E-Store A Simple E-Commerce App ?? built to demonstrate the use of modern android architecture component with MVVM Architecture ?? . Made with love โค๏ธ

Ameen Essa 14 Nov 3, 2022
A Simple Expense Tracker App ๐Ÿ“ฑ built to demonstrate the use of modern android architecture component with MVVM Architecture

Expenso ?? A Simple Expense Tracker App ?? built to demonstrate the use of modern android architecture component with MVVM Architecture ?? . Made with

Michel Horacio 1 Dec 28, 2022
๐Ÿš€A powerful android clean architecture that helps you build your apps faster.

IMStudio ?? Table of Contents Project Structure Convention RxJava Common Scripts Technical Stack Dependencies Library Architecture Case Study Authors

Hau NGUYEN (Leo) 0 Nov 20, 2022