Blogfy
๐ท Blog taking application utilizing Ktor REST-API and following modern practices: Kotlin, Coroutines, Flows, Channels, Room, Work Manager, Navigation Component, MVI, Clean Architecture, Modularization, Dagger Hilt, Tests...
Install / Use
/learn @HaythemMejerbi/BlogfyREADME
Blogfy ๐ท
๐ก 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 ๐
๐ก INFO
- 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.
๐ก 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 ๐
- [x] Basic authentication (Ktor REST API)
- [x] Social media authentication (Firebase)
- [x] Bottom navigation bar, bottom sheet, loading and confirmation dialogs ๐จ
- [x] Create, update and delete blog.
- [x] Upload blog images to Firebase storage.
- [x] Push notifications.
- [x] Fetch blogs with pagination support.
- [x] Display blog search results using spring physics. ๐ซ
- [x] Display search history before making search query and possibility to clear them all or individually. ๐
- [x] Fetch user account properties periodically.
- [x] Update user password.
- [x] Refresh access token periodically (20 minutes lifetime). ๐
- [x] Revoke refresh token when the user sign out.
- [x] Tests (mocks and fakes).
Screenshots โจ
<div align="center"> <img src="https://user-images.githubusercontent.com/63319103/161010016-3ec51ddf-c9ab-4579-88ef-612bfc8c1683.png" width="230px" /> <img src="https://user-images.githubusercontent.com/63319103/160952314-43895146-09b0-46c2-9dee-3fa932d2c9f9.png" width="230px" /> <img src="https://user-images.githubusercontent.com/63319103/160952387-1e7383a6-806d-479e-8485-c2e21712e5eb.png" width="230px" /> <img src="https://user-images.githubusercontent.com/63319103/160952466-1f7c491e-5bc3-4d74-a01b-55f5c52ccd8d.png" width="230px" /> <img src="https://user-images.githubusercontent.com/63319103/160952856-0407ea51-c097-4c83-bee9-1739879ce9b6.png" width="230px" /> <img src="https://user-images.githubusercontent.com/63319103/160952516-95f53eff-b59b-4e72-8265-e7f284c247d8.png" width="230px" /> <img src="https://user-images.githubusercontent.com/63319103/161479220-e872ea47-3aa9-4c47-8b14-9516ef1a6538.png" width="230px" /> <img src="https://user-images.githubusercontent.com/63319103/160952811-940782c2-3f3e-4fd3-97dc-29416fdd124d.png" width="230px" /> <img src="https://user-images.githubusercontent.com/63319103/160953300-ac2b0d4e-4f8b-402f-81b8-df5585120c7a.png" width="230px" /> <img src="https://user-images.githubusercontent.com/63319103/160953344-00476cc3-a879-4303-ac36-3889cf04f036.png" width="230px" /> <img src="https://user-images.githubusercontent.com/63319103/160953399-936bcb2a-6884-4260-b152-3be2ad1d7d0a.png" width="230px" /> <img src="https://user-images.githubusercontent.com/63319103/160953554-f7a1da23-91d9-41db-972c-30bb984789c3.png" width="230px" /> </div>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:
- NotyKT
- MVI-Clean-Architecture
- Filmatic
- Open-API-Android-App
- Taskify
- [Owl](https://github.com/m
Related Skills
node-connect
343.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
90.0kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
343.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
343.1kQQBot ๅฏๅชไฝๆถๅ่ฝๅใไฝฟ็จ <qqmedia> ๆ ็ญพ๏ผ็ณป็ปๆ นๆฎๆไปถๆฉๅฑๅ่ชๅจ่ฏๅซ็ฑปๅ๏ผๅพ็/่ฏญ้ณ/่ง้ข/ๆไปถ๏ผใ
