- Authentication System - Complete login and signup functionality with validation
- Clean Architecture - Multi-module structure following clean architecture principles
- MVVM Pattern - Reactive UI with ViewModels and state management
- User Profile Management - View and manage authenticated user profiles
- Shopping Cart - Add/remove products with local persistence
- Wishlist - Save favorite products for later
- Guest Mode - Continue shopping without authentication
- Product Catalog - Browse and search products with filtering
- Modern UI - Beautiful Jetpack Compose UI with Material Design 3
VShop follows Clean Architecture principles with clear separation of concerns:
- Domain Layer: Pure Kotlin business logic, entities, and use cases
- Data Layer: Repository implementations, local database, and network calls
- Presentation Layer: ViewModels, Compose UI, and navigation
π See detailed architecture documentation
- Language: Kotlin
- Architecture: Clean Architecture + MVVM
- UI: Jetpack Compose + Material Design 3
- DI: Hilt
- Database: Room
- Preferences: DataStore
- Image Loading: Coil
- Navigation: Navigation Compose
- Async: Coroutines + Flow
- Modularization: Multi-module structure
- State Management: StateFlow + Compose State
βββ app/ # Main application module
βββ core/
β βββ common/ # Shared utilities and constants
β βββ ui/ # Shared UI components and theme
β βββ resources/ # Shared resources
βββ domain/ # Business logic (pure Kotlin)
βββ data/ # Data layer implementation
βββ feature/ # Feature-specific UI and ViewModels
For testing the login functionality, you can use:
- Email: demo@vshop.com
- Password: demo123
Or create a new account using the signup feature.
- Email/password login with validation
- User registration with comprehensive validation
- Secure session management with DataStore
- Guest mode for non-authenticated users
- Product browsing and search
- Category filtering
- Add to cart/wishlist functionality
- Shopping cart management
- View user information
- Authentication status
- Logout functionality
- Profile management options
- Testable: Easy unit testing with pure domain layer
- Maintainable: Clear separation of concerns
- Scalable: Easy to add new features
- Framework Independent: Business logic isolated from Android framework
- Clone the repository
- Open in Android Studio
- Build and run the project
- Use demo credentials or create a new account
- Run unit tests:
./gradlew test - Run instrumented tests:
./gradlew connectedAndroidTest
- Follow the existing architecture patterns
- Add unit tests for new business logic
- Use the established package structure
- Follow clean code principles
0427.mp4
A modern Android e-commerce application built with Clean Architecture and Jetpack Compose.
VShop follows Clean Architecture principles with clear separation of concerns:
βββββββββββββββββββββββββββββββββββββββββββββββββββ
β Presentation Layer (UI) β
β β’ Jetpack Compose β’ ViewModels β’ Navigation β
ββββββββββββββββββββ¬βββββββββββββββββββββββββββββββ
β depends on
ββββββββββββββββββββΌβββββββββββββββββββββββββββββββ
β Domain Layer (Business Logic) β
β β’ Use Cases β’ Entities β’ Repository Interfaces β
β β’ NO Framework Dependencies (Pure Kotlin) β
ββββββββββββββββββββ¬βββββββββββββββββββββββββββββββ
β depends on
ββββββββββββββββββββΌβββββββββββββββββββββββββββββββ
β Data Layer (Implementation) β
β β’ Repositories β’ Database β’ Network β’ Cache οΏ½οΏ½οΏ½
βββββββββββββββββββββββββββββββββββββββββββββββββββ
- β Login / Signup with validation
- β Logout
- β Session validation (isUserLoggedIn)
- β Input validation (email, password)
- β Get current user data
- β Update user profile
- β User preferences management
- β Profile completeness calculation
- β Browse products (all, by ID, by category)
- β Manage favorites
- β Cart operations (add, remove, update quantity)
VShop/
βββ app/ # Application module
βββ core/
β βββ common/ # Shared utilities, constants
β βββ resources/ # Shared resources (colors, strings, icons)
β βββ ui/ # Shared UI components, base classes
βββ data/ # Data layer implementation
β βββ dao/ # Room DAOs
β βββ entities/ # Database entities
β βββ di/ # Dependency injection modules
β βββ mappers/ # Entity β Domain model mappers
β βββ repositoryImpl/ # Repository implementations
βββ domain/ # Domain layer (Pure Kotlin)
β βββ model/ # Domain entities
β βββ repository/ # Repository interfaces
β βββ usecase/ # Business logic use cases
β βββ validation/ # Domain validation logic
βββ feature/ # Feature modules (UI)
βββ auth/ # Login, Signup screens
βββ home/ # Home screen
βββ cart/ # Cart screen
βββ favorite/ # Favorites screen
βββ profile/ # Profile screen
- Android Studio Hedgehog or later
- JDK 17 or higher
- Android SDK 34
git clone https://github.com/yourusername/VShop.git
cd VShop
./gradlew buildFor testing the login feature, use these credentials:
- Email:
demo@vshop.com - Password:
demo123
-
π Complete Authentication System
- Login / Signup with validation
- Session management with DataStore
- Auto-logout on session expiry
-
π€ User Profile Management
- View user information
- Profile completeness tracking
- Logout functionality
-
π Product Browsing
- Product catalog
- Product details
- Favorites management
-
ποΈ Shopping Cart
- Add/remove items
- Quantity management
- Cart persistence
-
π¨ Modern UI/UX
- Material Design 3
- Consistent color scheme
- Beautiful animations
- Automatic session handling
- Auto-redirect to login when needed
- Easy access to user data in any screen
- Loading state management
- ARCHITECTURE.md - Complete architecture guide
- USECASE_GUIDE.md - Use case patterns and best practices
- SESSION_MANAGEMENT.md - Session management system
- Clean Architecture
- MVVM Pattern
- Multi-module architecture
- Jetpack Compose
- Material Design 3
- Navigation Component
- Hilt
- Room Database
- DataStore (for preferences)
- Kotlin Coroutines
- Flow
- Kotlin DSL
- Domain-driven design
- Separation of concerns
paint_01: #292526 // Dark - Primary buttons, links
paint_02: #787676 // Medium Gray - Secondary text, icons
paint_03: #A3A1A2 // Light Gray - Borders
paint_04: #F2F2F2 // Very Light Gray - Card backgrounds
paint_05: #121111 // Very Dark - Primary text
White: #FFFFFF // Main background, button text- Onboard Screen - Welcome with login/signup/guest options
- Login Screen - Email/password authentication
- Sign Up Screen - New user registration
- Home Screen - Product catalog with personalized greeting
- Cart Screen - Shopping cart management
- Favorite Screen - Saved favorite products
- Profile Screen - User profile and logout
# Run unit tests
./gradlew test
# Run instrumented tests
./gradlew connectedAndroidTestContributions are welcome! Please feel free to submit a Pull Request.
- Fork the project
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License.
Vanard
- β Production-ready clean architecture
- β Scalable modular structure
- β Testable domain layer with no framework dependencies
- β Maintainable clear separation of concerns
- β Modern latest Android development practices
Built with β€οΈ using Kotlin and Jetpack Compose