/products-store

A clean architectured Android app

Primary LanguageKotlinGNU General Public License v3.0GPL-3.0

products-store

An Android app about a product store with Clean Architecture

🏗️️ Built with

What How
📝 Language Kotlin
🏗 Architecture MVVM
🧠 API GitHub Gist
💾 Persistence Room
💉 DI Dagger-Hilt
🛣️ Navigation Jetpack Navigation Component
🌊 Async Coroutines + Flow + LiveData
🌐 Networking Retrofit
📄 JSON Gson

📷 Screenshots

image image image

📓 Notes

The main solution consists of a basket of products that the user updates while using the app. It is persisted in a local database.

The idea is that both, products and promotions are fetched from a backend server using different endpoints. The products and the promotions are merged and we get a unique domain object containing this data.

The promotion class was designed in order to be able to add new types of discounts in the future, without needing to change the code.

The user can add or remove products from the basket and the total price of the cart is displayed in the home fragment.

Once the user is ready to checkout, the checkout fragment shows all the items in the basket and the corresponding discounts if it corresponds. Here the user can decide to remove certain items and continue to the final payment screen.

Not all the tests were added for a matter of time, but I consider that the most relevant ones are written.