# ashanthalahiru/pos-react-app architecture

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

- Interactive diagram: https://gitdiagram.com/ashanthalahiru/pos-react-app
- Repository: https://github.com/ashanthalahiru/pos-react-app

## Overview

POS React UI is a browser-based point-of-sale client. Users register or sign in, then create and browse orders, add items, adjust quantities, and confirm orders; authentication and order/item operations are sent to the separate POS Node API. The graph follows the UI’s rendered components and sampled service calls. The README documents the API as a separate product; unsampled item-list and order-create internals are represented only where their use is visible.

Main entry points: [`src/services/service.js`](https://github.com/ashanthalahiru/pos-react-app/blob/master/src/services/service.js) (API service), [`src/components/order/order-list.js`](https://github.com/ashanthalahiru/pos-react-app/blob/master/src/components/order/order-list.js) (Order list), [`src/components/app.js`](https://github.com/ashanthalahiru/pos-react-app/blob/master/src/components/app.js) (App routing), [`src/components/order/order.js`](https://github.com/ashanthalahiru/pos-react-app/blob/master/src/components/order/order.js) (Order details)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_navigation["App and navigation"]
  node_entry["React entry<br/>[index.js]"]
  node_app["App routing<br/>[app.js]"]
  node_topbar["Top bar<br/>[top-bar.js]"]
end

subgraph group_identity["User identity"]
  node_login["Login view<br/>[login.js]"]
  node_loginform["Login form<br/>[login-form.js]"]
  node_register["Registration view<br/>[register.js]"]
  node_registerform["Registration form<br/>[register-form.js]"]
end

subgraph group_orders["Order workflow"]
  node_orderlist["Order list<br/>[order-list.js]"]
  node_ordercreate["Order creation<br/>[order-create.js]"]
  node_order["Order details<br/>[order.js]"]
  node_itemselect["Item selector<br/>[item-select.js]"]
  node_itemlist["Order item list<br/>[item-list.js]"]
  node_item["Order item<br/>[item.js]"]
end

subgraph group_integration["API integration"]
  node_service["API service<br/>[service.js]"]
  node_config["API host config<br/>[config.js]"]
  node_api["POS Node API"]
end

node_user(("POS user"))

node_user -->|"opens UI"| node_entry
node_entry -->|"renders"| node_app
node_app -->|"renders"| node_login
node_app -->|"renders"| node_register
node_app -->|"renders"| node_orderlist
node_login -->|"renders"| node_loginform
node_login -->|"renders"| node_topbar
node_register -->|"renders"| node_registerform
node_register -->|"renders"| node_topbar
node_loginform -->|"authenticates via"| node_service
node_registerform -->|"registers via"| node_service
node_orderlist -->|"loads and creates"| node_service
node_orderlist -->|"renders"| node_ordercreate
node_orderlist -->|"renders details"| node_order
node_orderlist -->|"renders"| node_topbar
node_order -->|"loads and confirms"| node_service
node_order -->|"renders"| node_itemselect
node_order -->|"renders"| node_itemlist
node_itemlist -->|"uses"| node_item
node_service -->|"uses host"| node_config
node_service -->|"sends HTTP requests"| node_api

click node_entry "https://github.com/ashanthalahiru/pos-react-app/blob/master/src/index.js"
click node_app "https://github.com/ashanthalahiru/pos-react-app/blob/master/src/components/app.js"
click node_topbar "https://github.com/ashanthalahiru/pos-react-app/blob/master/src/components/utill/top-bar.js"
click node_login "https://github.com/ashanthalahiru/pos-react-app/blob/master/src/components/login/login.js"
click node_loginform "https://github.com/ashanthalahiru/pos-react-app/blob/master/src/components/login/login-form.js"
click node_register "https://github.com/ashanthalahiru/pos-react-app/blob/master/src/components/register/register.js"
click node_registerform "https://github.com/ashanthalahiru/pos-react-app/blob/master/src/components/register/register-form.js"
click node_orderlist "https://github.com/ashanthalahiru/pos-react-app/blob/master/src/components/order/order-list.js"
click node_ordercreate "https://github.com/ashanthalahiru/pos-react-app/blob/master/src/components/order/order-create.js"
click node_order "https://github.com/ashanthalahiru/pos-react-app/blob/master/src/components/order/order.js"
click node_itemselect "https://github.com/ashanthalahiru/pos-react-app/blob/master/src/components/item/item-select.js"
click node_itemlist "https://github.com/ashanthalahiru/pos-react-app/blob/master/src/components/item/item-list.js"
click node_item "https://github.com/ashanthalahiru/pos-react-app/blob/master/src/components/item/item.js"
click node_service "https://github.com/ashanthalahiru/pos-react-app/blob/master/src/services/service.js"
click node_config "https://github.com/ashanthalahiru/pos-react-app/blob/master/src/config/config.js"

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_entry,node_app,node_topbar,node_user toneBlue
class node_login,node_loginform,node_register,node_registerform toneAmber
class node_orderlist,node_ordercreate,node_order,node_itemselect,node_itemlist,node_item toneMint
class node_service,node_config,node_api toneRose
```

## Components

### App and navigation

- [React entry](https://github.com/ashanthalahiru/pos-react-app/blob/master/src/index.js): `src/index.js`
- [App routing](https://github.com/ashanthalahiru/pos-react-app/blob/master/src/components/app.js): `src/components/app.js`
- [Top bar](https://github.com/ashanthalahiru/pos-react-app/blob/master/src/components/utill/top-bar.js): `src/components/utill/top-bar.js`

### User identity

- [Login view](https://github.com/ashanthalahiru/pos-react-app/blob/master/src/components/login/login.js): `src/components/login/login.js`
- [Login form](https://github.com/ashanthalahiru/pos-react-app/blob/master/src/components/login/login-form.js): `src/components/login/login-form.js`
- [Registration view](https://github.com/ashanthalahiru/pos-react-app/blob/master/src/components/register/register.js): `src/components/register/register.js`
- [Registration form](https://github.com/ashanthalahiru/pos-react-app/blob/master/src/components/register/register-form.js): `src/components/register/register-form.js`

### Order workflow

- [Order list](https://github.com/ashanthalahiru/pos-react-app/blob/master/src/components/order/order-list.js): `src/components/order/order-list.js`
- [Order creation](https://github.com/ashanthalahiru/pos-react-app/blob/master/src/components/order/order-create.js): `src/components/order/order-create.js`
- [Order details](https://github.com/ashanthalahiru/pos-react-app/blob/master/src/components/order/order.js): `src/components/order/order.js`
- [Item selector](https://github.com/ashanthalahiru/pos-react-app/blob/master/src/components/item/item-select.js): `src/components/item/item-select.js`
- [Order item list](https://github.com/ashanthalahiru/pos-react-app/blob/master/src/components/item/item-list.js): `src/components/item/item-list.js`
- [Order item](https://github.com/ashanthalahiru/pos-react-app/blob/master/src/components/item/item.js): `src/components/item/item.js`

### API integration

- [API service](https://github.com/ashanthalahiru/pos-react-app/blob/master/src/services/service.js): `src/services/service.js`
- [API host config](https://github.com/ashanthalahiru/pos-react-app/blob/master/src/config/config.js): `src/config/config.js`
- **POS Node API**

### Other components

- **POS user**

## Connections

- POS user → React entry: opens UI (evidence: `src/index.js`)
- React entry → App routing: renders (evidence: `src/index.js`)
- App routing → Login view: renders (evidence: `src/components/app.js`)
- App routing → Registration view: renders (evidence: `src/components/app.js`)
- App routing → Order list: renders (evidence: `src/components/app.js`)
- Login view → Login form: renders (evidence: `src/components/login/login.js`)
- Login view → Top bar: renders (evidence: `src/components/login/login.js`)
- Registration view → Registration form: renders (evidence: `src/components/register/register.js`)
- Registration view → Top bar: renders (evidence: `src/components/register/register.js`)
- Login form → API service: authenticates via (evidence: `src/components/login/login-form.js`)
- Registration form → API service: registers via (evidence: `src/components/register/register-form.js`)
- Order list → API service: loads and creates (evidence: `src/components/order/order-list.js`)
- Order list → Order creation: renders (evidence: `src/components/order/order-list.js`)
- Order list → Order details: renders details (evidence: `src/components/order/order-list.js`)
- Order list → Top bar: renders (evidence: `src/components/order/order-list.js`)
- Order details → API service: loads and confirms (evidence: `src/components/order/order.js`)
- Order details → Item selector: renders (evidence: `src/components/order/order.js`)
- Order details → Order item list: renders (evidence: `src/components/order/order.js`)
- Order item list → Order item: uses (evidence: `src/components/item/item-list.js`)
- API service → API host config: uses host (evidence: `src/services/service.js`)
- API service → POS Node API: sends HTTP requests (evidence: `src/services/service.js`)
