# mannyivfouy/pos_ui_angular architecture

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

- Interactive diagram: https://gitdiagram.com/mannyivfouy/pos_ui_angular
- Repository: https://github.com/mannyivfouy/pos_ui_angular

## Overview

POSFrontend is an Angular point-of-sale interface. Users sign in, enter a role-gated workspace, and manage inventory and business records; the cashier workflow selects products, builds a cart, and records a sale. Purchasing, sales history, dashboard statistics, and profile management are separate capabilities. Feature components call domain services, which communicate with the configured API. The graph reflects routes and service calls where shown; unsampled modules and backend internals are represented only at the directory or external-service level.

Main entry points: [`src/app/app.routes.ts`](https://github.com/mannyivfouy/pos_ui_angular/blob/main/src/app/app.routes.ts) (Routes), [`src/app/features/sale/sale-form/sale-form.ts`](https://github.com/mannyivfouy/pos_ui_angular/blob/main/src/app/features/sale/sale-form/sale-form.ts) (Sale Entry), [`src/app/core/services/product.service.ts`](https://github.com/mannyivfouy/pos_ui_angular/blob/main/src/app/core/services/product.service.ts) (Product Service), [`src/app/features/purchase/purchase-form/purchase-form.ts`](https://github.com/mannyivfouy/pos_ui_angular/blob/main/src/app/features/purchase/purchase-form/purchase-form.ts) (Purchase Entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and Shell"]
  node_routes["Routes<br/>[app.routes.ts]"]
  node_login["Login<br/>[login.ts]"]
  node_layout["Main Layout<br/>[main-layout.ts]"]
  node_auth["Authentication<br/>[auth.service.ts]"]
end

subgraph group_operations["POS Operations"]
  node_dashboard["Dashboard<br/>[dashboard.ts]"]
  node_saleform["Sale Entry<br/>[sale-form.ts]"]
  node_saleshistory["Sales History"]
  node_sales["Sales Service<br/>[sale.service.ts]"]
  node_purchaseform["Purchase Entry<br/>[purchase-form.ts]"]
  node_purchasehistory["Purchase History"]
  node_purchases["Purchase Service"]
end

subgraph group_catalog["Catalog and Records"]
  node_products["Product Management"]
  node_productservice["Product Service<br/>[product.service.ts]"]
  node_categories["Categories"]
  node_customers["Customers"]
  node_suppliers["Suppliers"]
  node_users["User Administration"]
  node_profiles["Profile<br/>[profile.ts]"]
end

subgraph group_platform["API and Shared UI"]
  node_domainservices["Domain Services"]
  node_api{{"POS API"}}
  node_shared["Shared Components"]
end

node_user(("POS User"))

node_user -->|"navigates"| node_routes
node_routes -->|"routes to"| node_login
node_routes -->|"wraps workspace"| node_layout
node_routes -->|"routes to"| node_dashboard
node_routes -->|"routes to"| node_products
node_routes -->|"routes to"| node_categories
node_routes -->|"routes to"| node_customers
node_routes -->|"routes to"| node_suppliers
node_routes -->|"routes to"| node_users
node_routes -->|"routes to"| node_saleform
node_routes -->|"routes to"| node_saleshistory
node_routes -->|"routes to"| node_purchaseform
node_routes -->|"routes to"| node_purchasehistory
node_routes -->|"routes to"| node_profiles
node_login -->|"authenticates"| node_auth
node_saleform -->|"submits sale"| node_sales
node_saleform -->|"loads products"| node_productservice
node_saleform -->|"uses cart and payment UI"| node_shared
node_saleshistory -.->|"loads history"| node_sales
node_purchaseform -->|"submits purchase"| node_purchases
node_purchaseform -->|"loads products"| node_productservice
node_purchasehistory -->|"loads history"| node_purchases
node_products -->|"manages products"| node_productservice
node_products -->|"uses list UI"| node_shared
node_profiles -->|"uses user service"| node_domainservices
node_productservice -->|"requests product data"| node_api
node_auth -->|"sends login request"| node_api

click node_routes "https://github.com/mannyivfouy/pos_ui_angular/blob/main/src/app/app.routes.ts"
click node_login "https://github.com/mannyivfouy/pos_ui_angular/blob/main/src/app/features/auth/login/login.ts"
click node_layout "https://github.com/mannyivfouy/pos_ui_angular/blob/main/src/app/layout/main-layout/main-layout.ts"
click node_auth "https://github.com/mannyivfouy/pos_ui_angular/blob/main/src/app/core/services/auth.service.ts"
click node_dashboard "https://github.com/mannyivfouy/pos_ui_angular/blob/main/src/app/features/dashboard/dashboard.ts"
click node_saleform "https://github.com/mannyivfouy/pos_ui_angular/blob/main/src/app/features/sale/sale-form/sale-form.ts"
click node_saleshistory "https://github.com/mannyivfouy/pos_ui_angular/tree/main/src/app/features/sale/sale-history"
click node_sales "https://github.com/mannyivfouy/pos_ui_angular/blob/main/src/app/core/services/sale.service.ts"
click node_purchaseform "https://github.com/mannyivfouy/pos_ui_angular/blob/main/src/app/features/purchase/purchase-form/purchase-form.ts"
click node_purchasehistory "https://github.com/mannyivfouy/pos_ui_angular/blob/main/src/app/features/purchase/purchase-history/purchase-history.ts"
click node_purchases "https://github.com/mannyivfouy/pos_ui_angular/blob/main/src/app/core/services/purchase.service.ts"
click node_products "https://github.com/mannyivfouy/pos_ui_angular/tree/main/src/app/features/product"
click node_productservice "https://github.com/mannyivfouy/pos_ui_angular/blob/main/src/app/core/services/product.service.ts"
click node_categories "https://github.com/mannyivfouy/pos_ui_angular/tree/main/src/app/features/category"
click node_customers "https://github.com/mannyivfouy/pos_ui_angular/tree/main/src/app/features/customer"
click node_suppliers "https://github.com/mannyivfouy/pos_ui_angular/tree/main/src/app/features/supplier"
click node_users "https://github.com/mannyivfouy/pos_ui_angular/tree/main/src/app/features/user"
click node_profiles "https://github.com/mannyivfouy/pos_ui_angular/blob/main/src/app/features/profile/profile.ts"
click node_domainservices "https://github.com/mannyivfouy/pos_ui_angular/tree/main/src/app/core/services"
click node_shared "https://github.com/mannyivfouy/pos_ui_angular/tree/main/src/app/shared/components"

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_routes,node_login,node_layout,node_auth,node_user toneBlue
class node_dashboard,node_saleform,node_saleshistory,node_sales,node_purchaseform,node_purchasehistory,node_purchases toneAmber
class node_products,node_productservice,node_categories,node_customers,node_suppliers,node_users,node_profiles toneMint
class node_domainservices,node_api,node_shared toneRose
```

## Components

### Access and Shell

- [Routes](https://github.com/mannyivfouy/pos_ui_angular/blob/main/src/app/app.routes.ts): `src/app/app.routes.ts`
- [Login](https://github.com/mannyivfouy/pos_ui_angular/blob/main/src/app/features/auth/login/login.ts): `src/app/features/auth/login/login.ts`
- [Main Layout](https://github.com/mannyivfouy/pos_ui_angular/blob/main/src/app/layout/main-layout/main-layout.ts): `src/app/layout/main-layout/main-layout.ts`
- [Authentication](https://github.com/mannyivfouy/pos_ui_angular/blob/main/src/app/core/services/auth.service.ts): `src/app/core/services/auth.service.ts`

### POS Operations

- [Dashboard](https://github.com/mannyivfouy/pos_ui_angular/blob/main/src/app/features/dashboard/dashboard.ts): `src/app/features/dashboard/dashboard.ts`
- [Sale Entry](https://github.com/mannyivfouy/pos_ui_angular/blob/main/src/app/features/sale/sale-form/sale-form.ts): `src/app/features/sale/sale-form/sale-form.ts`
- [Sales History](https://github.com/mannyivfouy/pos_ui_angular/tree/main/src/app/features/sale/sale-history): `src/app/features/sale/sale-history`
- [Sales Service](https://github.com/mannyivfouy/pos_ui_angular/blob/main/src/app/core/services/sale.service.ts): `src/app/core/services/sale.service.ts`
- [Purchase Entry](https://github.com/mannyivfouy/pos_ui_angular/blob/main/src/app/features/purchase/purchase-form/purchase-form.ts): `src/app/features/purchase/purchase-form/purchase-form.ts`
- [Purchase History](https://github.com/mannyivfouy/pos_ui_angular/blob/main/src/app/features/purchase/purchase-history/purchase-history.ts): `src/app/features/purchase/purchase-history/purchase-history.ts`
- [Purchase Service](https://github.com/mannyivfouy/pos_ui_angular/blob/main/src/app/core/services/purchase.service.ts): `src/app/core/services/purchase.service.ts`

### Catalog and Records

- [Product Management](https://github.com/mannyivfouy/pos_ui_angular/tree/main/src/app/features/product): `src/app/features/product`
- [Product Service](https://github.com/mannyivfouy/pos_ui_angular/blob/main/src/app/core/services/product.service.ts): `src/app/core/services/product.service.ts`
- [Categories](https://github.com/mannyivfouy/pos_ui_angular/tree/main/src/app/features/category): `src/app/features/category`
- [Customers](https://github.com/mannyivfouy/pos_ui_angular/tree/main/src/app/features/customer): `src/app/features/customer`
- [Suppliers](https://github.com/mannyivfouy/pos_ui_angular/tree/main/src/app/features/supplier): `src/app/features/supplier`
- [User Administration](https://github.com/mannyivfouy/pos_ui_angular/tree/main/src/app/features/user): `src/app/features/user`
- [Profile](https://github.com/mannyivfouy/pos_ui_angular/blob/main/src/app/features/profile/profile.ts): `src/app/features/profile/profile.ts`

### API and Shared UI

- [Domain Services](https://github.com/mannyivfouy/pos_ui_angular/tree/main/src/app/core/services): `src/app/core/services`
- **POS API**
- [Shared Components](https://github.com/mannyivfouy/pos_ui_angular/tree/main/src/app/shared/components): `src/app/shared/components`

### Other components

- **POS User**

## Connections

- POS User → Routes: navigates (evidence: `src/app/app.routes.ts`)
- Routes → Login: routes to (evidence: `src/app/app.routes.ts`)
- Routes → Main Layout: wraps workspace (evidence: `src/app/app.routes.ts`)
- Routes → Dashboard: routes to (evidence: `src/app/app.routes.ts`)
- Routes → Product Management: routes to (evidence: `src/app/app.routes.ts`)
- Routes → Categories: routes to (evidence: `src/app/app.routes.ts`)
- Routes → Customers: routes to (evidence: `src/app/app.routes.ts`)
- Routes → Suppliers: routes to (evidence: `src/app/app.routes.ts`)
- Routes → User Administration: routes to (evidence: `src/app/app.routes.ts`)
- Routes → Sale Entry: routes to (evidence: `src/app/app.routes.ts`)
- Routes → Sales History: routes to (evidence: `src/app/app.routes.ts`)
- Routes → Purchase Entry: routes to (evidence: `src/app/app.routes.ts`)
- Routes → Purchase History: routes to (evidence: `src/app/app.routes.ts`)
- Routes → Profile: routes to (evidence: `src/app/app.routes.ts`)
- Login → Authentication: authenticates (evidence: `src/app/core/services/auth.service.ts`)
- Sale Entry → Sales Service: submits sale (evidence: `src/app/features/sale/sale-form/sale-form.ts`)
- Sale Entry → Product Service: loads products (evidence: `src/app/features/sale/sale-form/sale-form.ts`)
- Sale Entry → Shared Components: uses cart and payment UI (evidence: `src/app/features/sale/sale-form/sale-form.ts`)
- Sales History → Sales Service: loads history
- Purchase Entry → Purchase Service: submits purchase (evidence: `src/app/features/purchase/purchase-form/purchase-form.ts`)
- Purchase Entry → Product Service: loads products (evidence: `src/app/features/purchase/purchase-form/purchase-form.ts`)
- Purchase History → Purchase Service: loads history (evidence: `src/app/features/purchase/purchase-history/purchase-history.ts`)
- Product Management → Product Service: manages products (evidence: `src/app/features/product/product-list/product-list.ts`)
- Product Management → Shared Components: uses list UI (evidence: `src/app/features/product/product-list/product-list.ts`)
- Profile → Domain Services: uses user service (evidence: `src/app/features/profile/profile.ts`)
- Product Service → POS API: requests product data (evidence: `src/app/core/services/product.service.ts`)
- Authentication → POS API: sends login request (evidence: `src/app/core/services/auth.service.ts`)
