An Android e-commerce shipping app replicating a real-world project environment, utilizing Clean Architecture, Kotlin, and Jetpack Compose with a clean code structure.
In addition, the project:
- Is continually updated to stay aligned with the latest technologies.
- Is unit-tested to ensure robust code quality.
Record_2024-09-15-12-19-41.mp4
- Search: Users can search for products by name or ID, allowing them to quickly find specific items within the app.
- Filter: Users can filter products based on categories.
- Connectivity Status: Displays a banner to inform users of their current connectivity status.
- Auto Sync: Synchronization and caching are managed to provide a smooth user experience.
- Favorites: Users can add products to a favorites list for easy access later.
- Pull to Refresh: Users can refresh content by pulling down on the screen.
This repository was created with the intention of sharing knowledge, stepping outside of my comfort zone, and using it as a platform to implement new challenges and ideas.
API: Product Mock Server
This API serves as the primary data source for the app, providing a mock database of product information. It mimics real-world data operations such as fetching, updating, and managing product data.
Architecture is dynamic and ever-evolving. There are always several solutions to any given problem, and what works best depends on the specific requirements and constraints of your project.
The core principles of the Clean Architecture approach are summarized as follows:
- Layered Application Code: The application code is separated into layers that define the separation of concerns.
- Strict Dependency Rule: Each layer can only interact with the layers below it.
- Generic Code at Lower Layers: The lower layers handle policies and rules, while the upper layers handle implementation details like databases, network managers, and UI.
-
Kotlin: First-class and official programming language for Android development.
-
Coroutines: For asynchronous programming and more.
-
Flow: A cold asynchronous data stream that sequentially emits values and completes with success or failure.
-
StateFlow: A LiveData replacement for handling state updates.
-
Jetpack Compose: A modern toolkit for building native UIs.
-
Android Architecture Components: Libraries to design robust, testable, and maintainable apps.
- ViewModel: Stores UI-related data that survives configuration changes.
- SavedStateHandle: A handle to saved state passed to
ViewModel
. - Navigation Compose: For easier navigation between composables.
- Room: Provides an abstraction layer over SQLite for easier and more robust database access.
-
Dependency Injection:
- Hilt: A simpler way to integrate Dagger dependency injection into Android applications.
-
Retrofit: A type-safe HTTP client for Android and Java.
-
Mockito: For mocking and unit testing.
The code style in this project is maintained using Detekt.
To run a style check:
./gradlew detektTask
## Contributing
Let me know if you need any further adjustments!