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).
- 🛍️ 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
.arblocalization files. - 🎯 Multi-Flavor Architecture: Independent build environments for Development, Staging, and Production.
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
| 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) |
- Flutter SDK (>= 3.0.0)
- Dart SDK
- Android SDK / Xcode
-
Clone the repo:
git clone https://github.com/minKasent/grocery_go.git cd grocery_go -
Install packages:
flutter pub get
-
Run code generation (Injectable & Serialization):
dart run build_runner build --delete-conflicting-outputs
-
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
This project is licensed under the MIT License - see the LICENSE file for details.