Skip to content

kaaneneskpc/Supplr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

126 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ›’ Supplr - Kotlin Multiplatform E-Commerce App

Android iOS Kotlin Jetpack Compose Koin Open Source


๐Ÿš€ About the Project

Supplr is a modern, modular, and scalable e-commerce application targeting both Android and iOS platforms. Built with Kotlin Multiplatform (KMP) and Jetpack Compose Multiplatform, it allows users to browse products, add to cart, place orders, manage their profiles, and manage their favorite products. Features include location management, Stripe payment integration, and a comprehensive admin analytics dashboard for business insights and product management.


๐Ÿ“ฆ Features

๐Ÿ›’ Customer Features

  • ๐Ÿ”ฅ Kotlin Multiplatform: Single codebase for Android & iOS
  • ๐ŸŽจ Modern UI: Responsive and animated interface with Jetpack Compose Multiplatform
  • ๐Ÿ—‚๏ธ Contact Us: Customer support and communication
  • ๐Ÿ›’ Cart & Order Management: Full shopping cart with order tracking
  • ๐Ÿ‘ค User Profile & Authentication: Secure user management
  • ๐Ÿท๏ธ Category & Product Listing: Browse products by categories
  • ๐Ÿ’ณ Checkout & Order Completion: Seamless payment experience
  • โค๏ธ Favorites: Save and manage favorite products
  • ๐Ÿ—บ๏ธ Location Management: Address management with categories (Home, Work, Other)
  • ๐Ÿ’ณ Stripe Payment Integration: Real PaymentSheet (Android) / Simulated (iOS)
  • ๐Ÿ”” Push Notification Support: Personalized notifications
  • ๐Ÿ“ฆ Order History: View and track all past orders with detailed status
  • โญ Product Reviews: Rate products, write reviews with photos, helpful/unhelpful voting
  • ๐ŸŽ Coupon & Discounts: Apply coupon codes at checkout (percentage, fixed, free shipping)
  • ๐Ÿ‘ค Profile Settings: Communication preferences, security settings, account management
  • ๐Ÿ” Security Features: Two-factor authentication, password change, account deletion
  • ๐ŸŽฎ Gamification: Leaderboard rankings and Spin Wheel for daily prizes

๐Ÿ“Š Admin Features

  • ๐Ÿ› ๏ธ Admin Panel: Comprehensive product and analytics management
  • ๐Ÿ“ˆ Analytics Dashboard: Real-time business insights with interactive charts
  • ๐Ÿ“Š Revenue Analytics: Daily revenue tracking with enhanced line charts
  • ๐Ÿ† Top Products: Best-selling products analysis
  • ๐Ÿ‘ฅ User Statistics: User growth and engagement metrics
  • ๐Ÿ“… Date Range Filtering: Flexible time period analysis
  • ๐Ÿ”„ Real-time Data: Auto-refreshing dashboard with pull-to-refresh
  • ๐ŸŽจ Interactive Charts: Custom Canvas-based charts with animations
  • ๐Ÿ“ฑ Responsive Design: Optimized for all screen sizes
  • ๐Ÿ” Secure Access: Role-based authentication and Firestore security rules
  • ๐Ÿ› ๏ธ Order Management: View all orders, update status, cancel orders (except delivered)

๐Ÿ—๏ธ Technical Features

  • ๐Ÿ” Firebase Authentication & Firestore
  • ๐Ÿ—๏ธ Dependency Injection with Koin
  • ๐ŸŒ Networking with Ktor
  • ๐Ÿ–ผ๏ธ Image Loading with Coil - Platform-specific caching (25% memory, 100MB disk)
  • ๐Ÿงช Comprehensive Unit Testing - 50+ tests with Turbine, Coroutines Test
  • ๐Ÿ“„ Cursor-based Pagination - Efficient Firestore data fetching with startAfter()
  • โ™พ๏ธ Infinite Scroll - Automatic page loading with LazyColumn scroll detection
  • โšก Code Splitting - Module-based lazy loading for faster startup performance

๐Ÿ—๏ธ Project & Module Structure

