An app to manage posts such as create, update, show the post list and detail also delete the post.

Overview

Otopost

An app to manage posts such as create, update, show the post list and detail also delete the post.

Minimum Requirements

Software

  • Android Studio v4.1.1

Modules

  • Kotlin v1.4.32
  • Gradle v4.1.1

Versioning Guidelines

This project use Semantic Versioning 2.0.0 rules. In build.gradle (Module: app):

  • Increase the versionCode
  • Change the versionName

example:
Before

defaultConfig {  
  ...
  versionCode 1  
  versionName "1.0.0"  
  ...
}

After:

defaultConfig {  
  ...
  versionCode 2  
  versionName "1.1.0"  
  ...
}

Production Guidelines

Create Keystore

The keystore is only need to create once and we will use it as long as its not expired. So, don't lose it. Keystore is used to build apps for google play store release

Follow this guide to create keystore.

Build APK/AAB for Production

For production you can use Android Studio IDE by going to Build > Generate Signed Bundle/APK... (then follow the instructions).
But here is for someone who love terminal:
For using terminal you need to define sign in config in your local.properties, like this:

app.release.store.file=path/to/keystore/file  
app.release.key.alias=release-key-alias  
app.release.store.password=keystore-password  
app.release.key.password=release-key-password

then go ahead:

  • Flavor Production (.apk)
 ./gradlew assembleProductionRelease
  • Flavor Production (.aab)
 ./gradlew bundleProductionRelease

Development Guidelines

This project apply Clean Architecture, MVVM and Repository Pattern (but in here we use Fuel Kotlin instead of Retrofit), and also SOLID Principle.

Dependencies

Flavors and Build Type

There are three flavors in this project, those are development, staging, and production. Each flavor has debug and release build type. Use debug type to debug the apps, release type will disable the apps from writing logs, apply proguard, and shrink resource.

Build APK for Testing

