QuickStay
An Android app that provides users with a seamless experience in exploring and booking accommodations, It presents a list of property listings using data from the provided JSON source, written 100% in Kotlin and Jetpack Compose using Android Jetpack Components.
Install / Use
/learn @daniel-waiguru/QuickStayREADME
An Android app that provides users with a seamless experience in exploring and booking accommodations, It presents a list of property listings using data from the provided JSON source, written 100% in Kotlin and Jetpack Compose using Android Jetpack Components.
Prerequisites
To run the project in your local environment, you need
- Go to the android studio and create a new project using the 'Get from version control' option.
- Paste this link
https://github.com/daniel-waiguru/QuickStay.git - Add your Google maps API Key to
local.propertiesfile - Build the project and run it
Tech-stack
- Tech-stack
- Kotlin - a modern, cross-platform, statically typed, general-purpose programming language with type inference.
- Coroutines - lightweight threads to perform asynchronous tasks.
- Flow - a stream of data that emits multiple values sequentially.
- StateFlow - Flow APIs that enable flows to emit updated state and emit values to multiple consumers optimally.
- Dagger Hilt - a dependency injection library for Android built on top of Dagger that reduces the boilerplate of doing manual injection.
- Gson A Java and Kotlin serialization/deserialization library to convert Kotlin/Java Objects into JSON and back
- Jetpack
- Jetpack Compose - A modern toolkit for building native Android UI
- Lifecycle - perform actions in response to a change in the lifecycle state.
- ViewModel - store and manage UI-related data lifecycle in a conscious manner and survive configuration change.
- DataStore - A data storage solution backed using Kotlin Coroutines and Flows that allows you to store key-value pairs or typed objects with protocol buffers
- Timber - a highly extensible Android logger.
Architecture
This project uses the MVVM(Model View ViewModel) pattern with Feature-based modularization, where modules are categorised into three categories
Foundation
This category contains foundational extensions to frameworks, e,g in the project designsystem that is reused across feature implementation libraries
Platform
This category contains the building blocks to build the features. Examples include analytics
Features
This category contains the features/functionalities of the application, in this case, authentication, properties, and booking
Apps
This category contains apps that aggregate the feature they need; this could be the main app, an instant app, or an internal app
Modules in the Platform and Feature categories are also split into two modules
Contract
This is a lightweight module that contains interface definitions and models to expose the data needed by other modules, eg, the authentication feature api exposes session information to other features
Lib
This is where the implementation code of that particular feature lives and provides implementation of the interface defined in Contract
<img src="/docs/quickstay_architecture_diagram.png" />N/B This is a small project, hence Modularization is not necessary, but it is implemented to demonstrate how Feature-based modularization can be implemented in a large-scale complex project
- Gradle
- Gradle Kotlin DSL - An alternative syntax for writing Gradle build scripts using Koltin.
- Version Catalogs - A scalable way of maintaining dependencies and plugins in a multi-module project.
- Convention Plugins - A way to encapsulate and reuse common build configuration in Gradle, see here
- CI/CD
Dependencies
All the dependencies (external libraries) are managed using version catalogs and defined in a single place gradle/libs.versions.toml file. This is a scalable approach to manage dependencies and use the same dependency version across all modules.
Code Analysis
This repo uses Android Studio's built-in linter to analyze the codebase and identify potential code style violations, code quality issues, etc.
./gradlew lintDebug
App Screenshots
Light Mode
| Sign In | Properties | Properties Filtered | | ------------- |:--------------------: | -------------------: | | <img src="/docs/sign_in.png" width="260"/> | <img src="/docs/properties.png" width="260"/> | <img src="/docs/properties_filtered.png" width="260"/> |
| Property Details | Property Details Scrolled | | -----------------:| ------------------------:| | <img src="/docs/property_info1.png" width="260"/> | <img src="/docs/property_info2.png" width="260"/> |
Dark Mode
| Sign In | Properties | Property Info | |-------------------------------------------------|:--------------------------------------------------:|-------------------------------------------------:| | <img src="/docs/sign_in_dark.png" width="260"/> | <img src="/docs/properties_dark.png" width="260"/> | <img src="/docs/property_dark.png" width="260"/> |
| Booking | |------------------------------------------------:| | <img src="/docs/booking_dark.png" width="260"/> |
App Recording 🎥
https://github.com/daniel-waiguru/TripitacaAndroid/assets/52042764/537a0af0-c3e4-4288-b1e4-f836ab1d1803
