Code Monkey home page Code Monkey logo

cocktails's Introduction

Cocktails

Mobile App to show various cocktails🍸 🍷 🍹 from the CockTailDB API.Written using Kotlin, Clean Architecture ,MVVM, Room ,DI and other jetpack libraries.

Min Api:21

Table of Contents

Prerequisites

Change the prefix of the BASE_URL from www to https in order to successfully load data.

To check for dependency updates, run the following gradlew command:

./gradlew dependencyUpdate

Good thing the plugin does not update dependencies whose versions are not stable yet 🥳 🥳 .

Dependencies

All the dependencies (external libraries) are defined in the single place - Gradle scripts/versions.gradle folder. This approach allows to easily manage dependencies and use the same dependency version across all modules. Each of the tools has its own Gradle file in the scripts folder. This is by design so that if you chose to have a multi module project, these dependencies can easily be shared between them. This is already configured inside our root build.gradle file, by applying to each sub project:

Danger

This template uses Danger which will perform some checks against our pull requests. You can find the list of checks in the Dangerfile. In addition, we have a GitHub Actions workflow for Danger checks. In order for that to work, you'll need a Danger API key setup in your GitHub secrets. Info on this can be found here.

Architecture

The app is built using the Modular MVVM architectural pattern and makes heavy use of a couple of Android Jetpack components. MVVM allows for the separation of concern which also makes testing easier. The app has a fragment that communicates to ViewModel which in turn communicates to the usecase which communiacates to Repository to get data.

Techstack

  • Tech-stack

    • Kotlin - a cross-platform, statically typed, general-purpose programming language with type inference.

    • Coroutines - perform background operations.

    • Flow - handle the stream of data asynchronously that executes sequentially.

    • KOIN - a pragmatic lightweight dependency injection framework.

    • View Binding - A feature that allows you to more easily write code that interacts with views.

    • Android KTX - Provide concise, idiomatic Kotlin to Jetpack and Android platform APIs.

    • AndroidX - Major improvement to the original Android Support Library, which is no longer maintained.

    • Jetpack🚀

      • Room - a persistence library provides an abstraction layer over SQLite.
      • LiveData - is an observable data holder.
      • Lifecycle - perform action when lifecycle state changes.
      • ViewModel - store and manage UI-related data in a lifecycle conscious way.
      • Git Hooks for automatically perform static analysis checks.
      • Gradle Versions Plugin for checking all dependencies for new versions.
      • Danger which will perform some checks against our pull requests.
  • Architecture

    • MVVM - Model View View Model
  • Gradle

    • Plugins
      • Ktlint - creates convenient tasks in your Gradle project that run ktlint checks or do code auto format.
      • Detekt - a static code analysis tool for the Kotlin programming language.
      • Spotless - format java, groovy, markdown and license headers using gradle.
      • Dokka - a documentation engine for Kotlin, performing the same function as javadoc for Java.
      • Danger - a documentation engine for Kotlin, performing the same function as javadoc for Java.
  • CI/CD

    • Github Actions

Screenshots

The final app looks like this:

Collapsing ToolBar CockTails Shimmer

SlackMessage

Using fastlane to send a message to Slack once our app compiles successfully.

fastlane android debug

|| ||

cocktails's People

Contributors

kanake10 avatar mambobryan avatar mawindavic avatar ronnieotieno avatar

Watchers

 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.