# geniussjack/cashierwebapp architecture

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

- Interactive diagram: https://gitdiagram.com/geniussjack/cashierwebapp
- Repository: https://github.com/geniussjack/cashierwebapp

## Overview

CashierWebApp is a small ASP.NET Core cashier application. Its visible HTTP workflow accepts product entries at the print endpoint, formats receipt lines, and returns them to the caller. Separately, CashboxDriver wraps a cash-register device for sales, refunds, and daily reports; no shown controller invokes it. Startup maps controllers, while the sampled configuration does not map Razor Pages. The device connection is visible in the driver, but its underlying hardware/library behavior is outside the excerpts.

Main entry points: [`CashierController.cs`](https://github.com/geniussjack/cashierwebapp/blob/master/CashierController.cs) (Receipt endpoint), [`CashboxDriver.cs`](https://github.com/geniussjack/cashierwebapp/blob/master/CashboxDriver.cs) (Register operations), [`Startup.cs`](https://github.com/geniussjack/cashierwebapp/blob/master/Startup.cs) (Controller routing), [`Product.cs`](https://github.com/geniussjack/cashierwebapp/blob/master/Product.cs) (Product data)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web API"]
  node_host["Web host<br/>[Program.cs]"]
  node_routing["Controller routing<br/>[Startup.cs]"]
  node_receipt["Receipt endpoint"]
end

subgraph group_domain["Cashier Domain"]
  node_products["Product data<br/>[Product.cs]"]
end

subgraph group_device["Cash Register"]
  node_driver["Register operations<br/>[CashboxDriver.cs]"]
end

node_cashier(("API caller"))
node_cashregister["Cash register"]

node_cashier -->|"posts products"| node_receipt
node_receipt -->|"reads product fields"| node_products
node_receipt -->|"returns receipt lines"| node_cashier
node_host -->|"uses startup"| node_routing
node_routing -->|"maps controllers"| node_receipt
node_driver -->|"processes products"| node_products
node_driver -->|"connects and operates"| node_cashregister

click node_host "https://github.com/geniussjack/cashierwebapp/blob/master/Program.cs"
click node_routing "https://github.com/geniussjack/cashierwebapp/blob/master/Startup.cs"
click node_receipt "https://github.com/geniussjack/cashierwebapp/blob/master/CashierController.cs"
click node_products "https://github.com/geniussjack/cashierwebapp/blob/master/Product.cs"
click node_driver "https://github.com/geniussjack/cashierwebapp/blob/master/CashboxDriver.cs"

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_host,node_routing,node_receipt toneBlue
class node_products toneAmber
class node_driver,node_cashier toneMint
class node_cashregister toneIndigo
```

## Components

### Web API

- [Web host](https://github.com/geniussjack/cashierwebapp/blob/master/Program.cs): `Program.cs`
- [Controller routing](https://github.com/geniussjack/cashierwebapp/blob/master/Startup.cs): `Startup.cs`
- [Receipt endpoint](https://github.com/geniussjack/cashierwebapp/blob/master/CashierController.cs): `CashierController.cs`

### Cashier Domain

- [Product data](https://github.com/geniussjack/cashierwebapp/blob/master/Product.cs): `Product.cs`

### Cash Register

- [Register operations](https://github.com/geniussjack/cashierwebapp/blob/master/CashboxDriver.cs): `CashboxDriver.cs`

### Other components

- **API caller**
- **Cash register**

## Connections

- API caller → Receipt endpoint: posts products (evidence: `CashierController.cs`)
- Receipt endpoint → Product data: reads product fields (evidence: `CashierController.cs`)
- Receipt endpoint → API caller: returns receipt lines (evidence: `CashierController.cs`)
- Web host → Controller routing: uses startup (evidence: `Program.cs`)
- Controller routing → Receipt endpoint: maps controllers (evidence: `Startup.cs`)
- Register operations → Product data: processes products (evidence: `CashboxDriver.cs`)
- Register operations → Cash register: connects and operates (evidence: `CashboxDriver.cs`)
