Skip to content

souravk29/MetaCart

Repository files navigation

MetaCart

An Android e-commerce app built with Kotlin and Jetpack Compose. MetaCart showcases a modern Android stack with Firebase Authentication, Room persistence, Hilt dependency injection, and a clean navigation architecture.


✨ Features

  • Home screen (HomeScreen)
  • Category listing (CategoryScreen)
  • Product listing by category (ProductScreen)
  • Product details view (ProductDetailsScreen with productId argument)
  • Cart screen (CartScreen)
  • Authentication
    • Login (LoginScreen)
    • Sign up (SignupScreen)
    • Sign out (via ProfileScreen and AuthViewModel)
  • Profile screen (ProfileScreen)
  • Type-safe navigation routes via a sealed Screens class
  • Image loading with Coil
  • Local persistence with Room
  • Dependency Injection with Hilt
  • Firebase services integration (Auth, Firestore)
  • Coroutines for async operations
  • Material 3 UI theme (Theme.MetaCart)

🧱 Tech Stack

  • Language: Kotlin (100%)
  • UI: Jetpack Compose, Material 3, Material Icons Extended
  • Navigation: Navigation Compose
  • DI: Hilt (@AndroidEntryPoint, androidx.hilt:hilt-navigation-compose)
  • Data:
    • Firebase Auth (com.google.firebase:firebase-auth)
    • Firebase Firestore (com.google.firebase:firebase-firestore)
    • Room (room-runtime, room-compiler via KSP)
  • Async: Kotlin Coroutines
  • Images: Coil (Compose + OkHttp network)
  • Build: Gradle Kotlin DSL, Google Services plugin
  • Min SDK: 24
  • Target SDK: 36

🗺️ Navigation Map

Start destination: Home

  • Screens.Home → Home screen
  • Screens.Cart → Cart screen
  • Screens.Profile → Profile screen (supports Sign Out)
  • Screens.CategoryList → Category listing
  • Screens.ProductList/{categoryId} → Product listing for a category (expects categoryId)
  • Screens.ProductDetails/{productId} → Product details (expects productId)
  • Screens.Login → Login screen
  • Screens.SignUp → Sign up screen

Navigation is managed via NavHost and rememberNavController, observing AuthViewModel.isLoggedIn for conditional flows to Profile/Login.


📦 Project Structure

  • app/src/main/java/com/example/metacart/
    • MainActivity.kt — App entry with NavHost, Hilt, and navigation graph
    • di/ — Dependency-injection setup (Application class MyApp)
    • model/ — Data models
    • repositories/ — Data repositories (Firebase/Room usage)
    • room/ — Room database-related classes
    • screens/ — Compose UI screens (Home, Categories, Products, Details, Cart, Profile, Login, Signup)
    • ui/ — Theme and UI utilities
    • viewmodels/ — ViewModels including AuthViewModel
  • app/src/main/AndroidManifest.xml — Declares permissions, theme, MyApp, and exported MainActivity

🔐 Permissions

  • android.permission.INTERNET
  • android.permission.ACCESS_NETWORK_STATE

⚙️ Build & Configuration

  • Namespace: com.example.metacart
  • Application ID: com.example.metacart
  • Compose: enabled via buildFeatures.compose = true
  • Google Services:
    • Plugin: com.google.gms.google-services
    • Config: app/google-services.json

🚀 Getting Started

  1. Open the project in Android Studio (latest stable).
  2. Ensure google-services.json exists in app/ (already present).
  3. Sync Gradle and build the project.
  4. Run the app on an emulator or device (API 24+).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages