Writing MoneySwiftTest App using Android Architecture Components, in 100% Kotlin, using Android Jetpack Components, and in Compose 🚀
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/kanake10/MoneySwiftTest.git
- Build the project and run it
- Ready app APK can be downloaded from here
On its launch MoneySwift will:
- First show a splash screen
- Then the MoneySwift Products that are available for sale
- onClick of one of the item's cards, we shall be navigated to the respective item's details screen
- onClick on the Buy Now button, our app shall launch a dialog that expects us to key in our payment Details
- After we successfully enter our correct payment details, another dialogs launches with a successful payment message
- N/B, for our payment to be successful, the payment details dialog expects a 16 digit CardNumber, a 3 digits CVC and in our MM/YY textfield, the Month has to be between 1-12 and all these payment details have to be filled otherwise the app shall show an error.
-
Tech-stack
- Kotlin - a modern, cross-platform, statically typed, general-purpose programming language with type inference.
- Coroutines - lightweight threads to perform asynchronous tasks.
- Room Database - lightweight library used to locally store our data.
- 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.
-
Tests
-
Architecture
- MVVM—Model View ViewModel pattern with layer-based modularization.
- N/B This is a small project, hence Modularization is overkill, but it is implemented to demonstrate how layer-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.
-
CI/CD
Let's take a look at our MoneySwift app:
Splash | Products | Product Details | Payment Details |
---|---|---|---|
![]() |
![]() |
![]() |
![]() |
Error Handling UI with Custom Error Displays 🚀🚀
Error on blank TextField | CVC Error | Card Number Error | Correct Details Example | Payment Success |
---|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
The screenshots below show test results for tests done on this repo