- composeApp/      : Main multiplatform entry point and general UI.
- iosApp/          : iOS app entry (integrated with SwiftUI).
- feature/
    - auth/              : Authentication (login, register).
    - cart/              : Cart management.
    - home/              : Home screen and navigation.
    - profile/           : User profile management, settings, security features.
    - admin_panel/       : ๐Ÿ“Š Admin analytics dashboard with charts and insights.
    - manage_product/    : Admin add, edit, delete products.
    - product_details/   : Product details.
    - products_overview/ : Home screen new & discounted product listing.
    - payment_completed/ : Order completed screen and post-order.
    - categories/        : Category management.
    - contact_us/        : Contact with Us.
    - favorites/         : Favorites screen and logic.
    - locations/         : User address management with categories.
    - checkout/          : Payment processing with Stripe integration.
    - order_history/     : ๐Ÿ“ฆ Customer order history and tracking.
    - gamification/      : ๐ŸŽฎ Gamification with Leaderboard and Spin Wheel.
- data/            : Data layer, repositories, and services.
- shared/          : Shared domain models, utils, constants.
- di/              : Dependency injection modules (Koin).
- navigation/      : Navigation graph and routing.

๐Ÿงฉ Architecture

Ekran Resmi 2026-01-31 14 26 24
  • Clean Architecture: Data โ†’ Domain โ†’ Presentation layers
  • Feature-based modules: Independent development and testing
  • Centralized DI with Koin: All ViewModels and repositories managed centrally
  • Testability: Mockable repository interfaces and ViewModels
  • Analytics Architecture: Dedicated analytics layer with real-time data processing

๐Ÿ› ๏ธ Tech Stack

Core Technologies

  • Kotlin Multiplatform (KMP)
  • Jetpack Compose Multiplatform
  • Koin (Dependency Injection)
  • Firebase (Auth, Firestore, Storage, Push Notification)
  • Ktor (HTTP Client & Stripe API Integration)
  • Stripe SDK (Android: PaymentSheet, iOS: Simulated Payment Flow)

UI & Analytics

  • Material3 (Modern UI components)
  • Custom Canvas Charts (Analytics visualizations)
  • Coil (Image Loading)
  • Navigation Compose
  • MessageBar KMP
  • Animated Components (Enhanced user experience)

Data & Storage

  • Coroutines & Flow
  • Multiplatform Settings
  • Firebase Firestore (with comprehensive security rules)
  • Real-time Data Synchronization

๐Ÿ“ฑ Screenshots

Android

| | | | | | | | | Screenshot_20250809_183018 | Screenshot_20250809_183028 | Screenshot_20250809_183035 | Screenshot_20250809_182947 | Screenshot_20250809_182955 | Screenshot_20250809_183000 | Screenshot_20260104_030838 | Screenshot_20260103_201954 | Screenshot_20260103_201944 | Screenshot_20260118_172443 | Screenshot_20260117_183037 | Screenshot_20260107_195052 | Screenshot_20260107_194446 | Screenshot_20260131_195059 | Screenshot_20260131_174534 | Screenshot_20260131_174413 | Screenshot_20260131_174405

IOS

Simulator Screenshot - iPhone 16 Pro - 2025-08-09 at 18 33 32 | Simulator Screenshot - iPhone 16 Pro - 2025-08-09 at 18 34 57 | Simulator Screenshot - iPhone 16 Pro - 2025-08-09 at 18 34 33 | Simulator Screenshot - iPhone 16 Pro - 2025-08-09 at 18 34 24 | Simulator Screenshot - iPhone 16 Pro - 2025-08-09 at 18 34 20 | Simulator Screenshot - iPhone 16 Pro - 2025-08-09 at 18 34 16 | Simulator Screenshot - iPhone 16 Pro - 2025-08-09 at 18 34 10 | Simulator Screenshot - iPhone 16 Pro - 2025-08-09 at 18 34 05 | Simulator Screenshot - iPhone 16 Pro - 2025-08-09 at 18 33 56 | Simulator Screenshot - iPhone 16 Pro - 2025-08-09 at 18 33 50 | Simulator Screenshot - iPhone 16 Pro - 2025-08-09 at 18 33 48 | Simulator Screenshot - iPhone 16 Pro - 2025-08-09 at 18 33 45 | Simulator Screenshot - iPhone 16 Pro - 2025-08-09 at 18 33 35 | Simulator Screenshot - iPhone 16 Pro - 2025-08-09 at 18 33 21 | Simulator Screenshot - iPhone 16 Pro - 2026-01-04 at 03 13 15 | Simulator Screenshot - iPhone 16 Pro - 2026-01-03 at 20 35 24 | Simulator Screenshot - iPhone 16 Pro - 2026-01-03 at 20 35 16 | Simulator Screenshot - iPhone 16 Pro - 2026-01-18 at 17 27 58 | Simulator Screenshot - iPhone 16 Pro - 2026-01-07 at 19 54 29 | Simulator Screenshot - iPhone 16 Pro - 2026-01-07 at 19 53 51 | Simulator Screenshot - iPhone 16 Pro - 2026-01-07 at 19 53 46 | Simulator Screenshot - iPhone 16 Pro - 2026-01-31 at 19 57 07 | Simulator Screenshot - iPhone 16 Pro - 2026-01-31 at 19 57 00 | Simulator Screenshot - iPhone 16 Pro - 2026-01-31 at 19 56 54

๐ŸŽ‰ Recent Updates

๐Ÿงช Unit Testing Infrastructure (Latest)

  • Comprehensive Test Suite - 50+ unit tests across domain, repository, and ViewModel layers
  • Testing Libraries - kotlin-test, kotlinx-coroutines-test, Turbine
  • Domain Tests - RequestState, Product, Customer, CartItem, PaginatedResult
  • Fake Repositories - FakeFavoritesRepository, FakeProductRepository for isolated testing
  • ViewModel Tests - FavoritesViewModel with StateFlow and callback verification
  • Run Tests - ./gradlew :shared:testDebugUnitTest :data:testDebugUnitTest

๐ŸŽฎ Gamification System

  • Leaderboard - View top shoppers and compete with other customers
  • User Rankings - Track your position among all users
  • Spin Wheel - Daily spin for amazing prizes and discounts
  • Prize Rewards - Earn coupons, discounts, and special offers
  • Animated UI - Smooth animations and engaging user experience
  • Real-time Updates - Live leaderboard data from Firestore

โšก Code Splitting & Performance (Latest)

  • Module-based Lazy Loading - Feature modules load on-demand for faster startup
  • ModuleLoader Utility - Centralized module loading with ModuleType enum
  • Lazy Module Types - Admin, Secondary, and Gamification modules
  • Navigation Integration - Automatic module loading before screen navigation
  • Startup Optimization - Only core and auth modules loaded at app start

๐Ÿš€ Lazy Loading & Image Caching

  • Cursor-based Pagination - Firestore startAfter() and limit() for efficient data fetching
  • PaginatedResult - Generic data class with items, lastDocumentId, hasNextPage
  • PaginationState - UI state management (Idle, Loading, LoadingMore, EndReached, Error)
  • Infinite Scroll - LazyColumn scroll detection with automatic page fetching
  • CachedAsyncImage - Reusable composable with shimmer placeholder and error handling
  • Platform-specific ImageLoader - Android/iOS image loader with expect/actual pattern
  • Memory Cache - 25% of available memory for optimal performance
  • Disk Cache - 100MB in app cache directory for offline access
  • Applied to - CategorySearchScreen, ProductCard, HomeProductCard

๐ŸŽ Coupon and Discount Code System

  • Coupon Code Input - Apply coupons at checkout
  • Multiple Coupon Types - Percentage, Fixed Amount, Free Shipping
  • Real-time Validation - Expiration, usage limit, minimum order checks
  • Discount Display - Strikethrough original price, show savings
  • Order Integration - Coupon tracked in order with discount details
  • Usage Tracking - Automatic usage count increment on order
  • Firestore Collection - coupons collection for coupon management

๐Ÿ‘ค Profile Enhancements (Latest)

  • Settings Screen - Centralized settings with communication preferences
  • Communication Preferences - Email, push notification, SMS notification toggles
  • Password Change - Secure password update with current password verification
  • Two-Factor Authentication - Enable/disable 2FA for enhanced security
  • Account Deletion - Permanent account deletion with password confirmation
  • Birth Date - User birth date for personalized discounts
  • Profile Photo - Profile photo URL management
  • Drawer Navigation - Settings accessible from navigation drawer

โญ Product Review System

  • Star Ratings - Users can rate products with 1-5 stars
  • Written Reviews - Detailed review comments with 500 character limit
  • ๐Ÿ“ท Photo Upload - Attach photos to reviews (Firebase Storage)
  • ๐Ÿ‘๐Ÿ‘Ž Helpful Voting - Vote on review helpfulness with atomic counters
  • Real-time Updates - Average rating and count update instantly
  • Separate Review Page - Dedicated AddReviewScreen for writing reviews
  • Photo Gallery - ReviewPhotosGallery component for displaying review images
  • Vote Tracking - review_votes Firestore collection for vote management
  • User Restrictions - Cannot vote on own reviews, one vote per review

