# isayagudule-wq/mamaneema architecture

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

- Interactive diagram: https://gitdiagram.com/isayagudule-wq/mamaneema
- Repository: https://github.com/isayagudule-wq/mamaneema

## Overview

Mama Neema’s Shop is a menu-driven, in-memory C++ shop application. The main workflow is the cashier entering basket items, validating stock, calculating discounts and rounded totals, accepting payment, issuing change, and committing stock and daily sales totals. The same program also supports product management and end-of-day reporting. The standalone A and B files are exercise programs rather than runtime services, so they are represented as a separate learning branch. The shop excerpt is partial; edges reflect only visible calls or README-described behavior.

Main entry points: [`shop.cpp`](https://github.com/isayagudule-wq/mamaneema/blob/main/shop.cpp) (Sale workflow), [`a1.cpp`](https://github.com/isayagudule-wq/mamaneema/blob/main/a1.cpp) (Basket receipt example), [`a2.cpp`](https://github.com/isayagudule-wq/mamaneema/blob/main/a2.cpp) (Discount ordering example), [`a3.cpp`](https://github.com/isayagudule-wq/mamaneema/blob/main/a3.cpp) (Stock validation example)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shop["Shop runtime"]
  node_menu["Shop menu<br/>[shop.cpp]"]
  node_products["Product catalog<br/>[shop.cpp]"]
  node_product_admin["Product management<br/>[shop.cpp]"]
  node_sale["Sale workflow<br/>[shop.cpp]"]
  node_basket_validation["Basket stock checks<br/>[shop.cpp]"]
  node_pricing["Discount calculation<br/>[shop.cpp]"]
  node_payment["Payment validation<br/>[shop.cpp]"]
  node_change["Change breakdown<br/>[shop.cpp]"]
  node_sales_state[("Sales and stock state<br/>[shop.cpp]")]
  node_report["End-of-day report<br/>[shop.cpp]"]
end

subgraph group_exercises["Standalone exercises"]
  node_a1["Basket receipt example<br/>[a1.cpp]"]
  node_a2["Discount ordering example<br/>[a2.cpp]"]
  node_a3["Stock validation example<br/>[a3.cpp]"]
  node_a4["Change example<br/>[a4.cpp]"]
  node_b_examples["C++ concept examples<br/>[b1.cpp]"]
  node_b2["Percentage arithmetic<br/>[b2.cpp]"]
  node_b3["Rounding example<br/>[b3.cpp]"]
  node_b4["Stock iteration example<br/>[b4.cpp]"]
  node_b5["Name matching example<br/>[b5.cpp]"]
  node_b6["Menu input example<br/>[b6.cpp]"]
  node_b7["Product data example<br/>[b7.cpp]"]
  node_b8["Reference semantics<br/>[b8.cpp]"]
end

node_cashier(("Cashier"))

node_cashier -->|"selects options"| node_menu
node_menu -->|"offers management"| node_product_admin
node_menu -->|"starts sale"| node_sale
node_menu -->|"shows report"| node_report
node_product_admin -->|"updates catalog"| node_products
node_sale -->|"looks up items"| node_products
node_sale -->|"checks quantities"| node_basket_validation
node_sale -->|"calculates total"| node_pricing
node_sale -->|"validates payment"| node_payment
node_sale -->|"prints change"| node_change
node_sale -->|"commits sale"| node_sales_state
node_report -->|"reads totals"| node_sales_state
node_cashier -.->|"runs example"| node_a1
node_cashier -.->|"runs example"| node_a2
node_cashier -.->|"runs example"| node_a3
node_cashier -.->|"runs example"| node_a4
node_cashier -.->|"runs exercise"| node_b_examples
node_cashier -.->|"runs exercise"| node_b2
node_cashier -.->|"runs exercise"| node_b3
node_cashier -.->|"runs exercise"| node_b4
node_cashier -.->|"runs exercise"| node_b5
node_cashier -.->|"runs exercise"| node_b6
node_cashier -.->|"runs exercise"| node_b7
node_cashier -.->|"runs exercise"| node_b8

click node_menu "https://github.com/isayagudule-wq/mamaneema/blob/main/shop.cpp"
click node_products "https://github.com/isayagudule-wq/mamaneema/blob/main/shop.cpp"
click node_product_admin "https://github.com/isayagudule-wq/mamaneema/blob/main/shop.cpp"
click node_sale "https://github.com/isayagudule-wq/mamaneema/blob/main/shop.cpp"
click node_basket_validation "https://github.com/isayagudule-wq/mamaneema/blob/main/shop.cpp"
click node_pricing "https://github.com/isayagudule-wq/mamaneema/blob/main/shop.cpp"
click node_payment "https://github.com/isayagudule-wq/mamaneema/blob/main/shop.cpp"
click node_change "https://github.com/isayagudule-wq/mamaneema/blob/main/shop.cpp"
click node_sales_state "https://github.com/isayagudule-wq/mamaneema/blob/main/shop.cpp"
click node_report "https://github.com/isayagudule-wq/mamaneema/blob/main/shop.cpp"
click node_a1 "https://github.com/isayagudule-wq/mamaneema/blob/main/a1.cpp"
click node_a2 "https://github.com/isayagudule-wq/mamaneema/blob/main/a2.cpp"
click node_a3 "https://github.com/isayagudule-wq/mamaneema/blob/main/a3.cpp"
click node_a4 "https://github.com/isayagudule-wq/mamaneema/blob/main/a4.cpp"
click node_b_examples "https://github.com/isayagudule-wq/mamaneema/blob/main/b1.cpp"
click node_b2 "https://github.com/isayagudule-wq/mamaneema/blob/main/b2.cpp"
click node_b3 "https://github.com/isayagudule-wq/mamaneema/blob/main/b3.cpp"
click node_b4 "https://github.com/isayagudule-wq/mamaneema/blob/main/b4.cpp"
click node_b5 "https://github.com/isayagudule-wq/mamaneema/blob/main/b5.cpp"
click node_b6 "https://github.com/isayagudule-wq/mamaneema/blob/main/b6.cpp"
click node_b7 "https://github.com/isayagudule-wq/mamaneema/blob/main/b7.cpp"
click node_b8 "https://github.com/isayagudule-wq/mamaneema/blob/main/b8.cpp"

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_menu,node_products,node_product_admin,node_sale,node_basket_validation,node_pricing,node_payment,node_change,node_sales_state,node_report toneBlue
class node_a1,node_a2,node_a3,node_a4,node_b_examples,node_b2,node_b3,node_b4,node_b5,node_b6,node_b7,node_b8 toneAmber
class node_cashier toneIndigo
```

## Components

### Shop runtime

- [Shop menu](https://github.com/isayagudule-wq/mamaneema/blob/main/shop.cpp): `shop.cpp`
- [Product catalog](https://github.com/isayagudule-wq/mamaneema/blob/main/shop.cpp): `shop.cpp`
- [Product management](https://github.com/isayagudule-wq/mamaneema/blob/main/shop.cpp): `shop.cpp`
- [Sale workflow](https://github.com/isayagudule-wq/mamaneema/blob/main/shop.cpp): `shop.cpp`
- [Basket stock checks](https://github.com/isayagudule-wq/mamaneema/blob/main/shop.cpp): `shop.cpp`
- [Discount calculation](https://github.com/isayagudule-wq/mamaneema/blob/main/shop.cpp): `shop.cpp`
- [Payment validation](https://github.com/isayagudule-wq/mamaneema/blob/main/shop.cpp): `shop.cpp`
- [Change breakdown](https://github.com/isayagudule-wq/mamaneema/blob/main/shop.cpp): `shop.cpp`
- [Sales and stock state](https://github.com/isayagudule-wq/mamaneema/blob/main/shop.cpp): `shop.cpp`
- [End-of-day report](https://github.com/isayagudule-wq/mamaneema/blob/main/shop.cpp): `shop.cpp`

### Standalone exercises

- [Basket receipt example](https://github.com/isayagudule-wq/mamaneema/blob/main/a1.cpp): `a1.cpp`
- [Discount ordering example](https://github.com/isayagudule-wq/mamaneema/blob/main/a2.cpp): `a2.cpp`
- [Stock validation example](https://github.com/isayagudule-wq/mamaneema/blob/main/a3.cpp): `a3.cpp`
- [Change example](https://github.com/isayagudule-wq/mamaneema/blob/main/a4.cpp): `a4.cpp`
- [C++ concept examples](https://github.com/isayagudule-wq/mamaneema/blob/main/b1.cpp): `b1.cpp`
- [Percentage arithmetic](https://github.com/isayagudule-wq/mamaneema/blob/main/b2.cpp): `b2.cpp`
- [Rounding example](https://github.com/isayagudule-wq/mamaneema/blob/main/b3.cpp): `b3.cpp`
- [Stock iteration example](https://github.com/isayagudule-wq/mamaneema/blob/main/b4.cpp): `b4.cpp`
- [Name matching example](https://github.com/isayagudule-wq/mamaneema/blob/main/b5.cpp): `b5.cpp`
- [Menu input example](https://github.com/isayagudule-wq/mamaneema/blob/main/b6.cpp): `b6.cpp`
- [Product data example](https://github.com/isayagudule-wq/mamaneema/blob/main/b7.cpp): `b7.cpp`
- [Reference semantics](https://github.com/isayagudule-wq/mamaneema/blob/main/b8.cpp): `b8.cpp`

### Other components

- **Cashier**

## Connections

- Cashier → Shop menu: selects options (evidence: `README.md`)
- Shop menu → Product management: offers management (evidence: `shop.cpp`)
- Shop menu → Sale workflow: starts sale (evidence: `shop.cpp`)
- Shop menu → End-of-day report: shows report (evidence: `shop.cpp`)
- Product management → Product catalog: updates catalog (evidence: `shop.cpp`)
- Sale workflow → Product catalog: looks up items (evidence: `shop.cpp`)
- Sale workflow → Basket stock checks: checks quantities (evidence: `shop.cpp`)
- Sale workflow → Discount calculation: calculates total (evidence: `shop.cpp`)
- Sale workflow → Payment validation: validates payment (evidence: `shop.cpp`)
- Sale workflow → Change breakdown: prints change (evidence: `shop.cpp`)
- Sale workflow → Sales and stock state: commits sale (evidence: `shop.cpp`)
- End-of-day report → Sales and stock state: reads totals (evidence: `shop.cpp`)
- Cashier → Basket receipt example: runs example (evidence: `README.md`)
- Cashier → Discount ordering example: runs example (evidence: `README.md`)
- Cashier → Stock validation example: runs example (evidence: `README.md`)
- Cashier → Change example: runs example (evidence: `README.md`)
- Cashier → C++ concept examples: runs exercise (evidence: `README.md`)
- Cashier → Percentage arithmetic: runs exercise (evidence: `README.md`)
- Cashier → Rounding example: runs exercise (evidence: `README.md`)
- Cashier → Stock iteration example: runs exercise (evidence: `README.md`)
- Cashier → Name matching example: runs exercise (evidence: `README.md`)
- Cashier → Menu input example: runs exercise (evidence: `README.md`)
- Cashier → Product data example: runs exercise (evidence: `README.md`)
- Cashier → Reference semantics: runs exercise (evidence: `README.md`)