Actually you can also do this using Android Studio IDE by going to Build -> Generate Signed Bundle/APK... (then follow the instructions and don't forget you need keystore for this).
But here is also for terminal lover:

  • Flavor Development
 ./gradlew assembleDevelopment
  • Flavor Staging
 ./gradlew assembleStaging

Directory structure

Directory Tree

.
+-- app
|   +-- presentation
|   +-- util
+-- common
|   +-- constant
|   +-- extension
|   +-- mapper
|   +-- result
+-- core
|   +-- 
   
    
|   |    +-- model
|   |    +-- repo
|   |    +-- source
|   +-- 
    
     
|   |    +-- model
|   |    +-- repo
|   |    +-- source
+-- framework
|    +-- core
|    |   +-- 
     
      
|    |   |    +-- mapper
|    |   |    +-- model
|    |   |    +-- repo
|    |   |    +-- source
|    |   +-- 
      
       
|    |   |    +-- mapper
|    |   |    +-- model
|    |   |    +-- repo
|    |   |    +-- source
|    +-- http
|    +-- database
.

      
     
    
   

Explanation

There are four main modules those are app, common, core, and framework

  • app: Contains app UI, the app face it self, and also where user interact with the app, can't be implement to another module.
  • app.presentation: Contains activity, fragment, adapter, and viewmodel.
  • app.util: Contains util that help the UI, only define this util if it cannot be used for another main modules, or its for UI specific.
    .
  • common : Like its name, common module means this module can be implement by all modules.
  • common.constant: contains constant such as date format, codes, etc.
  • common.extension: contains your kotlin extension.
  • common.mapper: contains mapper interface such as map response to model, model to entiry, etc.
  • common.result: contains function's return value wrapper and error model.
    .
  • core: this is the shape of the app, contains app business process, and it is just interface.
  • core. : define your module name, example: core.post.
  • core. .model : contains the data layer of clean arch
  • core. .repo : contains the repository interface
  • core. .source : contains interfaces of the datasource, such as api, database, or preferences.
    .
  • framework: this module contains the implementation of core module and another library integration such as database, http client, etc.
  • framework.core: contains implementation of core module
  • framework.core. .mapper : contains implementation of mapper used by this module, implement mapper interface from common module.
  • framework.core. .model : contains response model, request model, and entity model of your_module.
  • framework.core. .repo : contains the repository implementation of core module.
  • framework.core. .source : contains the datasource implementation of core module.
  • framework.http: contains http client interface and its implementation
  • framework.database contains database instance

Environment variables

All environment variable, base url, sensitive data, keystore credential, or something that has limited access need to define in local.properties. Environment variable used in this project as below:

local.properties:

app.release.store.file=path/to/keystore/file  
app.release.key.alias=release-key-alias  
app.release.store.password=keystore-password  
app.release.key.password=release-key-password  
  
field.dev.base.url=https://limitless-forest-49003.herokuapp.com  
field.stg.base.url=https://limitless-forest-49003.herokuapp.com  
field.pro.base.url=https://limitless-forest-49003.herokuapp.com
You might also like...
A collection of samples to discuss and showcase different architectural tools and patterns for Android apps.
A collection of samples to discuss and showcase different architectural tools and patterns for Android apps.

Android Architecture Blueprints v2 Android Architecture Blueprints is a project to showcase different architectural approaches to developing Android a

The code for the Congression App Challenge Webinar.

Getting-Started-with-Android-Studio-and-Kotlin-CAC-Webinar A webinar hosted by the Congressional App Challenge and theCoderSchool The code for the Con

LoadApp This is my submission for the "Building an Advanced Android App"

LoadApp This is my submission for the "Building an Advanced Android App" project of the Udacity Android Kotlin Developer nanodegree. (C) Jaldhar H. Vy

The source code for the Bus Scheduler app codelab

Bus Scheduler App This folder contains the source code for the Bus Scheduler app codelab. Introduction The Bus Scheduler app displays a list of bus st

 Room - SleepQualityTracker app
Room - SleepQualityTracker app

Room - SleepQualityTracker app This is the toy app for Lesson 6 of the Android App Development in Kotlin course on Udacity. SleepQualityTracker The Sl

MVI Architecture Android Beginners: Sample App

MVI Architecture Android Beginners: Sample App This repository contains a sample app that implements MVI architecture using Kotlin, ViewModel, LiveDat

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

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

A sample photo browsing app in Kotlin, Android using Picsum image API.
A sample photo browsing app in Kotlin, Android using Picsum image API.

Picsum Photo App Functionality The app's functionality includes: Fetch a list of images from picsum photos api (https://picsum.photos/) and show them

Taken from a PeopleCode app package to be used as a refactoring exercise

The code below was taken from a PeopleCode app package to be used as a refactoring exercise. Packages original: contains the code below translated int

Releases(v1.0.0-alpha)
Owner
Imantoko
Imantoko
A simple list-detail application using the Github API

GitHub Users Search Android application to search users via GitHub API Project demonstrates how to use Kotlin, Android Architecture Components, Dagger

Ndu Sunday 2 May 26, 2022
A list of search results from the Yelp API and displays the results in a scrollable list

Yelp clone displays a list of search results from the Yelp API and displays the results in a scrollable list.

Daniel Marin 0 Nov 12, 2021
A sample Album list app that shows how to use ViewModels and Room together with RxJava & Dagger2, in Kotlin by Clean Architecture.

Kotlin-MVVM-Hilt A sample Album list app that shows how to use ViewModels and Room together with RxJava & Dagger2, in Kotlin by Clean Architecture. Im

hpAndro 1 May 12, 2022
An example to show how a proper plugin for Lambda Client is set up

Lambda Plugin SDK This project in an example to show how a proper plugin for Lambda Client is set up. The advantage of plugins for a utility mod is th

KMatias 0 Oct 25, 2021
Displays a list of albums using latest libraries

Albums Application Demo Displays a list of albums using latest libraries Used Clean Architecture #Domain: Contains the definitions of the business log

null 0 Nov 3, 2021
This application is an example of how to create menu on android platform.

HW_Menu This application is an example of how to create menu on android platform. Table of Contents Introduction Screenshots Resources Contact Introdu

Ibrahim Alfaifi 0 Nov 9, 2021
Event Trackr Android app. Allows users to track birthdays and anniversaries of friends and family.

Trackr Event Trackr Android app. Allows users to track birthdays and anniversaries of friends and family. You need to open this project in Android Stu

null 4 Dec 17, 2022
This is the toy app for Lesson 9 of the Android App Development in Kotlin course on Udacity.

Behind the Scenes - DevByte Viewer App This is the toy app for Lesson 9 of the Android App Development in Kotlin course on Udacity. DevByte DevByte Vi

Jaime 1 Oct 20, 2021
The simple app is to demonstrate how the modern Enterprise Android App Architecture should be

Weather Forecast App The simple app is to demonstrate how the modern Enterprise Android App Architecture should be. Clean Architecture (Mr Uncle Bob)

null 2 Nov 12, 2021
eCommerce app developed with Android Jetpack and Kotlin

garden-shed eCommerce app developed with Android Jetpack and Kotlin This is my first mobile application. Garden Shed is a simple application for buyin

null 2 Nov 1, 2022