๐Ÿ› ๏ธ Admin Order Management & Order History

  • Admin Order Management - View and manage all customer orders
  • Order Status Updates - Progress orders through PENDING โ†’ CONFIRMED โ†’ PREPARING โ†’ SHIPPED โ†’ DELIVERED
  • Order Cancellation - Cancel orders (except delivered/cancelled)
  • Order Detail View - Comprehensive order details with status timeline
  • Customer Order History - Users can view their order history and track status
  • Real-time Updates - Live order status synchronization
  • Status Timeline - Visual order progress tracking
  • Modern UI - Consistent design with existing admin panel

๐Ÿ“Š Analytics Dashboard

  • Interactive Revenue Charts with custom Canvas drawing
  • Real-time Business Metrics (revenue, orders, average order value)
  • Enhanced Line Charts with grid lines, axes, and point connections
  • Top-selling Products Analysis with visual indicators
  • User Statistics Tracking with growth metrics
  • Date Range Filtering (Today, Last 7 Days, Last 30 Days)
  • Animated Components with staggered loading effects
  • Loading States with shimmer effects
  • Error Handling with retry mechanisms
  • Responsive Design for all screen sizes

๐Ÿ—บ๏ธ Location Management

  • User-friendly address management with add/edit functionality
  • Categorized locations: Home ๐Ÿ , Work ๐Ÿข, Other ๐Ÿ“
  • Integrated into custom drawer for easy access
  • Firebase Firestore storage with user-specific security rules

๐Ÿ’ณ Stripe Payment Integration

  • Multi-platform payment processing
  • Android: Real Stripe PaymentSheet for native payment experience
  • iOS: Realistic simulated payment flow with same UX
  • Dynamic API key management from shared constants
  • Complete order management with payment tracking
  • "Pay with Card" ๐Ÿ’ณ and "Pay on Delivery" ๐Ÿšš options

โค๏ธ Enhanced User Experience

  • Advanced review system - Star ratings, photos, and helpful voting
  • Favorites management with instant updates
  • Responsive design for all screen sizes
  • Bottom sheet experiences consistent across platforms

๐Ÿš€ Installation & Running

Requirements

  • JDK 17+
  • Android Studio Giraffe or newer
  • Xcode 14+ (for iOS)

Clone the Project

git clone https://github.com/kaaneneskpc/Supplr.git
cd Supplr

Run for Android

./gradlew :composeApp:installDebug

Run for iOS

  1. Open iosApp/iosApp.xcodeproj in Xcode.
  2. Configure as needed and run.

๐Ÿ” Security & Firebase Rules

Admin Panel Security

  • Role-based Authentication: Admin access controlled via email verification
  • Firestore Security Rules: Comprehensive rules for analytics, dashboard data, and admin logs
  • Data Isolation: User-specific data access with proper authorization
  • Audit Trail: Admin actions logged with timestamps and details

Supported Collections

  • analytics/ - Analytics data (admin-only read/write)
  • admin_dashboard/ - Dashboard configuration (admin-only)
  • user_stats/ - User statistics (admin-only read)
  • sales_analytics/ - Sales data (admin-only)
  • product_analytics/ - Product performance (admin-only)
  • admin_logs/ - Audit trail (admin-only read, create-only)

๐Ÿง‘โ€๐Ÿ’ป Contributing

Contributions are welcome! ๐ŸŽ‰ Fork, create a new branch, and submit your changes as a PR.

Contribution Steps

  1. Fork ๐Ÿด
  2. Create a new branch ๐Ÿš€ (git checkout -b feature-name)
  3. Commit your changes ๐ŸŽฏ (git commit -m 'Description')
  4. Push the branch ๐Ÿ“ค (git push origin feature-name)
  5. Open a Pull Request ๐Ÿ”ฅ

Areas for Contribution

  • Analytics Enhancements: New chart types, advanced metrics
  • UI/UX Improvements: Better animations, responsive design
  • Performance Optimizations: Chart rendering, data loading
  • Testing: Unit tests, UI tests for admin features
  • Documentation: Code documentation, user guides

๐Ÿ“ License

This project is open source and available under the MIT License.


๐Ÿ“š Resources & Inspiration


Note: For more details and architectural explanations, see the PRD document.


Contact

Kaan Enes Kapฤฑcฤฑ

๐Ÿ’ก Open to feedback and collaboration! If you're interested in modern mobile architecture, analytics dashboards, or multiplatform development, feel free to connect. ๐Ÿš€

About

Supplr is a modern, modular, and scalable e-commerce application targeting both Android and iOS platforms. Built with Kotlin Multiplatform (KMP) and Jetpack Compose Multiplatform, it allows users to browse products, add to cart, place orders, manage their profiles, and manage their favorite products.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors