# manujakm/mobile-pos architecture

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

- Interactive diagram: https://gitdiagram.com/manujakm/mobile-pos
- Repository: https://github.com/manujakm/mobile-pos

## Overview

Mobile-POS is a browser-based point-of-sale and shop-management app. The main workflow is a shop user entering the POS, selecting a store, building a sale, and recording payment; related screens support inventory, purchasing, reporting, and shop operations. The source excerpts show local browser persistence and local POS data access, but do not establish all backend wiring. Edges reflect calls or imports visible in excerpts, the source index, or the README; unsampled behavior is not inferred.

Main entry points: [`src/App.tsx`](https://github.com/manujakm/mobile-pos/blob/main/src/App.tsx) (App shell), [`src/GroceryHome.tsx`](https://github.com/manujakm/mobile-pos/blob/main/src/GroceryHome.tsx) (Grocery home), [`src/GroceryPos.tsx`](https://github.com/manujakm/mobile-pos/blob/main/src/GroceryPos.tsx) (Point of sale), [`src/data.ts`](https://github.com/manujakm/mobile-pos/blob/main/src/data.ts) (Sales data access)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["App entry"]
  node_app["App shell<br/>[App.tsx]"]
  node_signin["Shop sign-in<br/>[ShopSignIn.tsx]"]
  node_home["Grocery home<br/>[GroceryHome.tsx]"]
end

subgraph group_sales["Sales and checkout"]
  node_pos["Point of sale<br/>[GroceryPos.tsx]"]
  node_bill["Bill rendering<br/>[bill.tsx]"]
  node_scan["Ice scan<br/>[IceScan.tsx]"]
  node_catalog["Grocery catalog<br/>[grocery.ts]"]
end

subgraph group_operations["Shop operations"]
  node_desk["Desk records<br/>[groceryDesk.ts]"]
  node_inventory["Inventory management<br/>[InventoryPane.tsx]"]
  node_shop_panes["Shop panes<br/>[ShopPanes.tsx]"]
  node_extras["Shop settings<br/>[shopExtras.ts]"]
  node_printers["Printer selection<br/>[PrinterPicker.tsx]"]
end

subgraph group_reporting["Portal and reporting"]
  node_data["Sales data access<br/>[data.ts]"]
  node_ops["Operations reporting<br/>[ops.tsx]"]
  node_wave["Wave chart<br/>[WaveChart.tsx]"]
  node_report_file["Report files<br/>[reportFile.ts]"]
end

subgraph group_shared["Shared services"]
  node_accounts["Shop accounts<br/>[accounts.ts]"]
  node_client["Data client<br/>[client.ts]"]
  node_local_store[("Browser data store<br/>[client.ts]")]
  node_prefs["User preferences<br/>[prefs.ts]"]
  node_format["Value formatting<br/>[format.ts]"]
  node_time["Time windows<br/>[time.ts]"]
end

node_shop_user(("Shop user"))

node_shop_user -->|"opens"| node_app
node_app -->|"gets client"| node_client
node_app -->|"reads session"| node_accounts
node_app -->|"renders"| node_home
node_app -->|"loads theme"| node_prefs
node_app -->|"loads portal data"| node_data
node_app -->|"uses chart"| node_wave
node_app -->|"uses reports"| node_report_file
node_app -->|"uses sign-in"| node_signin
node_home -->|"uses POS"| node_pos
node_home -->|"renders"| node_inventory
node_home -->|"renders"| node_shop_panes
node_home -->|"loads records"| node_desk
node_home -->|"loads catalog"| node_catalog
node_home -->|"loads low stock"| node_data
node_home -->|"loads settings"| node_extras
node_pos -->|"loads stores"| node_catalog
node_pos -->|"opens shift"| node_desk
node_pos -->|"loads till settings"| node_extras
node_pos -->|"uses bill"| node_bill
node_pos -->|"uses scanner"| node_scan
node_inventory -->|"updates stock"| node_desk
node_shop_panes -->|"uses records"| node_desk
node_shop_panes -->|"uses catalog"| node_catalog
node_shop_panes -->|"uses settings"| node_extras
node_signin -->|"reads account"| node_accounts
node_signin -->|"uses store data"| node_catalog
node_home -->|"uses picker"| node_printers
node_printers -->|"loads printer settings"| node_extras
node_ops -->|"loads operations data"| node_data
node_wave -->|"uses sales data"| node_data
node_data -->|"formats values"| node_format
node_data -->|"builds time buckets"| node_time
node_client -->|"reads and writes"| node_local_store

click node_app "https://github.com/manujakm/mobile-pos/blob/main/src/App.tsx"
click node_signin "https://github.com/manujakm/mobile-pos/blob/main/src/ShopSignIn.tsx"
click node_home "https://github.com/manujakm/mobile-pos/blob/main/src/GroceryHome.tsx"
click node_pos "https://github.com/manujakm/mobile-pos/blob/main/src/GroceryPos.tsx"
click node_bill "https://github.com/manujakm/mobile-pos/blob/main/src/bill.tsx"
click node_scan "https://github.com/manujakm/mobile-pos/blob/main/src/IceScan.tsx"
click node_catalog "https://github.com/manujakm/mobile-pos/blob/main/src/grocery.ts"
click node_desk "https://github.com/manujakm/mobile-pos/blob/main/src/groceryDesk.ts"
click node_inventory "https://github.com/manujakm/mobile-pos/blob/main/src/InventoryPane.tsx"
click node_shop_panes "https://github.com/manujakm/mobile-pos/blob/main/src/ShopPanes.tsx"
click node_extras "https://github.com/manujakm/mobile-pos/blob/main/src/shopExtras.ts"
click node_printers "https://github.com/manujakm/mobile-pos/blob/main/src/PrinterPicker.tsx"
click node_accounts "https://github.com/manujakm/mobile-pos/blob/main/src/accounts.ts"
click node_client "https://github.com/manujakm/mobile-pos/blob/main/src/client.ts"
click node_local_store "https://github.com/manujakm/mobile-pos/blob/main/src/client.ts"
click node_data "https://github.com/manujakm/mobile-pos/blob/main/src/data.ts"
click node_ops "https://github.com/manujakm/mobile-pos/blob/main/src/ops.tsx"
click node_wave "https://github.com/manujakm/mobile-pos/blob/main/src/WaveChart.tsx"
click node_report_file "https://github.com/manujakm/mobile-pos/blob/main/src/reportFile.ts"
click node_prefs "https://github.com/manujakm/mobile-pos/blob/main/src/prefs.ts"
click node_format "https://github.com/manujakm/mobile-pos/blob/main/src/format.ts"
click node_time "https://github.com/manujakm/mobile-pos/blob/main/src/time.ts"

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_app,node_signin,node_home,node_shop_user toneBlue
class node_pos,node_bill,node_scan,node_catalog toneAmber
class node_desk,node_inventory,node_shop_panes,node_extras,node_printers toneMint
class node_data,node_ops,node_wave,node_report_file toneRose
class node_accounts,node_client,node_local_store,node_prefs,node_format,node_time toneIndigo
```

## Components

### App entry

- [App shell](https://github.com/manujakm/mobile-pos/blob/main/src/App.tsx): `src/App.tsx`
- [Shop sign-in](https://github.com/manujakm/mobile-pos/blob/main/src/ShopSignIn.tsx): `src/ShopSignIn.tsx`
- [Grocery home](https://github.com/manujakm/mobile-pos/blob/main/src/GroceryHome.tsx): `src/GroceryHome.tsx`

### Sales and checkout

- [Point of sale](https://github.com/manujakm/mobile-pos/blob/main/src/GroceryPos.tsx): `src/GroceryPos.tsx`
- [Bill rendering](https://github.com/manujakm/mobile-pos/blob/main/src/bill.tsx): `src/bill.tsx`
- [Ice scan](https://github.com/manujakm/mobile-pos/blob/main/src/IceScan.tsx): `src/IceScan.tsx`
- [Grocery catalog](https://github.com/manujakm/mobile-pos/blob/main/src/grocery.ts): `src/grocery.ts`

### Shop operations

- [Desk records](https://github.com/manujakm/mobile-pos/blob/main/src/groceryDesk.ts): `src/groceryDesk.ts`
- [Inventory management](https://github.com/manujakm/mobile-pos/blob/main/src/InventoryPane.tsx): `src/InventoryPane.tsx`
- [Shop panes](https://github.com/manujakm/mobile-pos/blob/main/src/ShopPanes.tsx): `src/ShopPanes.tsx`
- [Shop settings](https://github.com/manujakm/mobile-pos/blob/main/src/shopExtras.ts): `src/shopExtras.ts`
- [Printer selection](https://github.com/manujakm/mobile-pos/blob/main/src/PrinterPicker.tsx): `src/PrinterPicker.tsx`

### Portal and reporting

- [Sales data access](https://github.com/manujakm/mobile-pos/blob/main/src/data.ts): `src/data.ts`
- [Operations reporting](https://github.com/manujakm/mobile-pos/blob/main/src/ops.tsx): `src/ops.tsx`
- [Wave chart](https://github.com/manujakm/mobile-pos/blob/main/src/WaveChart.tsx): `src/WaveChart.tsx`
- [Report files](https://github.com/manujakm/mobile-pos/blob/main/src/reportFile.ts): `src/reportFile.ts`

### Shared services

- [Shop accounts](https://github.com/manujakm/mobile-pos/blob/main/src/accounts.ts): `src/accounts.ts`
- [Data client](https://github.com/manujakm/mobile-pos/blob/main/src/client.ts): `src/client.ts`
- [Browser data store](https://github.com/manujakm/mobile-pos/blob/main/src/client.ts): `src/client.ts`
- [User preferences](https://github.com/manujakm/mobile-pos/blob/main/src/prefs.ts): `src/prefs.ts`
- [Value formatting](https://github.com/manujakm/mobile-pos/blob/main/src/format.ts): `src/format.ts`
- [Time windows](https://github.com/manujakm/mobile-pos/blob/main/src/time.ts): `src/time.ts`

### Other components

- **Shop user**

## Connections

- Shop user → App shell: opens
- App shell → Data client: gets client (evidence: `src/App.tsx`)
- App shell → Shop accounts: reads session (evidence: `src/App.tsx`)
- App shell → Grocery home: renders (evidence: `src/App.tsx`)
- App shell → User preferences: loads theme (evidence: `src/App.tsx`)
- App shell → Sales data access: loads portal data (evidence: `src/App.tsx`)
- App shell → Wave chart: uses chart (evidence: `src/App.tsx`)
- App shell → Report files: uses reports (evidence: `src/App.tsx`)
- App shell → Shop sign-in: uses sign-in (evidence: `src/App.tsx`)
- Grocery home → Point of sale: uses POS (evidence: `src/GroceryHome.tsx`)
- Grocery home → Inventory management: renders (evidence: `src/GroceryHome.tsx`)
- Grocery home → Shop panes: renders (evidence: `src/GroceryHome.tsx`)
- Grocery home → Desk records: loads records (evidence: `src/GroceryHome.tsx`)
- Grocery home → Grocery catalog: loads catalog (evidence: `src/GroceryHome.tsx`)
- Grocery home → Sales data access: loads low stock (evidence: `src/GroceryHome.tsx`)
- Grocery home → Shop settings: loads settings (evidence: `src/GroceryHome.tsx`)
- Point of sale → Grocery catalog: loads stores (evidence: `src/GroceryPos.tsx`)
- Point of sale → Desk records: opens shift (evidence: `src/GroceryPos.tsx`)
- Point of sale → Shop settings: loads till settings (evidence: `src/GroceryPos.tsx`)
- Point of sale → Bill rendering: uses bill (evidence: `src/GroceryPos.tsx`)
- Point of sale → Ice scan: uses scanner (evidence: `src/GroceryPos.tsx`)
- Inventory management → Desk records: updates stock (evidence: `src/InventoryPane.tsx`)
- Shop panes → Desk records: uses records (evidence: `src/ShopPanes.tsx`)
- Shop panes → Grocery catalog: uses catalog (evidence: `src/ShopPanes.tsx`)
- Shop panes → Shop settings: uses settings (evidence: `src/ShopPanes.tsx`)
- Shop sign-in → Shop accounts: reads account (evidence: `src/ShopSignIn.tsx`)
- Shop sign-in → Grocery catalog: uses store data (evidence: `src/ShopSignIn.tsx`)
- Grocery home → Printer selection: uses picker (evidence: `src/GroceryHome.tsx`)
- Printer selection → Shop settings: loads printer settings (evidence: `src/PrinterPicker.tsx`)
- Operations reporting → Sales data access: loads operations data (evidence: `src/ops.tsx`)
- Wave chart → Sales data access: uses sales data (evidence: `src/WaveChart.tsx`)
- Sales data access → Value formatting: formats values (evidence: `src/data.ts`)
- Sales data access → Time windows: builds time buckets (evidence: `src/data.ts`)
- Data client → Browser data store: reads and writes (evidence: `src/client.ts`)
