# ury-erp/ury architecture

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

- Interactive diagram: https://gitdiagram.com/ury-erp/ury
- Repository: https://github.com/ury-erp/ury

## Overview

URY is a restaurant-management suite built on ERPNext, with distinct administration, cashier/captain POS, customer self-ordering, and kitchen-display experiences. The primary workflow runs from restaurant setup and menu/table configuration through order entry, kitchen preparation, billing, and operational reporting. The graph preserves README-documented capabilities even where implementation excerpts were unavailable; those relationships are cited to the README rather than treated as inspected code. Several backend and legacy-app connections are therefore documented at subsystem level, not inferred from unsampled source.

Main entry points: [`pos/src/App.tsx`](https://github.com/ury-erp/ury/blob/develop/pos/src/App.tsx) (Cashier POS), [`ury/ury/doctype`](https://github.com/ury-erp/ury/tree/develop/ury/ury/doctype) (Restaurant domain records), [`frontend/src/App.tsx`](https://github.com/ury-erp/ury/blob/develop/frontend/src/App.tsx) (Admin portal), [`frontend/src/pages/Setup`](https://github.com/ury-erp/ury/tree/develop/frontend/src/pages/Setup) (Setup wizard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_admin["Administration &amp; Analytics"]
  node_admin_app["Admin portal<br/>[App.tsx]"]
  node_setup["Setup wizard"]
  node_configuration["Restaurant configuration"]
  node_reports["Reports &amp; analytics"]
end

subgraph group_pos["POS &amp; Table Orders"]
  node_pos_app["Cashier POS<br/>[App.tsx]"]
  node_pos_store["POS state &amp; operations<br/>[pos-store.ts]"]
  node_order_pages["Orders &amp; billing<br/>[Orders.tsx]"]
  node_table_orders["Captain table orders<br/>[CaptainOrder.tsx]"]
  node_table_context["Table order context"]
  node_legacy_pos["Legacy mobile POS<br/>[App.vue]"]
end

subgraph group_self["Self Ordering"]
  node_self_app["Self-order app<br/>[App.tsx]"]
  node_ordering_session["Ordering session"]
  node_ordering_api["Self-order API client<br/>[api.ts]"]
end

subgraph group_kitchen["Kitchen Display"]
  node_mosaic_app["Kitchen display<br/>[App.vue]"]
  node_mosaic_views["Kitchen queue views<br/>[Home.vue]"]
end

subgraph group_backend["URY Backend"]
  node_report_api["Report services"]
  node_pos_api["POS APIs<br/>[api.py]"]
  node_self_backend["Self-order services<br/>[self_ordering.py]"]
  node_kot_backend["KOT &amp; kitchen APIs<br/>[ury_kot_display.py]"]
  node_domain_models[("Restaurant domain records")]
end

node_manager(("Restaurant staff"))
node_erpnext[("ERPNext")]

node_manager -->|"configures"| node_admin_app
node_admin_app -->|"routes to"| node_setup
node_admin_app -->|"routes to"| node_configuration
node_admin_app -->|"routes to"| node_reports
node_reports -->|"requests data"| node_report_api
node_manager -->|"processes orders"| node_pos_app
node_pos_app -->|"routes to"| node_order_pages
node_pos_app -->|"routes to"| node_table_orders
node_pos_app -->|"initializes"| node_pos_store
node_table_orders -->|"loads context"| node_table_context
node_pos_store -->|"uses POS services"| node_pos_api
node_manager -->|"places order"| node_self_app
node_self_app -->|"selects layout"| node_ordering_session
node_ordering_session -->|"requests menu and orders"| node_ordering_api
node_ordering_api -->|"calls services"| node_self_backend
node_manager -->|"monitors kitchen"| node_mosaic_app
node_mosaic_app -->|"renders"| node_mosaic_views
node_mosaic_views -.->|"receives order updates"| node_kot_backend
node_pos_app -.->|"sends kitchen tickets"| node_kot_backend
node_setup -.->|"configures records"| node_domain_models
node_configuration -.->|"manages records"| node_domain_models
node_pos_api -.->|"operates on records"| node_domain_models
node_report_api -.->|"reports on records"| node_domain_models
node_domain_models -->|"extends ERPNext"| node_erpnext
node_manager -.->|"uses legacy client"| node_legacy_pos

click node_admin_app "https://github.com/ury-erp/ury/blob/develop/frontend/src/App.tsx"
click node_setup "https://github.com/ury-erp/ury/tree/develop/frontend/src/pages/Setup"
click node_configuration "https://github.com/ury-erp/ury/tree/develop/frontend/src/pages/Dashboard"
click node_reports "https://github.com/ury-erp/ury/tree/develop/frontend/src/pages/Reports"
click node_report_api "https://github.com/ury-erp/ury/tree/develop/ury/ury/report_api"
click node_pos_app "https://github.com/ury-erp/ury/blob/develop/pos/src/App.tsx"
click node_pos_store "https://github.com/ury-erp/ury/blob/develop/pos/src/store/pos-store.ts"
click node_order_pages "https://github.com/ury-erp/ury/blob/develop/pos/src/pages/Orders.tsx"
click node_table_orders "https://github.com/ury-erp/ury/blob/develop/pos/src/captain/pages/CaptainOrder.tsx"
click node_table_context "https://github.com/ury-erp/ury/blob/develop/pos/src/captain/hooks/useTableOrderContext.ts"
click node_pos_api "https://github.com/ury-erp/ury/blob/develop/ury/ury_pos/api.py"
click node_self_app "https://github.com/ury-erp/ury/blob/develop/self-order/src/App.tsx"
click node_ordering_session "https://github.com/ury-erp/ury/blob/develop/self-order/src/hooks/useOrderingSession.ts"
click node_ordering_api "https://github.com/ury-erp/ury/blob/develop/self-order/src/lib/api.ts"
click node_self_backend "https://github.com/ury-erp/ury/blob/develop/ury/ury/api/self_ordering.py"
click node_mosaic_app "https://github.com/ury-erp/ury/blob/develop/mosaic/src/App.vue"
click node_mosaic_views "https://github.com/ury-erp/ury/blob/develop/mosaic/src/views/Home.vue"
click node_kot_backend "https://github.com/ury-erp/ury/blob/develop/ury/ury/api/ury_kot_display.py"
click node_domain_models "https://github.com/ury-erp/ury/tree/develop/ury/ury/doctype"
click node_legacy_pos "https://github.com/ury-erp/ury/blob/develop/urypos/src/App.vue"

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_admin_app,node_setup,node_configuration,node_reports toneBlue
class node_pos_app,node_pos_store,node_order_pages,node_table_orders,node_table_context,node_legacy_pos,node_erpnext toneAmber
class node_self_app,node_ordering_session,node_ordering_api toneMint
class node_mosaic_app,node_mosaic_views toneRose
class node_report_api,node_pos_api,node_self_backend,node_kot_backend,node_domain_models,node_manager toneIndigo
```

## Components

### Administration & Analytics

- [Admin portal](https://github.com/ury-erp/ury/blob/develop/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Setup wizard](https://github.com/ury-erp/ury/tree/develop/frontend/src/pages/Setup): `frontend/src/pages/Setup`
- [Restaurant configuration](https://github.com/ury-erp/ury/tree/develop/frontend/src/pages/Dashboard): `frontend/src/pages/Dashboard`
- [Reports & analytics](https://github.com/ury-erp/ury/tree/develop/frontend/src/pages/Reports): `frontend/src/pages/Reports`

### POS & Table Orders

- [Cashier POS](https://github.com/ury-erp/ury/blob/develop/pos/src/App.tsx): `pos/src/App.tsx`
- [POS state & operations](https://github.com/ury-erp/ury/blob/develop/pos/src/store/pos-store.ts): `pos/src/store/pos-store.ts`
- [Orders & billing](https://github.com/ury-erp/ury/blob/develop/pos/src/pages/Orders.tsx): `pos/src/pages/Orders.tsx`
- [Captain table orders](https://github.com/ury-erp/ury/blob/develop/pos/src/captain/pages/CaptainOrder.tsx): `pos/src/captain/pages/CaptainOrder.tsx`
- [Table order context](https://github.com/ury-erp/ury/blob/develop/pos/src/captain/hooks/useTableOrderContext.ts): `pos/src/captain/hooks/useTableOrderContext.ts`
- [Legacy mobile POS](https://github.com/ury-erp/ury/blob/develop/urypos/src/App.vue): `urypos/src/App.vue`

### Self Ordering

- [Self-order app](https://github.com/ury-erp/ury/blob/develop/self-order/src/App.tsx): `self-order/src/App.tsx`
- [Ordering session](https://github.com/ury-erp/ury/blob/develop/self-order/src/hooks/useOrderingSession.ts): `self-order/src/hooks/useOrderingSession.ts`
- [Self-order API client](https://github.com/ury-erp/ury/blob/develop/self-order/src/lib/api.ts): `self-order/src/lib/api.ts`

### Kitchen Display

- [Kitchen display](https://github.com/ury-erp/ury/blob/develop/mosaic/src/App.vue): `mosaic/src/App.vue`
- [Kitchen queue views](https://github.com/ury-erp/ury/blob/develop/mosaic/src/views/Home.vue): `mosaic/src/views/Home.vue`

### URY Backend

- [Report services](https://github.com/ury-erp/ury/tree/develop/ury/ury/report_api): `ury/ury/report_api`
- [POS APIs](https://github.com/ury-erp/ury/blob/develop/ury/ury_pos/api.py): `ury/ury_pos/api.py`
- [Self-order services](https://github.com/ury-erp/ury/blob/develop/ury/ury/api/self_ordering.py): `ury/ury/api/self_ordering.py`
- [KOT & kitchen APIs](https://github.com/ury-erp/ury/blob/develop/ury/ury/api/ury_kot_display.py): `ury/ury/api/ury_kot_display.py`
- [Restaurant domain records](https://github.com/ury-erp/ury/tree/develop/ury/ury/doctype): `ury/ury/doctype`

### Other components

- **Restaurant staff**
- **ERPNext**

## Connections

- Restaurant staff → Admin portal: configures (evidence: `README.md`)
- Admin portal → Setup wizard: routes to (evidence: `frontend/src/App.tsx`)
- Admin portal → Restaurant configuration: routes to (evidence: `frontend/src/App.tsx`)
- Admin portal → Reports & analytics: routes to (evidence: `frontend/src/App.tsx`)
- Reports & analytics → Report services: requests data (evidence: `frontend/src/pages/Reports/ServiceWiseSales.tsx`)
- Restaurant staff → Cashier POS: processes orders (evidence: `README.md`)
- Cashier POS → Orders & billing: routes to (evidence: `pos/src/App.tsx`)
- Cashier POS → Captain table orders: routes to (evidence: `pos/src/App.tsx`)
- Cashier POS → POS state & operations: initializes (evidence: `pos/src/App.tsx`)
- Captain table orders → Table order context: loads context (evidence: `pos/src/captain/hooks/useTableOrderContext.ts`)
- POS state & operations → POS APIs: uses POS services (evidence: `pos/src/store/pos-store.ts`)
- Restaurant staff → Self-order app: places order (evidence: `README.md`)
- Self-order app → Ordering session: selects layout (evidence: `self-order/src/App.tsx`)
- Ordering session → Self-order API client: requests menu and orders (evidence: `self-order/src/hooks/useOrderingSession.ts`)
- Self-order API client → Self-order services: calls services (evidence: `README.md`)
- Restaurant staff → Kitchen display: monitors kitchen (evidence: `README.md`)
- Kitchen display → Kitchen queue views: renders (evidence: `mosaic/src/App.vue`)
- Kitchen queue views → KOT & kitchen APIs: receives order updates
- Cashier POS → KOT & kitchen APIs: sends kitchen tickets (evidence: `README.md`)
- Setup wizard → Restaurant domain records: configures records (evidence: `README.md`)
- Restaurant configuration → Restaurant domain records: manages records (evidence: `README.md`)
- POS APIs → Restaurant domain records: operates on records (evidence: `README.md`)
- Report services → Restaurant domain records: reports on records (evidence: `README.md`)
- Restaurant domain records → ERPNext: extends ERPNext (evidence: `README.md`)
- Restaurant staff → Legacy mobile POS: uses legacy client (evidence: `README.md`)
