Purpose for this base architectural project is to load it with all latest components and libraries So it become reference for all kind of Android projects

Overview

BaseAndroidArchitecture

The purpose of this base architectural project is to load it with all the latest components and libraries, So it becomes a reference for all kinds of Android projects

Android Project Guidelines

1. Overview:

This document will help us in developing an android app using the best approach towards setting up the configuration, design pattern and technologies in the upcoming projects.

2. Project Configuration:

Project should be configured to these settings following the recommendations from Google and market requirements:

  • Language: Kotlin
  • minSdkVersion: 19
  • targetSdkVersion: 30
  • Kotlin Style Guidelines

3. Technologies:

This section describes all the libraries/frameworks to be used.

3.1 Core Libraries

Android Jetpack Libraries will be used for a cleaner and efficient approach in laying down the foundation.

3.2 Architecture

This section intends to provide some guidance and foundation for the app’s architecture where the main goal is to produce SOLID, clean and testable code following two common architectural principles:

  • Separation of concerns
  • Drive UI from a model

It's impossible to have one way of writing apps that works best for every scenario. That being said, this recommended architecture is a good starting point for most situations and workflows.

3.2.1 MVVM with Clean Architecture

MVVM separates your view (i.e. Activities and Fragments) from your business logic. MVVM is enough for small projects, but when your codebase becomes huge, your ViewModels start bloating. Separating responsibilities becomes hard.

MVVM with Clean Architecture is pretty good in such cases. It goes one step further in separating the responsibilities of your code base. It clearly abstracts the logic of the actions that can be performed in your app.

Here business logic is completely decoupled from the UI. It makes the code very easy to maintain and test. This design pattern is based on the following three android architectural components:

  • View Model
  • Live Data
  • Room

3.2.2 Folder Structure

View related classes should be organized as a packe-per-feature. This means, all the adapters, activities, fragments etc should not be in a single package for all of those. Instead, there should be a separate package for each feature containing all the related classes inside. This makes the code easier to navigate through and also easier for new people to find specific classes when working on a specific feature.

We will be following this below given structure depicting the Note Application:

api

  • endpoints
  • service
  • network
  • utils

app

  • ui

common

  • logging
  • model
  • utils

domain

  • datasource
  • model
  • repository
  • usecase
  • base

di

3.3 Network

Retrofit will cover the network layer for fast and easy operations on fetching and parsing JSON data.

3.4 Dependency Injection

Koin will be used because it is a lightweight dependency injection framework that uses Kotlin’s DSLs to lazily resolve your dependency graph at runtime.

3.5 Crash Reports

Firebase Crashlytics will be used for this purpose.

3.6 Logging

Timber will be used for this purpose, It helps us managing how logging will work depending on the build type (debug/release) and also contains some other helpful features like not needing to indicate the log tag because Timber automatically detects which class is logging.

3.7 Asynchronous and Event-based Functions

Coroutines/RxJava will be used for this purpose.

3.8 Image Loading and Caching

Glide will be used for this purpose.

3.9 Date and Time

ThreeTen wil be used for this purpose.

Please Note

This is the initial version, In next versions I will try to upgrade this repository with MVI, Hilt, Kotlin Flow and many new stuff.

Contributions to this repository are always welcome

You might also like...
File Picker for KMP project. Works for Android/JVM/Web.

