How duongwthuj/e-commerce-app works
Main Components
• Frontend (Presentation Layer): Represented by the Flutter UI code in the lib folder.
• Primary entry point (lib/main.dart) and navigation components (lib/navigation_menu.dart).
• Break out feature-specific screens found in lib/features (e.g., authentication, shop). Within authentication, show separate screens for login, signup, onboarding, and password configuration.
• Business Logic / Controllers:
• Controllers (for example, the onboarding_controller.dart in lib/features/authentication/controllers_onboarding) and any state management that may be used to mediate between the UI and the services.
• Data Layer:
• Services and repositories in lib/data which manage data retrieval and local storage (lib/utlis/local_storage, lib/data/services, and lib/data/respositories). This layer interacts with external sources or APIs.
• Utilities and Themes:
• Common utilities (helpers, device utilities, logging, validators) that support the whole application.
• Native/Platform-Specific Layers:
• Platform modules (android, ios, macos, windows, linux, web) which serve as entry points and integrations for native functionalities. These typically house the native project configurations (AndroidManifest, Info.plist, Build files) which are wrapped by Flutter’s engine.
Relationships and Interactions
• From UI (screens/widgets) to business logic (controllers/state managers) when handling user actions.
• From business logic to data services/repositories for data retrieval and synchronization.
• From the data layer back to the UI as the state is updated.
• Native integration layer which bridges the Flutter engine to platform-specific functionality (for example, the Android and iOS project components).
Architectural Patterns & Design Principles
• Separation-of-concerns:
• UI components and screens are separated from controllers and business logic.
• Data management is handled in independent service classes and repositories.
• Modular Design:
• Different features (authentication, shop, etc.) are organized in separate directories, making the system easily extendable.
• Reusability:
• Common widgets and utilities are abstracted in the lib/common and lib/utlis directories.
• Additionally, any available Flutter state management approach (like Provider, Bloc, or GetX) can be annotated if used, although it is not explicitly detailed in this file tree.
Relevant Technologies & Frameworks
• Flutter Framework for UI.
• Dart language for application logic.
• Platform-specific component integration through native projects (Android, iOS, etc.).
• CMake is used for building desktop components (in directories like linux, windows, macos).