Skip to content

About

Online grocery shopping mobile application with state management & seamless checkout.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Grocery Go - Smart E-Commerce Mobile App 🛒

Flutter Dart BLoC License: MIT Clean Architecture

Grocery Go is an enterprise-grade mobile e-commerce application built with Flutter, designed around Domain-Driven Design (DDD) and Clean Architecture. Featuring robust state management with BLoC, dependency injection via Injectable/GetIt, multi-flavor build setups, and multi-language support (English & Vietnamese).


🌟 Key Features

  • 🛍️ Catalog & Smart Search: Real-time product filtering, category browsing, and price discovery.
  • 🛒 Cart & Order Management: Reactive shopping cart calculations, quantity adjustment, and item caching.
  • ❤️ Favorites & Watchlists: Fast bookmarking of essential items with instant local and remote synchronization.
  • 👤 Authentication & Security: Secure token storage with flutter_secure_storage, refresh token flows, and role management.
  • 🌍 Internationalization (i18n): Native bilingual support (English & Vietnamese) powered by .arb localization files.
  • 🎯 Multi-Flavor Architecture: Independent build environments for Development, Staging, and Production.

🏛 Clean Architecture & Layered Design

lib/
├── core/                # Core utilities, environment configs, logging & design tokens
│   ├── env/             # Flavors configuration (Dev, Staging, Prod)
│   ├── logging/         # Centralized application logging & crash diagnostics
│   └── extensions/      # BuildContext & type extensions
├── data/                # Data Layer: Data sources, models, DTOs & repositories impl
│   ├── datasources/     # Local (SecureStorage) & Remote (REST API via Dio)
│   ├── models/          # Request schemas, parameter DTOs, response mappings
│   ├── mappers/         # Clean domain entity <-> DTO mappers
│   └── repositories/    # Concrete repository implementations
├── di/                  # Dependency Injection setup (Injectable & GetIt)
├── domain/              # Domain Layer: Pure business logic & entities
│   ├── entities/        # Immutable domain models (Cart, Product, Category, User)
│   ├── repository/      # Repository interface contracts
│   └── usecase/         # Discrete business use cases (Single Responsibility)
├── l10n/                # Localization resources (English & Vietnamese .arb)
└── presentation/        # Presentation Layer: UI & Reactive State
    ├── bloc/            # Feature BLoCs (Cart, Account, Shop, ProductDetail, etc.)
    ├── routes/          # Declarative AppRouter navigation
    ├── screens/         # Feature UI views & pages
    └── theme/           # Color schemes, typography & reusable UI components

🛠 Tech Stack

Component Technology
Framework Flutter & Dart
Architecture Clean Architecture, Domain-Driven Design (DDD)
State Management flutter_bloc
Dependency Injection get_it & injectable
Networking dio with custom interceptors & error mappers
Storage flutter_secure_storage
Localization Flutter gen-l10n (app_en.arb, app_vi.arb)

🚀 Getting Started

Prerequisites

  • Flutter SDK (>= 3.0.0)
  • Dart SDK
  • Android SDK / Xcode

Installation

  1. Clone the repo:

    git clone https://github.com/minKasent/grocery_go.git
    cd grocery_go
  2. Install packages:

    flutter pub get
  3. Run code generation (Injectable & Serialization):

    dart run build_runner build --delete-conflicting-outputs
  4. Launch by Environment Flavor:

    # Development
    flutter run -t lib/main_dev.dart
    
    # Staging
    flutter run -t lib/main_staging.dart
    
    # Production
    flutter run -t lib/main_prod.dart

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Online grocery shopping mobile application with state management & seamless checkout.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages