# dinesh-sowndar/flutter_billing_app architecture

> Architecture diagram of the GitHub repository dinesh-sowndar/flutter_billing_app, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-04-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/dinesh-sowndar/flutter_billing_app
- Repository: https://github.com/dinesh-sowndar/flutter_billing_app

## Overview

1. **Overall shape**
   This is a Flutter mobile POS/billing app organized as a **feature-first Clean Architecture** codebase. The app is primarily offline and runs on-device across Android, iOS, and web targets, with the business logic centered in `lib/` and platform shell code in `android/`, `ios/`, and `web/`.

2. **Application bootstrap**
   `lib/main.dart` is the entry point and likely wires together the global app setup: dependency injection, local storage initialization, theme, and routing. The repository also has `lib/core/service_locator.dart`, which indicates `get_it` is used to register repositories, blocs, and shared services before the UI starts.

3. **Routing and top-level navigation**
   `lib/config/routes/app_routes.dart` is the central route map. The UI is split into page-level screens for product management, billing/checkout, shop settings, and printer settings, so the navigation boundary is probably route-driven rather than a single monolithic shell.

4. **Core shared layer**
   `lib/core/` contains app-wide concerns that are reused across features:
   - `data/hive_database.dart` for local persistence initialization
   - `error/failure.dart` for standardized failure handling
   - `usecase/usecase.dart` for domain use case contracts
   - `theme/app_theme.dart` for global styling
   - `utils/` for helpers such as validation and printer support
   - `widgets/` for reusable UI components like primary buttons and labeled inputs  
   This layer acts as the shared foundation for all feature modules.

5. **Offline data persistence**
   The main persistence mechanism is **Hive** (`hive` / `hive_flutter`), which supports the app’s offline-first operation. Generated adapters/models like `product_model.g.dart` and `shop_model.g.dart` show that entities are serialized locally and stored without a backend dependency. That makes local storage the authoritative source for inventory, shop info, and likely cart/billing state.

6. **Feature modules and bounded contexts**
   The repo is split into four main feature areas:
   - `billing` for cart, checkout, and receipt flow
   - `product` for inventory CRUD
   - `shop` for shop profile/details
   - `settings` for printer and device-related configuration  
   Each feature has its own `data`, `domain`, and `presentation` subfolders, which keeps dependencies flowing inward from UI to domain to data.

7. **Domain layer patterns**
   The domain folders define the core business entities and contracts:
   - `product.dart`, `shop.dart`, `cart_item.dart`
   - repository interfaces such as `product_repository.dart`, `shop_repository.dart`, `printer_repository.dart`
   - usecase collections like `product_usecases.dart` and `shop_usecases.dart`  
   This indicates the app isolates business rules from persistence and UI, with repositories as the boundary between domain logic and local/device-specific implementations.

8. **State management and presentation flow**
   Each feature has a BLoC in `presentation/bloc/` plus page widgets under `presentation/pages/`. The likely flow is: UI page dispatches an event → BLoC executes a use case/repository call → BLoC emits a new immutable state → page rebuilds. This pattern appears in `billing_bloc.dart`, `product_bloc.dart`, `shop_bloc.dart`, and `printer_bloc.dart`.

9. **Data layer responsibilities**
   Feature data folders contain model classes and repository implementations:
   - `product_repository_impl.dart`
   - `shop_repository_impl.dart`
   - `printer_repository_impl.dart`
   along with model classes like `product_model.dart` and `shop_model.dart`. This suggests the data layer adapts Hive or hardware APIs into repository contracts, keeping the domain layer free of storage and platform details.

10. **Hardware and device integrations**
    The app is not just a CRUD system; it integrates with device hardware:
    - `mobile_scanner` for barcode/QR scanning in the checkout and product workflows
    - `print_bluetooth_thermal` for thermal receipt printing
    - printer-specific helpers in `lib/core/utils/printer_helper.dart`  
    These integrations are important architectural boundaries because they sit outside pure app logic and likely feed into the `billing` and `settings` features.

11. **Primary user workflows**
    The main data flow is retail-oriented: product data is created/edited in the product feature, shop details are configured in shop settings, checkout uses scanned or manually entered items to build a cart, and printing produces a receipt using shop metadata plus cart totals. In other words, billing depends on product and shop data, while printer configuration influences the final output stage.

