A modern, feature-rich Android application for managing shopping lists, built with Jetpack Compose and Clean Architecture.
- Unified Category View: View all your shopping items grouped by their categories on a single screen.
- Category Management: Create, edit, and delete custom categories.
- Item Management: Add, edit, delete, and toggle shopping items directly within their categories.
- Theme Support: Toggle between Light and Dark modes with persistent preference storage.
- Offline First: All data is stored locally using Room Database.
- Language: Kotlin
- UI Toolkit: Jetpack Compose (Material 3)
- Architecture: Clean Architecture (Presentation, Domain, Data layers)
- Pattern: MVI (Model-View-Intent)
- Dependency Injection: Koin
- Local Storage: Room Database
- Preferences: DataStore
- Asynchrony: Kotlin Coroutines & Flow
- Navigation: Jetpack Navigation Compose (Type-safe)
The project follows the principles of Clean Architecture to ensure separation of concerns and testability.
-
Presentation Layer:
- UI: Composable functions (
CategoryListScreen,ShoppingItemRow). - ViewModel: Handles UI logic and state management (
CategoryListViewModel). - State/Event/Effect: Implements the MVI pattern for predictable state updates.
- UI: Composable functions (
-
Domain Layer:
- Models: Pure Kotlin data classes (
Category,ShoppingItem). - Use Cases: Encapsulate business logic (
GetShoppingItemsUseCase,AddShoppingItemUseCase, etc.). - Repositories: Interfaces defining data operations.
- Models: Pure Kotlin data classes (
-
Data Layer:
- Local: Room Database implementation (
ShoppingDatabase,CategoryDao,ShoppingDao). - Entities: Database tables (
CategoryEntity,ShoppingItemEntity). - Repository Implementation: Concrete implementations of domain repositories.
- Local: Room Database implementation (
- Clone the repository:
git clone https://github.com/yourusername/ShoppingListApp.git
- Open in Android Studio:
- Open Android Studio and select "Open an existing Android Studio project".
- Navigate to the cloned directory.
- Build and Run:
- Wait for Gradle sync to complete.
- Select an emulator or connected device.
- Click the "Run" button (green play icon).
com.example.shoppinglistapp
├── app # Application class and DI setup
├── core # Common extensions and utilities
├── data # Data layer (Room, DataStore, Repositories)
├── domain # Domain layer (Models, UseCases, Repository Interfaces)
└── presentation # UI layer (Screens, ViewModels, Theme, Components)