Skip to content

joelarmah/customer-keeper-android

Repository files navigation

Customer Keeper

The Customer Keeper App helps businesses focus their business value around their customers.

This app shows the usage of the new Navigation Architecture Component in collaboration with the Bottom Navigation view with separate back stack history for each tab.

App features:

  • Send & Create Invoices
  • List & Manage customers
  • List & Manage Products & Services
  • Light/ Dark theme.

Screenshots

List

Architecture

Inspired by Buffers Clean Architecture Components Boilerplate (without modularization)

Modules:

  • ui - It uses all the components and classes related to Android Framework. It gets the data from presentation layer and shows on UI.
  • data - The data layer implements the repository interface that the domain layer defines. This layer provide a single source of truth for data. (Kotlin module that can only access domain module)
  • remote - Handles data interacting with the network. (can only access data module)
  • cache - Handles data interacting with the local storing (Room DB). (can only access data module)
  • domain - The domain layer contains the UseCases that encapsulate a single and very specific task that can be performed. This task is part of the business logic of the application. (Kotlin module that cannot access any other module)
  • presentation - MVVM with ViewModels exposing LiveData that the UI consume. The ViewModel does not know anything about it's consumers. (Android module that can only access domain module)

MAD Scorecard

Tech stack - Library:

  • Kotlin
  • Coroutines - A coroutine is a concurrency design pattern that you can use on Android to simplify code that executes asynchronously
  • Flow - Flow is used to pass (send) a stream of data that can be computed asynchronously
  • Hilt - for dependency injection.
  • Kotlin-DSL - Used to handle gradle dependencies and config versions
  • JetPack
    • LiveData - For reactive style programming (from VM to UI).
    • Lifecycle - Used get lifecycle event of an activity or fragment and performs some action in response to change
    • ViewModel - Stores UI-related data that isn't destroyed on UI changes.
    • Room - Used to create room db and store the data.
    • Navigation - Used to navigate between fragments
    • Data Binding - Used to bind UI components in your XML layouts.
  • Material-Components - Material design components like ripple animation, cardView.
  • Retrofit - Used for REST api communication.
  • OkHttp - HTTP client that's efficient by default: HTTP/2 support allows all requests to the same host to share a socket
  • Timber - Used for logging.
  • Coil - Coil is an Image loading library backed by Kotlin Coroutines.

Fuuture TODO

  • CI/CD with Github Actions
  • Use Jetpack Compose

Contributions

Please feel free to file an issue for errors, suggestions or feature requests. Pull requests are also encouraged.