12. **Shared UI and validation**
    Reusable widgets such as `input_label.dart` and `primary_button.dart`, along with `app_validators.dart`, suggest the UI is built from shared form primitives rather than duplicated per screen. This reduces friction across product, shop, and settings forms and keeps validation rules consistent.

13. **Platform-specific shells**
    The Android and iOS directories are standard Flutter platform hosts. Android contains the Kotlin `MainActivity` and Gradle setup; iOS contains the Swift `AppDelegate`, Xcode project, Podfile, and launch assets. These do not define business architecture, but they are the platform boundaries where Flutter plugins for scanning, Bluetooth, and local storage are activated.

14. **Project intent for diagramming**
    If you draw the architecture, the highest-level boxes should be: **Flutter UI/Presentation**, **Feature-specific BLoC layer**, **Domain use cases and entities**, **Data/repository implementations**, and **Shared infrastructure** (Hive, DI, printer/scanner helpers). The key external dependencies are local device storage and hardware peripherals, not a remote API or server backend.

Main entry points: [`lib/features/billing/presentation/bloc/billing_bloc.dart`](https://github.com/dinesh-sowndar/flutter_billing_app/blob/main/lib/features/billing/presentation/bloc/billing_bloc.dart) (Billing BLoC), [`lib/config/routes/app_routes.dart`](https://github.com/dinesh-sowndar/flutter_billing_app/blob/main/lib/config/routes/app_routes.dart) (Routes), [`lib/core/service_locator.dart`](https://github.com/dinesh-sowndar/flutter_billing_app/blob/main/lib/core/service_locator.dart) (DI), [`lib/main.dart`](https://github.com/dinesh-sowndar/flutter_billing_app/blob/main/lib/main.dart) (main.dart)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App Shell"]
  node_main["main.dart<br/>entrypoint<br/>[main.dart]"]
  node_routes["Routes<br/>navigation<br/>[app_routes.dart]"]
end

subgraph group_core["Shared Core"]
  node_service_locator["DI<br/>service locator"]
  node_hive_db[("Hive DB<br/>local storage<br/>[hive_database.dart]")]
  node_theme["Theme<br/>[app_theme.dart]"]
  node_validators["Validators<br/>form utils"]
  node_printer_helper["Printer Helper<br/>device utils"]
end

subgraph group_billing["Billing"]
  node_billing_bloc["Billing BLoC<br/>state management<br/>[billing_bloc.dart]"]
  node_checkout_page["Checkout<br/>screen<br/>[checkout_page.dart]"]
  node_scanner_page["Scanner<br/>screen<br/>[scanner_page.dart]"]
  node_cart_item{{"Cart Item<br/>entity<br/>[cart_item.dart]"}}
end

subgraph group_product["Product"]
  node_product_bloc["Product BLoC<br/>state management<br/>[product_bloc.dart]"]
  node_product_list["Products<br/>screen"]
  node_product_uc["Product Usecases<br/>use cases"]
  node_product_repo["Product Repo"]
  node_product_repo_impl["Product Store<br/>data access"]
  node_product_model["Product Model<br/>local model<br/>[product_model.dart]"]
  node_product_entity{{"Product<br/>entity<br/>[product.dart]"}}
end

subgraph group_shop["Shop"]
  node_shop_bloc["Shop BLoC<br/>state management<br/>[shop_bloc.dart]"]
  node_shop_page["Shop Details<br/>screen"]
  node_shop_uc["Shop Usecases<br/>use cases<br/>[shop_usecases.dart]"]
  node_shop_repo["Shop Repo"]
  node_shop_repo_impl["Shop Store<br/>data access"]
  node_shop_model["Shop Model<br/>local model<br/>[shop_model.dart]"]
  node_shop_entity{{"Shop<br/>entity<br/>[shop.dart]"}}
end

subgraph group_settings["Settings"]
  node_printer_bloc["Printer BLoC<br/>state management<br/>[printer_bloc.dart]"]
  node_settings_page["Settings<br/>screen<br/>[settings_page.dart]"]
  node_printer_repo["Printer Repo"]
  node_printer_repo_impl["Printer Config<br/>data access"]
end

node_main -->|"initializes"| node_service_locator
node_main -->|"uses"| node_routes
node_main -->|"applies"| node_theme
node_service_locator -->|"registers"| node_hive_db
node_service_locator -->|"registers"| node_product_repo_impl
node_service_locator -->|"registers"| node_shop_repo_impl
node_service_locator -->|"registers"| node_printer_repo_impl
node_routes -->|"navigates to"| node_checkout_page
node_routes -->|"navigates to"| node_product_list
node_routes -->|"navigates to"| node_shop_page
node_routes -->|"navigates to"| node_settings_page
node_checkout_page -->|"drives"| node_billing_bloc
node_scanner_page -->|"feeds"| node_billing_bloc
node_billing_bloc -->|"manages"| node_cart_item
node_billing_bloc -->|"reads"| node_product_repo
node_billing_bloc -->|"reads"| node_shop_repo
node_billing_bloc -->|"prints via"| node_printer_helper
node_product_list -->|"drives"| node_product_bloc
node_product_bloc -->|"executes"| node_product_uc
node_product_uc -->|"depends on"| node_product_repo
node_product_repo_impl -->|"implements"| node_product_repo
node_product_repo_impl -->|"maps"| node_product_model
node_product_model -->|"stored in"| node_hive_db
node_product_uc -->|"operates on"| node_product_entity
node_shop_page -->|"drives"| node_shop_bloc
node_shop_bloc -->|"executes"| node_shop_uc
node_shop_uc -->|"depends on"| node_shop_repo
node_shop_repo_impl -->|"implements"| node_shop_repo
node_shop_repo_impl -->|"maps"| node_shop_model
node_shop_model -->|"stored in"| node_hive_db
node_shop_uc -->|"operates on"| node_shop_entity
node_settings_page -->|"drives"| node_printer_bloc
node_printer_bloc -->|"executes"| node_printer_repo
node_printer_repo_impl -->|"implements"| node_printer_repo
node_product_bloc -->|"uses"| node_validators
node_shop_bloc -->|"uses"| node_validators

click node_main "https://github.com/dinesh-sowndar/flutter_billing_app/blob/main/lib/main.dart"
click node_routes "https://github.com/dinesh-sowndar/flutter_billing_app/blob/main/lib/config/routes/app_routes.dart"
click node_service_locator "https://github.com/dinesh-sowndar/flutter_billing_app/blob/main/lib/core/service_locator.dart"
click node_hive_db "https://github.com/dinesh-sowndar/flutter_billing_app/blob/main/lib/core/data/hive_database.dart"
click node_theme "https://github.com/dinesh-sowndar/flutter_billing_app/blob/main/lib/core/theme/app_theme.dart"
click node_validators "https://github.com/dinesh-sowndar/flutter_billing_app/blob/main/lib/core/utils/app_validators.dart"
click node_printer_helper "https://github.com/dinesh-sowndar/flutter_billing_app/blob/main/lib/core/utils/printer_helper.dart"
click node_billing_bloc "https://github.com/dinesh-sowndar/flutter_billing_app/blob/main/lib/features/billing/presentation/bloc/billing_bloc.dart"
click node_checkout_page "https://github.com/dinesh-sowndar/flutter_billing_app/blob/main/lib/features/billing/presentation/pages/checkout_page.dart"
click node_scanner_page "https://github.com/dinesh-sowndar/flutter_billing_app/blob/main/lib/features/billing/presentation/pages/scanner_page.dart"
click node_cart_item "https://github.com/dinesh-sowndar/flutter_billing_app/blob/main/lib/features/billing/domain/entities/cart_item.dart"
click node_product_bloc "https://github.com/dinesh-sowndar/flutter_billing_app/blob/main/lib/features/product/presentation/bloc/product_bloc.dart"
click node_product_list "https://github.com/dinesh-sowndar/flutter_billing_app/blob/main/lib/features/product/presentation/pages/product_list_page.dart"
click node_product_uc "https://github.com/dinesh-sowndar/flutter_billing_app/blob/main/lib/features/product/domain/usecases/product_usecases.dart"
click node_product_repo "https://github.com/dinesh-sowndar/flutter_billing_app/blob/main/lib/features/product/domain/repositories/product_repository.dart"
click node_product_repo_impl "https://github.com/dinesh-sowndar/flutter_billing_app/blob/main/lib/features/product/data/repositories/product_repository_impl.dart"
click node_product_model "https://github.com/dinesh-sowndar/flutter_billing_app/blob/main/lib/features/product/data/models/product_model.dart"
click node_product_entity "https://github.com/dinesh-sowndar/flutter_billing_app/blob/main/lib/features/product/domain/entities/product.dart"
click node_shop_bloc "https://github.com/dinesh-sowndar/flutter_billing_app/blob/main/lib/features/shop/presentation/bloc/shop_bloc.dart"
click node_shop_page "https://github.com/dinesh-sowndar/flutter_billing_app/blob/main/lib/features/shop/presentation/pages/shop_details_page.dart"
click node_shop_uc "https://github.com/dinesh-sowndar/flutter_billing_app/blob/main/lib/features/shop/domain/usecases/shop_usecases.dart"
click node_shop_repo "https://github.com/dinesh-sowndar/flutter_billing_app/blob/main/lib/features/shop/domain/repositories/shop_repository.dart"
click node_shop_repo_impl "https://github.com/dinesh-sowndar/flutter_billing_app/blob/main/lib/features/shop/data/repositories/shop_repository_impl.dart"
click node_shop_model "https://github.com/dinesh-sowndar/flutter_billing_app/blob/main/lib/features/shop/data/models/shop_model.dart"
click node_shop_entity "https://github.com/dinesh-sowndar/flutter_billing_app/blob/main/lib/features/shop/domain/entities/shop.dart"
click node_printer_bloc "https://github.com/dinesh-sowndar/flutter_billing_app/blob/main/lib/features/settings/presentation/bloc/printer_bloc.dart"
click node_settings_page "https://github.com/dinesh-sowndar/flutter_billing_app/blob/main/lib/features/settings/presentation/pages/settings_page.dart"
click node_printer_repo "https://github.com/dinesh-sowndar/flutter_billing_app/blob/main/lib/features/settings/domain/repositories/printer_repository.dart"
click node_printer_repo_impl "https://github.com/dinesh-sowndar/flutter_billing_app/blob/main/lib/features/settings/data/repositories/printer_repository_impl.dart"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_main,node_routes toneBlue
class node_service_locator,node_hive_db,node_theme,node_validators,node_printer_helper toneAmber
class node_billing_bloc,node_checkout_page,node_scanner_page,node_cart_item toneMint
class node_product_bloc,node_product_list,node_product_uc,node_product_repo,node_product_repo_impl,node_product_model,node_product_entity toneRose
class node_shop_bloc,node_shop_page,node_shop_uc,node_shop_repo,node_shop_repo_impl,node_shop_model,node_shop_entity toneIndigo
class node_printer_bloc,node_settings_page,node_printer_repo,node_printer_repo_impl toneTeal
```

## Components

### App Shell

Flutter entrypoint, navigation, and platform hosts

- [main.dart](https://github.com/dinesh-sowndar/flutter_billing_app/blob/main/lib/main.dart): entrypoint · App bootstrap and root setup · `lib/main.dart`
- [Routes](https://github.com/dinesh-sowndar/flutter_billing_app/blob/main/lib/config/routes/app_routes.dart): navigation · Central route map · `lib/config/routes/app_routes.dart`

### Shared Core

Reusable infrastructure and app-wide utilities

- [DI](https://github.com/dinesh-sowndar/flutter_billing_app/blob/main/lib/core/service_locator.dart): service locator · Registers repositories, blocs, and shared services · `lib/core/service_locator.dart`
- [Hive DB](https://github.com/dinesh-sowndar/flutter_billing_app/blob/main/lib/core/data/hive_database.dart): local storage · Hive initialization and persistence setup · `lib/core/data/hive_database.dart`
- [Theme](https://github.com/dinesh-sowndar/flutter_billing_app/blob/main/lib/core/theme/app_theme.dart): ui theme · Global app styling · `lib/core/theme/app_theme.dart`
- [Validators](https://github.com/dinesh-sowndar/flutter_billing_app/blob/main/lib/core/utils/app_validators.dart): form utils · Shared input validation helpers · `lib/core/utils/app_validators.dart`
- [Printer Helper](https://github.com/dinesh-sowndar/flutter_billing_app/blob/main/lib/core/utils/printer_helper.dart): device utils · Shared thermal printer support · `lib/core/utils/printer_helper.dart`

### Billing

Checkout and receipt flow

- [Billing BLoC](https://github.com/dinesh-sowndar/flutter_billing_app/blob/main/lib/features/billing/presentation/bloc/billing_bloc.dart): state management · Checkout and scan state orchestration · `lib/features/billing/presentation/bloc/billing_bloc.dart`
- [Checkout](https://github.com/dinesh-sowndar/flutter_billing_app/blob/main/lib/features/billing/presentation/pages/checkout_page.dart): screen · Cart and payment UI · `lib/features/billing/presentation/pages/checkout_page.dart`
- [Scanner](https://github.com/dinesh-sowndar/flutter_billing_app/blob/main/lib/features/billing/presentation/pages/scanner_page.dart): screen · Barcode/QR scanning UI · `lib/features/billing/presentation/pages/scanner_page.dart`
- [Cart Item](https://github.com/dinesh-sowndar/flutter_billing_app/blob/main/lib/features/billing/domain/entities/cart_item.dart): entity · Billing cart domain model · `lib/features/billing/domain/entities/cart_item.dart`

### Product

Inventory management feature

- [Product BLoC](https://github.com/dinesh-sowndar/flutter_billing_app/blob/main/lib/features/product/presentation/bloc/product_bloc.dart): state management · Inventory state orchestration · `lib/features/product/presentation/bloc/product_bloc.dart`
- [Products](https://github.com/dinesh-sowndar/flutter_billing_app/blob/main/lib/features/product/presentation/pages/product_list_page.dart): screen · Inventory list and management UI · `lib/features/product/presentation/pages/product_list_page.dart`
- [Product Usecases](https://github.com/dinesh-sowndar/flutter_billing_app/blob/main/lib/features/product/domain/usecases/product_usecases.dart): use cases · Product business operations · `lib/features/product/domain/usecases/product_usecases.dart`
- [Product Repo](https://github.com/dinesh-sowndar/flutter_billing_app/blob/main/lib/features/product/domain/repositories/product_repository.dart): repository · Product persistence contract · `lib/features/product/domain/repositories/product_repository.dart`
- [Product Store](https://github.com/dinesh-sowndar/flutter_billing_app/blob/main/lib/features/product/data/repositories/product_repository_impl.dart): data access · Product repository implementation over local storage · `lib/features/product/data/repositories/product_repository_impl.dart`
- [Product Model](https://github.com/dinesh-sowndar/flutter_billing_app/blob/main/lib/features/product/data/models/product_model.dart): local model · Hive-backed product serialization · `lib/features/product/data/models/product_model.dart`
- [Product](https://github.com/dinesh-sowndar/flutter_billing_app/blob/main/lib/features/product/domain/entities/product.dart): entity · Inventory domain entity · `lib/features/product/domain/entities/product.dart`

### Shop

Shop profile feature

- [Shop BLoC](https://github.com/dinesh-sowndar/flutter_billing_app/blob/main/lib/features/shop/presentation/bloc/shop_bloc.dart): state management · Shop settings orchestration · `lib/features/shop/presentation/bloc/shop_bloc.dart`
- [Shop Details](https://github.com/dinesh-sowndar/flutter_billing_app/blob/main/lib/features/shop/presentation/pages/shop_details_page.dart): screen · Shop profile and metadata UI · `lib/features/shop/presentation/pages/shop_details_page.dart`
- [Shop Usecases](https://github.com/dinesh-sowndar/flutter_billing_app/blob/main/lib/features/shop/domain/usecases/shop_usecases.dart): use cases · Shop business operations · `lib/features/shop/domain/usecases/shop_usecases.dart`
- [Shop Repo](https://github.com/dinesh-sowndar/flutter_billing_app/blob/main/lib/features/shop/domain/repositories/shop_repository.dart): repository · Shop persistence contract · `lib/features/shop/domain/repositories/shop_repository.dart`
- [Shop Store](https://github.com/dinesh-sowndar/flutter_billing_app/blob/main/lib/features/shop/data/repositories/shop_repository_impl.dart): data access · Shop repository implementation over local storage · `lib/features/shop/data/repositories/shop_repository_impl.dart`
- [Shop Model](https://github.com/dinesh-sowndar/flutter_billing_app/blob/main/lib/features/shop/data/models/shop_model.dart): local model · Hive-backed shop serialization · `lib/features/shop/data/models/shop_model.dart`
- [Shop](https://github.com/dinesh-sowndar/flutter_billing_app/blob/main/lib/features/shop/domain/entities/shop.dart): entity · Shop domain entity · `lib/features/shop/domain/entities/shop.dart`

### Settings

Printer and device settings

- [Printer BLoC](https://github.com/dinesh-sowndar/flutter_billing_app/blob/main/lib/features/settings/presentation/bloc/printer_bloc.dart): state management · Printer configuration orchestration · `lib/features/settings/presentation/bloc/printer_bloc.dart`
- [Settings](https://github.com/dinesh-sowndar/flutter_billing_app/blob/main/lib/features/settings/presentation/pages/settings_page.dart): screen · Printer and device settings UI · `lib/features/settings/presentation/pages/settings_page.dart`
- [Printer Repo](https://github.com/dinesh-sowndar/flutter_billing_app/blob/main/lib/features/settings/domain/repositories/printer_repository.dart): repository · Printer configuration contract · `lib/features/settings/domain/repositories/printer_repository.dart`
- [Printer Config](https://github.com/dinesh-sowndar/flutter_billing_app/blob/main/lib/features/settings/data/repositories/printer_repository_impl.dart): data access · Printer repository implementation · `lib/features/settings/data/repositories/printer_repository_impl.dart`

## Connections

- main.dart → DI: initializes · Bootstraps dependency registration before the app starts
- main.dart → Routes: uses · Starts the route-driven UI shell
- main.dart → Theme: applies · Sets global visual theme
- DI → Hive DB: registers · Wires local persistence services
- DI → Product Store: registers · Provides product data implementation
- DI → Shop Store: registers · Provides shop data implementation
- DI → Printer Config: registers · Provides printer configuration implementation
- Routes → Checkout: navigates to · Checkout screen route
- Routes → Products: navigates to · Inventory screens route
- Routes → Shop Details: navigates to · Shop details route
- Routes → Settings: navigates to · Settings route
- Checkout → Billing BLoC: drives · Dispatches checkout and scan events
- Scanner → Billing BLoC: feeds · Scanner input updates billing state
- Billing BLoC → Cart Item: manages · Operates on cart domain items
- Billing BLoC → Product Repo: reads · Looks up product data for cart and scan flows
- Billing BLoC → Shop Repo: reads · Uses shop metadata for checkout context
- Billing BLoC → Printer Helper: prints via · Sends receipt output to thermal printer support
- Products → Product BLoC: drives · Dispatches inventory events
- Product BLoC → Product Usecases: executes · Uses product business operations
- Product Usecases → Product Repo: depends on · Depends on repository boundary
- Product Store → Product Repo: implements · Adapts storage to repository contract
- Product Store → Product Model: maps · Persists product data as local model
- Product Model → Hive DB: stored in · Hive-backed serialization
- Product Usecases → Product: operates on · Business rules around product entity
- Shop Details → Shop BLoC: drives · Dispatches shop events
- Shop BLoC → Shop Usecases: executes · Uses shop business operations
- Shop Usecases → Shop Repo: depends on · Depends on repository boundary
- Shop Store → Shop Repo: implements · Adapts storage to repository contract
- Shop Store → Shop Model: maps · Persists shop data as local model
- Shop Model → Hive DB: stored in · Hive-backed serialization
- Shop Usecases → Shop: operates on · Business rules around shop entity
- Settings → Printer BLoC: drives · Dispatches printer settings events
- Printer BLoC → Printer Repo: executes · Uses printer configuration contract
- Printer Config → Printer Repo: implements · Adapts device configuration to repository contract
- Product BLoC → Validators: uses · Shares form validation logic
- Shop BLoC → Validators: uses · Shares form validation logic