KFilePicker File Picker for KMP project. Works for Android/JVM/Web. Setup Add Jitpack maven { url

Android App development internship project to create woman home screen for clothing company The Swastika.

Android App development internship project to create woman home screen for clothing company The Swastika.

A template project that builds a SDL application programmed in Zig to Android from scratch

A template project that builds a SDL application programmed in Zig to Android from scratch

vShell (Virtual Shell) — a successor of Termux project which provides an alternate implementation of the Linux terminal emulator for Android OS

vShell (Virtual Shell) — a successor of Termux project which provides an alternate implementation of the Linux terminal emulator for Android OS

An Android project to showcase a multi-brand design system.
An Android project to showcase a multi-brand design system.

Table of contents Introduction Structure Architecture Implementation Testing Roadmap Introduction This is an Android showcase project based on Pokémon

This project is an investigation of Hystrix in the Kotlin language

from-paris-to-berlin-circuit-breaker Technologies used This project is an investigation of Circuit-Breakers in the Kotlin language 👇 👇 👇 🚧 🚧 🚧 U

A VikeLabs project meant for navigating around UVic

maps This is a VikeLabs project meant for navigating around UVic. It's structured as a multi-module gradle project with an api server and a web app (i

ArduinoJava - A project that uses the JSSC library
ArduinoJava - A project that uses the JSSC library

ArduinoJava este es un proyecto que utiliza la libreria JSSC para connectarse al

UpSchool Capstone Project - Course selling application with MVVM, LiveData, DataBinding, Retrofit, Room Database, Navigation Component,  Adapter, Firebase Auth, Picasso, Lottie
UpSchool Capstone Project - Course selling application with MVVM, LiveData, DataBinding, Retrofit, Room Database, Navigation Component, Adapter, Firebase Auth, Picasso, Lottie

UpSchool Capstone Project - Course selling application with MVVM (Model, View, ViewModel), LiveData, DataBinding, Retrofit, Room Database, Navigation Component(NavGraph, BottomNav), Adapter, Firebase Auth, Picasso, Lottie

Owner
null
Common rules and macros for Grab's Android projects built with Bazel.

Common rules and macros for Grab's Android projects built with Bazel. This repo provides rules and macros to support some of Android Gradle Plugin features in Bazel.

Grab 26 Dec 14, 2022
Android Template to accelerate the creation of new projects.

Stack What How User Interface Compose Dependency Injection Hilt State Management Mavericks Caching Room Networking Retrofit Information This project i

André Ramon 9 Jan 23, 2022
Google core libraries for Java

Guava: Google Core Libraries for Java Guava is a set of core Java libraries from Google that includes new collection types (such as multimap and multi

Google 46.5k Jan 1, 2023
AboutLibraries is a library to offer some information of libraries.

AboutLibraries .. allows you to easily create an used open source libraries fragment/activity within your app. All the library information is automati

Mike Penz 3.1k Jan 3, 2023
Using Resilience4J, this is a Demo project which uses a Library as background and manages all its requests.

Using Resilience4J, this is a Demo project which uses a Library as background and manages all its requests. This library can rent books online and the usage rate is extremely high. There is a reactive way to access, which is the one normally used, but sometimes, the system needs a bit of help from an old machine running a non-reactive MVC Spring application using JPA. Let's make this in Kotlin and find the best solution!

João Filipe Sabino Esperancinha 2 Jan 10, 2022
It makes a preview from an url, grabbing all the information such as title, relevant texts and images. This a version for Android of my web link preview https://github.com/LeonardoCardoso/Link-Preview

LeoCardz Link Preview for Android It makes a preview from an url, grabbing all the information such as title, relevant texts and images. Visual Exampl

Leonardo Cardoso 420 Nov 19, 2022
This repo contains examples of all the functionalities of sceneform, Face filter , Object Placement etc

ARCore-Projects This repo uses sceneform 1.17.1 to demonstrate the usage of different features of arcore such as, Augmented Faces Augmented images AR

Kashif Mehmood 21 Dec 4, 2022
A Utility to Add all of your installed steam games to the Start Launcher for Windows

Steam Start Launcher The Steam Start launcher is a small tool that will scan your computer for isntalled steam games and create a shortcut for each ga

null 1 Dec 1, 2021
Tutorial For openJDK 11 and AGP 7.0.0+ | Tutorial Multi Library Android in 1 Project | Groovy

jitpack-library-guide For openJDK 11 and AGP 7.0.0 + Please read every single note for detail Tutorial Click Here Kotlin DSL Click Here Repository for

Faisal Amir 7 Dec 10, 2022
Starter-Android-Library - Starter Android Library is an Android Project with Modular Architecture.

Starter-Android-Library - Starter Android Library is an Android Project with Modular Architecture.

OpenBytes 1 Feb 18, 2022