Cocktails
Mobile App to show various cocktails🍸 🍷 🍹 from the CockTailDB .Written using Kotlin, Clean Architecture ,MVVM, Room ,Koin for DI and other jetpack libraries.
Install / Use
/learn @kanake10/CocktailsREADME
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.
|<img src="screenshots/cleanarch.jpeg" width=600 height=500/>| |:----:|
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.
-
- 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.
- Plugins
-
CI/CD
- Github Actions
Screenshots
The final app looks like this: Collapsing ToolBar | CockTails | Shimmer --- | --- | --- <img src="https://github.com/kanake10/Cocktails/blob/main/screenshots/cocktails_list.png" width="280"/> | <img src="https://github.com/kanake10/Cocktails/blob/main/screenshots/toolbar.png" width="280"/> | <img src="https://github.com/kanake10/Cocktails/blob/main/screenshots/shimmer.png" width="280"/>
SlackMessage
Using fastlane to send a message to Slack once our app compiles successfully.
fastlane android debug
|<img src="screenshots/slackMessage.png" width=700 height=500/>| |<img src="screenshots/slackNotification.png" width=500 height=500/>|
Related Skills
node-connect
347.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
107.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
347.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
347.0kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
