# bhimall/retail-suite-frappe architecture

> Architecture diagram of the GitHub repository bhimall/retail-suite-frappe, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-08). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/bhimall/retail-suite-frappe
- Repository: https://github.com/bhimall/retail-suite-frappe

## Overview

Retail Suite is a Frappe-backed retail platform with a Vue interface for point-of-sale and eCommerce, plus inventory, customer, workforce, shift, and reporting capabilities. Users enter through routed storefront or staff pages; the POS supports item lookup and payment, while backend APIs and Frappe documents handle retail operations and persistent records. The sampled code confirms the frontend API client, POS backend integrations, and shift-closing logic. Many listed capabilities are represented by their exact page or API directories; their internal calls were not sampled, so those links are omitted.

Main entry points: [`retail/retail/api`](https://github.com/bhimall/retail-suite-frappe/tree/develop/retail/retail/api) (Frappe retail APIs), [`retail-suite/src/router.js`](https://github.com/bhimall/retail-suite-frappe/blob/develop/retail-suite/src/router.js) (Page routing), [`retail-suite/src/services/api.js`](https://github.com/bhimall/retail-suite-frappe/blob/develop/retail-suite/src/services/api.js) (Frontend API client), [`retail-suite/src/stores/invoices.js`](https://github.com/bhimall/retail-suite-frappe/blob/develop/retail-suite/src/stores/invoices.js) (Sales and invoices)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Vue application"]
  node_app["Application shell<br/>[App.vue]"]
  node_router["Page routing<br/>[router.js]"]
end

subgraph group_commerce["Sales and commerce"]
  node_pos["POS checkout<br/>[Pay.vue]"]
  node_storefront["Online storefront"]
  node_search["Barcode and search<br/>[SearchBar.vue]"]
  node_promotions["Offers and loyalty"]
  node_customers["Customer management"]
  node_invoices["Sales and invoices<br/>[invoices.js]"]
end

subgraph group_operations["Retail operations"]
  node_inventory["Inventory operations"]
  node_purchasing["Suppliers and purchasing"]
  node_shifts["POS shift control<br/>[shift.js]"]
  node_closing["Shift closing"]
  node_workforce["Staff and attendance"]
  node_accounting["Accounting"]
  node_reports["Analytics and reports<br/>[reports.py]"]
  node_security["Security and users"]
end

subgraph group_platform["Backend platform"]
  node_api["Frontend API client<br/>[api.js]"]
  node_backend["Frappe retail APIs"]
  node_erpdata[("Frappe records")]
end

node_shopper(("Shopper or staff"))

node_shopper -.->|"opens pages"| node_router
node_router -->|"renders routes"| node_app
node_app -->|"renders view"| node_router
node_router -->|"routes checkout"| node_pos
node_router -->|"routes storefront"| node_storefront
node_search -->|"fetches items"| node_api
node_pos -->|"calls services"| node_api
node_api -->|"requests methods"| node_backend
node_backend -->|"reads and writes"| node_erpdata
node_backend -->|"uses coupon rules"| node_promotions
node_backend -->|"uses contact APIs"| node_customers
node_backend -->|"uses address APIs"| node_purchasing
node_closing -->|"uses POS helpers"| node_backend
node_closing -->|"loads shift records"| node_erpdata
node_shifts -->|"requests shift data"| node_api
node_invoices -->|"requests invoice data"| node_api
node_invoices -->|"reads shift state"| node_shifts

click node_app "https://github.com/bhimall/retail-suite-frappe/blob/develop/retail-suite/src/App.vue"
click node_router "https://github.com/bhimall/retail-suite-frappe/blob/develop/retail-suite/src/router.js"
click node_pos "https://github.com/bhimall/retail-suite-frappe/blob/develop/retail-suite/src/pages/Pay.vue"
click node_storefront "https://github.com/bhimall/retail-suite-frappe/tree/develop/retail-suite/src/pages/website"
click node_search "https://github.com/bhimall/retail-suite-frappe/blob/develop/retail-suite/src/layout/SearchBar.vue"
click node_promotions "https://github.com/bhimall/retail-suite-frappe/tree/develop/retail-suite/src/pages/promotions"
click node_customers "https://github.com/bhimall/retail-suite-frappe/tree/develop/retail-suite/src/pages/customers"
click node_invoices "https://github.com/bhimall/retail-suite-frappe/blob/develop/retail-suite/src/stores/invoices.js"
click node_api "https://github.com/bhimall/retail-suite-frappe/blob/develop/retail-suite/src/services/api.js"
click node_backend "https://github.com/bhimall/retail-suite-frappe/tree/develop/retail/retail/api"
click node_inventory "https://github.com/bhimall/retail-suite-frappe/tree/develop/retail-suite/src/pages/inventory"
click node_purchasing "https://github.com/bhimall/retail-suite-frappe/tree/develop/retail-suite/src/pages/suppliers"
click node_shifts "https://github.com/bhimall/retail-suite-frappe/blob/develop/retail-suite/src/stores/shift.js"
click node_closing "https://github.com/bhimall/retail-suite-frappe/blob/develop/retail/retail/doctype/pos_closing_shift/pos_closing_shift.py"
click node_workforce "https://github.com/bhimall/retail-suite-frappe/tree/develop/retail-suite/src/pages/attendance"
click node_accounting "https://github.com/bhimall/retail-suite-frappe/tree/develop/retail-suite/src/pages/accounting"
click node_reports "https://github.com/bhimall/retail-suite-frappe/blob/develop/retail/retail/api/reports.py"
click node_security "https://github.com/bhimall/retail-suite-frappe/tree/develop/retail-suite/src/pages/security"

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_router toneBlue
class node_pos,node_storefront,node_search,node_promotions,node_customers,node_invoices toneAmber
class node_inventory,node_purchasing,node_shifts,node_closing,node_workforce,node_accounting,node_reports,node_security toneMint
class node_api,node_backend,node_erpdata toneRose
class node_shopper toneIndigo
```

## Components

### Vue application

- [Application shell](https://github.com/bhimall/retail-suite-frappe/blob/develop/retail-suite/src/App.vue): `retail-suite/src/App.vue`
- [Page routing](https://github.com/bhimall/retail-suite-frappe/blob/develop/retail-suite/src/router.js): `retail-suite/src/router.js`

### Sales and commerce

- [POS checkout](https://github.com/bhimall/retail-suite-frappe/blob/develop/retail-suite/src/pages/Pay.vue): `retail-suite/src/pages/Pay.vue`
- [Online storefront](https://github.com/bhimall/retail-suite-frappe/tree/develop/retail-suite/src/pages/website): `retail-suite/src/pages/website`
- [Barcode and search](https://github.com/bhimall/retail-suite-frappe/blob/develop/retail-suite/src/layout/SearchBar.vue): `retail-suite/src/layout/SearchBar.vue`
- [Offers and loyalty](https://github.com/bhimall/retail-suite-frappe/tree/develop/retail-suite/src/pages/promotions): `retail-suite/src/pages/promotions`
- [Customer management](https://github.com/bhimall/retail-suite-frappe/tree/develop/retail-suite/src/pages/customers): `retail-suite/src/pages/customers`
- [Sales and invoices](https://github.com/bhimall/retail-suite-frappe/blob/develop/retail-suite/src/stores/invoices.js): `retail-suite/src/stores/invoices.js`

### Retail operations

- [Inventory operations](https://github.com/bhimall/retail-suite-frappe/tree/develop/retail-suite/src/pages/inventory): `retail-suite/src/pages/inventory`
- [Suppliers and purchasing](https://github.com/bhimall/retail-suite-frappe/tree/develop/retail-suite/src/pages/suppliers): `retail-suite/src/pages/suppliers`
- [POS shift control](https://github.com/bhimall/retail-suite-frappe/blob/develop/retail-suite/src/stores/shift.js): `retail-suite/src/stores/shift.js`
- [Shift closing](https://github.com/bhimall/retail-suite-frappe/blob/develop/retail/retail/doctype/pos_closing_shift/pos_closing_shift.py): `retail/retail/doctype/pos_closing_shift/pos_closing_shift.py`
- [Staff and attendance](https://github.com/bhimall/retail-suite-frappe/tree/develop/retail-suite/src/pages/attendance): `retail-suite/src/pages/attendance`
- [Accounting](https://github.com/bhimall/retail-suite-frappe/tree/develop/retail-suite/src/pages/accounting): `retail-suite/src/pages/accounting`
- [Analytics and reports](https://github.com/bhimall/retail-suite-frappe/blob/develop/retail/retail/api/reports.py): `retail/retail/api/reports.py`
- [Security and users](https://github.com/bhimall/retail-suite-frappe/tree/develop/retail-suite/src/pages/security): `retail-suite/src/pages/security`

### Backend platform

- [Frontend API client](https://github.com/bhimall/retail-suite-frappe/blob/develop/retail-suite/src/services/api.js): `retail-suite/src/services/api.js`
- [Frappe retail APIs](https://github.com/bhimall/retail-suite-frappe/tree/develop/retail/retail/api): `retail/retail/api`
- **Frappe records**

### Other components

- **Shopper or staff**

## Connections

- Shopper or staff → Page routing: opens pages
- Page routing → Application shell: renders routes (evidence: `retail-suite/src/main.js`)
- Application shell → Page routing: renders view (evidence: `retail-suite/src/App.vue`)
- Page routing → POS checkout: routes checkout (evidence: `retail-suite/src/router.js`)
- Page routing → Online storefront: routes storefront (evidence: `retail-suite/src/router.js`)
- Barcode and search → Frontend API client: fetches items (evidence: `retail-suite/src/layout/SearchBar.vue`)
- POS checkout → Frontend API client: calls services (evidence: `retail-suite/src/pages/Pay.vue`)
- Frontend API client → Frappe retail APIs: requests methods (evidence: `retail-suite/src/services/api.js`)
- Frappe retail APIs → Frappe records: reads and writes (evidence: `retail/retail/api/posapp.py`)
- Frappe retail APIs → Offers and loyalty: uses coupon rules (evidence: `retail/retail/api/posapp.py`)
- Frappe retail APIs → Customer management: uses contact APIs (evidence: `retail/retail/api/posapp.py`)
- Frappe retail APIs → Suppliers and purchasing: uses address APIs (evidence: `retail/retail/api/posapp.py`)
- Shift closing → Frappe retail APIs: uses POS helpers (evidence: `retail/retail/doctype/pos_closing_shift/pos_closing_shift.py`)
- Shift closing → Frappe records: loads shift records (evidence: `retail/retail/doctype/pos_closing_shift/pos_closing_shift.py`)
- POS shift control → Frontend API client: requests shift data (evidence: `retail-suite/src/stores/shift.js`)
- Sales and invoices → Frontend API client: requests invoice data (evidence: `retail-suite/src/stores/invoices.js`)
- Sales and invoices → POS shift control: reads shift state (evidence: `retail-suite/src/stores/invoices.js`)
