# arif683/hardware_new architecture

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

- Interactive diagram: https://gitdiagram.com/arif683/hardware_new
- Repository: https://github.com/arif683/hardware_new

## Overview

Stock Manager is an Android inventory and retail-operations app. Its apparent user workflow spans authentication, item and stock management, billing and quotations, and financial records; supporting capabilities include GST tools, supplier comparison, unit conversion, NFC shelf/bin handling, and cloud-related services. The tree identifies these responsibilities, but no runtime source or README was provided, so component connections are shown only as unverified dashed links rather than asserted call paths.

Main entry points: [`app/src/main/java/com/example/ui/screens/HomeScreen.kt`](https://github.com/arif683/hardware_new/blob/main/app/src/main/java/com/example/ui/screens/HomeScreen.kt) (Home dashboard), [`app/src/main/java/com/example/data/repository/StockRepository.kt`](https://github.com/arif683/hardware_new/blob/main/app/src/main/java/com/example/data/repository/StockRepository.kt) (Stock repository), [`app/src/main/java/com/example/ui/screens/BillingHubScreen.kt`](https://github.com/arif683/hardware_new/blob/main/app/src/main/java/com/example/ui/screens/BillingHubScreen.kt) (Billing hub), [`app/src/main/java/com/example/ui/screens/ItemsScreen.kt`](https://github.com/arif683/hardware_new/blob/main/app/src/main/java/com/example/ui/screens/ItemsScreen.kt) (Item catalog)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app_flow["App and access"]
  node_main["App entry<br/>[MainActivity.kt]"]
  node_auth["Authentication gate<br/>[AuthGateScreen.kt]"]
  node_auth_manager["Auth manager<br/>[AuthManager.kt]"]
  node_home["Home dashboard<br/>[HomeScreen.kt]"]
end

subgraph group_inventory["Inventory operations"]
  node_items["Item catalog<br/>[ItemsScreen.kt]"]
  node_item_detail["Item details"]
  node_stock["Stock repository<br/>[StockRepository.kt]"]
  node_stock_vm["Stock view model<br/>[StockViewModel.kt]"]
  node_stock_tx["Stock transactions"]
  node_nfc["NFC shelf bins"]
  node_nfc_manager["NFC shelf manager<br/>[NfcShelfManager.kt]"]
end

subgraph group_commerce["Sales and finance"]
  node_billing["Billing hub"]
  node_quick_pos["Quick POS"]
  node_bill["Bill screen<br/>[BillScreen.kt]"]
  node_quotation["Quotations<br/>[QuotationScreen.kt]"]
  node_ledger["Ledger<br/>[LedgerScreen.kt]"]
  node_transactions["Transactions"]
  node_gst["GST tools"]
  node_supplier_compare["Supplier comparison"]
end

subgraph group_support["Integrations and tools"]
  node_database[("Local database<br/>[AppDatabase.kt]")]
  node_daos["Data access objects<br/>[Daos.kt]"]
  node_supabase["Supabase client<br/>[SupabaseClient.kt]"]
  node_sync_queue["Sync queue records<br/>[SyncQueueItem.kt]"]
  node_dynamic_ui["Dynamic UI config"]
  node_scanner["Bill scanner"]
  node_unit_convert["Unit converter"]
  node_price_records["Supplier purchase records"]
end

node_user(("App user"))

node_user -.->|"opens"| node_main
node_main -.->|"routes to"| node_auth
node_auth -.->|"authenticates with"| node_auth_manager
node_main -.->|"shows"| node_home
node_home -.->|"opens"| node_items
node_items -.->|"uses"| node_stock_vm
node_stock_vm -.->|"delegates to"| node_stock
node_stock -.->|"accesses"| node_daos
node_daos -.->|"reads and writes"| node_database
node_items -.->|"opens"| node_item_detail
node_stock -.->|"supports"| node_stock_tx
node_home -.->|"opens"| node_billing
node_billing -.->|"offers"| node_quick_pos
node_billing -.->|"opens"| node_bill
node_billing -.->|"offers"| node_quotation
node_home -.->|"opens"| node_ledger
node_home -.->|"opens"| node_transactions
node_billing -.->|"offers"| node_gst
node_home -.->|"opens"| node_supplier_compare
node_home -.->|"opens"| node_nfc
node_nfc -.->|"uses"| node_nfc_manager
node_stock -.->|"may sync through"| node_supabase
node_stock -.->|"may queue"| node_sync_queue
node_home -.->|"may configure"| node_dynamic_ui
node_bill -.->|"may scan with"| node_scanner
node_items -.->|"may use"| node_unit_convert
node_supplier_compare -.->|"may use"| node_price_records

click node_main "https://github.com/arif683/hardware_new/blob/main/app/src/main/java/com/example/MainActivity.kt"
click node_auth "https://github.com/arif683/hardware_new/blob/main/app/src/main/java/com/example/ui/screens/AuthGateScreen.kt"
click node_auth_manager "https://github.com/arif683/hardware_new/blob/main/app/src/main/java/com/example/data/auth/AuthManager.kt"
click node_home "https://github.com/arif683/hardware_new/blob/main/app/src/main/java/com/example/ui/screens/HomeScreen.kt"
click node_items "https://github.com/arif683/hardware_new/blob/main/app/src/main/java/com/example/ui/screens/ItemsScreen.kt"
click node_item_detail "https://github.com/arif683/hardware_new/blob/main/app/src/main/java/com/example/ui/screens/ItemDetailScreen.kt"
click node_stock "https://github.com/arif683/hardware_new/blob/main/app/src/main/java/com/example/data/repository/StockRepository.kt"
click node_stock_vm "https://github.com/arif683/hardware_new/blob/main/app/src/main/java/com/example/ui/StockViewModel.kt"
click node_stock_tx "https://github.com/arif683/hardware_new/blob/main/app/src/main/java/com/example/ui/screens/StockTransactionDialog.kt"
click node_nfc "https://github.com/arif683/hardware_new/blob/main/app/applet/app/src/main/java/com/example/ui/screens/NfcShelfBinScreen.kt"
click node_nfc_manager "https://github.com/arif683/hardware_new/blob/main/app/applet/app/src/main/java/com/example/util/NfcShelfManager.kt"
click node_billing "https://github.com/arif683/hardware_new/blob/main/app/src/main/java/com/example/ui/screens/BillingHubScreen.kt"
click node_quick_pos "https://github.com/arif683/hardware_new/blob/main/app/src/main/java/com/example/ui/screens/QuickBillingPosScreen.kt"
click node_bill "https://github.com/arif683/hardware_new/blob/main/app/src/main/java/com/example/ui/screens/BillScreen.kt"
click node_quotation "https://github.com/arif683/hardware_new/blob/main/app/src/main/java/com/example/ui/screens/QuotationScreen.kt"
click node_ledger "https://github.com/arif683/hardware_new/blob/main/app/src/main/java/com/example/ui/screens/LedgerScreen.kt"
click node_transactions "https://github.com/arif683/hardware_new/blob/main/app/src/main/java/com/example/ui/screens/TransactionsScreen.kt"
click node_gst "https://github.com/arif683/hardware_new/blob/main/app/src/main/java/com/example/ui/screens/GstCalculatorScreen.kt"
click node_supplier_compare "https://github.com/arif683/hardware_new/blob/main/app/applet/app/src/main/java/com/example/ui/screens/SupplierPriceComparisonScreen.kt"
click node_database "https://github.com/arif683/hardware_new/blob/main/app/src/main/java/com/example/data/local/AppDatabase.kt"
click node_daos "https://github.com/arif683/hardware_new/blob/main/app/src/main/java/com/example/data/local/Daos.kt"
click node_supabase "https://github.com/arif683/hardware_new/blob/main/app/src/main/java/com/example/data/remote/SupabaseClient.kt"
click node_sync_queue "https://github.com/arif683/hardware_new/blob/main/app/src/main/java/com/example/data/model/SyncQueueItem.kt"
click node_dynamic_ui "https://github.com/arif683/hardware_new/blob/main/app/src/main/java/com/example/data/remote/DynamicUiManager.kt"
click node_scanner "https://github.com/arif683/hardware_new/blob/main/app/src/main/java/com/example/util/GeminiBillScanner.kt"
click node_unit_convert "https://github.com/arif683/hardware_new/blob/main/app/applet/app/src/main/java/com/example/ui/screens/MultiUnitConverterDialog.kt"
click node_price_records "https://github.com/arif683/hardware_new/blob/main/app/applet/app/src/main/java/com/example/data/model/SupplierPurchaseRecord.kt"

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_auth,node_auth_manager,node_home,node_user toneBlue
class node_items,node_item_detail,node_stock,node_stock_vm,node_stock_tx,node_nfc,node_nfc_manager toneAmber
class node_billing,node_quick_pos,node_bill,node_quotation,node_ledger,node_transactions,node_gst,node_supplier_compare toneMint
class node_database,node_daos,node_supabase,node_sync_queue,node_dynamic_ui,node_scanner,node_unit_convert,node_price_records toneRose
```

## Components

### App and access

- [App entry](https://github.com/arif683/hardware_new/blob/main/app/src/main/java/com/example/MainActivity.kt): `app/src/main/java/com/example/MainActivity.kt`
- [Authentication gate](https://github.com/arif683/hardware_new/blob/main/app/src/main/java/com/example/ui/screens/AuthGateScreen.kt): `app/src/main/java/com/example/ui/screens/AuthGateScreen.kt`
- [Auth manager](https://github.com/arif683/hardware_new/blob/main/app/src/main/java/com/example/data/auth/AuthManager.kt): `app/src/main/java/com/example/data/auth/AuthManager.kt`
- [Home dashboard](https://github.com/arif683/hardware_new/blob/main/app/src/main/java/com/example/ui/screens/HomeScreen.kt): `app/src/main/java/com/example/ui/screens/HomeScreen.kt`

### Inventory operations

- [Item catalog](https://github.com/arif683/hardware_new/blob/main/app/src/main/java/com/example/ui/screens/ItemsScreen.kt): `app/src/main/java/com/example/ui/screens/ItemsScreen.kt`
- [Item details](https://github.com/arif683/hardware_new/blob/main/app/src/main/java/com/example/ui/screens/ItemDetailScreen.kt): `app/src/main/java/com/example/ui/screens/ItemDetailScreen.kt`
- [Stock repository](https://github.com/arif683/hardware_new/blob/main/app/src/main/java/com/example/data/repository/StockRepository.kt): `app/src/main/java/com/example/data/repository/StockRepository.kt`
- [Stock view model](https://github.com/arif683/hardware_new/blob/main/app/src/main/java/com/example/ui/StockViewModel.kt): `app/src/main/java/com/example/ui/StockViewModel.kt`
- [Stock transactions](https://github.com/arif683/hardware_new/blob/main/app/src/main/java/com/example/ui/screens/StockTransactionDialog.kt): `app/src/main/java/com/example/ui/screens/StockTransactionDialog.kt`
- [NFC shelf bins](https://github.com/arif683/hardware_new/blob/main/app/applet/app/src/main/java/com/example/ui/screens/NfcShelfBinScreen.kt): `app/applet/app/src/main/java/com/example/ui/screens/NfcShelfBinScreen.kt`
- [NFC shelf manager](https://github.com/arif683/hardware_new/blob/main/app/applet/app/src/main/java/com/example/util/NfcShelfManager.kt): `app/applet/app/src/main/java/com/example/util/NfcShelfManager.kt`

### Sales and finance

- [Billing hub](https://github.com/arif683/hardware_new/blob/main/app/src/main/java/com/example/ui/screens/BillingHubScreen.kt): `app/src/main/java/com/example/ui/screens/BillingHubScreen.kt`
- [Quick POS](https://github.com/arif683/hardware_new/blob/main/app/src/main/java/com/example/ui/screens/QuickBillingPosScreen.kt): `app/src/main/java/com/example/ui/screens/QuickBillingPosScreen.kt`
- [Bill screen](https://github.com/arif683/hardware_new/blob/main/app/src/main/java/com/example/ui/screens/BillScreen.kt): `app/src/main/java/com/example/ui/screens/BillScreen.kt`
- [Quotations](https://github.com/arif683/hardware_new/blob/main/app/src/main/java/com/example/ui/screens/QuotationScreen.kt): `app/src/main/java/com/example/ui/screens/QuotationScreen.kt`
- [Ledger](https://github.com/arif683/hardware_new/blob/main/app/src/main/java/com/example/ui/screens/LedgerScreen.kt): `app/src/main/java/com/example/ui/screens/LedgerScreen.kt`
- [Transactions](https://github.com/arif683/hardware_new/blob/main/app/src/main/java/com/example/ui/screens/TransactionsScreen.kt): `app/src/main/java/com/example/ui/screens/TransactionsScreen.kt`
- [GST tools](https://github.com/arif683/hardware_new/blob/main/app/src/main/java/com/example/ui/screens/GstCalculatorScreen.kt): `app/src/main/java/com/example/ui/screens/GstCalculatorScreen.kt`
- [Supplier comparison](https://github.com/arif683/hardware_new/blob/main/app/applet/app/src/main/java/com/example/ui/screens/SupplierPriceComparisonScreen.kt): `app/applet/app/src/main/java/com/example/ui/screens/SupplierPriceComparisonScreen.kt`

### Integrations and tools

- [Local database](https://github.com/arif683/hardware_new/blob/main/app/src/main/java/com/example/data/local/AppDatabase.kt): `app/src/main/java/com/example/data/local/AppDatabase.kt`
- [Data access objects](https://github.com/arif683/hardware_new/blob/main/app/src/main/java/com/example/data/local/Daos.kt): `app/src/main/java/com/example/data/local/Daos.kt`
- [Supabase client](https://github.com/arif683/hardware_new/blob/main/app/src/main/java/com/example/data/remote/SupabaseClient.kt): `app/src/main/java/com/example/data/remote/SupabaseClient.kt`
- [Sync queue records](https://github.com/arif683/hardware_new/blob/main/app/src/main/java/com/example/data/model/SyncQueueItem.kt): `app/src/main/java/com/example/data/model/SyncQueueItem.kt`
- [Dynamic UI config](https://github.com/arif683/hardware_new/blob/main/app/src/main/java/com/example/data/remote/DynamicUiManager.kt): `app/src/main/java/com/example/data/remote/DynamicUiManager.kt`
- [Bill scanner](https://github.com/arif683/hardware_new/blob/main/app/src/main/java/com/example/util/GeminiBillScanner.kt): `app/src/main/java/com/example/util/GeminiBillScanner.kt`
- [Unit converter](https://github.com/arif683/hardware_new/blob/main/app/applet/app/src/main/java/com/example/ui/screens/MultiUnitConverterDialog.kt): `app/applet/app/src/main/java/com/example/ui/screens/MultiUnitConverterDialog.kt`
- [Supplier purchase records](https://github.com/arif683/hardware_new/blob/main/app/applet/app/src/main/java/com/example/data/model/SupplierPurchaseRecord.kt): `app/applet/app/src/main/java/com/example/data/model/SupplierPurchaseRecord.kt`

### Other components

- **App user**

## Connections

- App user → App entry: opens
- App entry → Authentication gate: routes to
- Authentication gate → Auth manager: authenticates with
- App entry → Home dashboard: shows
- Home dashboard → Item catalog: opens
- Item catalog → Stock view model: uses
- Stock view model → Stock repository: delegates to
- Stock repository → Data access objects: accesses
- Data access objects → Local database: reads and writes
- Item catalog → Item details: opens
- Stock repository → Stock transactions: supports
- Home dashboard → Billing hub: opens
- Billing hub → Quick POS: offers
- Billing hub → Bill screen: opens
- Billing hub → Quotations: offers
- Home dashboard → Ledger: opens
- Home dashboard → Transactions: opens
- Billing hub → GST tools: offers
- Home dashboard → Supplier comparison: opens
- Home dashboard → NFC shelf bins: opens
- NFC shelf bins → NFC shelf manager: uses
- Stock repository → Supabase client: may sync through
- Stock repository → Sync queue records: may queue
- Home dashboard → Dynamic UI config: may configure
- Bill screen → Bill scanner: may scan with
- Item catalog → Unit converter: may use
- Supplier comparison → Supplier purchase records: may use
