Git Product home page Git Product logo

zlagi / blogfy Goto Github PK

View Code? Open in Web Editor NEW
67.0 2.0 14.0 1.19 MB

๐Ÿ“ท 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...

License: Apache License 2.0

Kotlin 100.00%
android kotlin retrofit2 coroutines android-mvi android-clean-architecture dependency-management room mockk firebase

blogfy's Introduction

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

๐Ÿ’ก 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 ๐Ÿ‘“

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

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.

blogfy's People

Contributors

zlagi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.