# itsdoritos/tieuluandsa architecture

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

- Interactive diagram: https://gitdiagram.com/itsdoritos/tieuluandsa
- Repository: https://github.com/itsdoritos/tieuluandsa

## Overview

A small C command-line product-inventory manager. The user selects operations in a menu to add, display, delete, load, search, edit, and sort products; the program stores products in a linked list and reads or writes product data to files. The source also contains inventory statistics and edit-history saving. The README gives no further product detail, and the source excerpt omits some menu and helper code, so uncertain call wiring is left out.

Main entry points: [`d/qlsieuthilinked.c`](https://github.com/itsdoritos/tieuluandsa/blob/main/d/qlsieuthilinked.c) (Menu loop), [`d/products.txt`](https://github.com/itsdoritos/tieuluandsa/blob/main/d/products.txt) (Product data)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Menu interface"]
  node_cli["Menu loop<br/>[qlsieuthilinked.c]"]
end

subgraph group_inventory["Inventory operations"]
  node_add["Add product<br/>[qlsieuthilinked.c]"]
  node_display["Display products<br/>[qlsieuthilinked.c]"]
  node_delete["Delete product<br/>[qlsieuthilinked.c]"]
  node_search["Search product<br/>[qlsieuthilinked.c]"]
  node_edit["Edit product<br/>[qlsieuthilinked.c]"]
  node_sort["Sort products<br/>[qlsieuthilinked.c]"]
  node_stats["Inventory statistics<br/>[qlsieuthilinked.c]"]
  node_list["Linked list<br/>[qlsieuthilinked.c]"]
end

subgraph group_storage["Product storage"]
  node_fileops["File operations<br/>[qlsieuthilinked.c]"]
  node_products["Product data<br/>[products.txt]"]
  node_history["Edit history file"]
end

node_user(("User"))

node_user -->|"selects operation"| node_cli
node_cli -->|"dispatches"| node_add
node_cli -->|"dispatches"| node_display
node_cli -->|"dispatches"| node_delete
node_cli -->|"dispatches"| node_search
node_cli -->|"dispatches"| node_edit
node_cli -->|"dispatches"| node_sort
node_cli -->|"dispatches"| node_stats
node_add -->|"updates"| node_list
node_display -->|"reads"| node_list
node_delete -->|"updates"| node_list
node_search -->|"searches"| node_list
node_edit -->|"updates"| node_list
node_sort -->|"reorders"| node_list
node_stats -->|"reads"| node_list
node_add -->|"saves"| node_fileops
node_edit -->|"saves"| node_fileops
node_fileops -->|"writes"| node_products
node_cli -->|"loads"| node_fileops
node_fileops -->|"populates"| node_list
node_fileops -->|"reads"| node_products
node_edit -->|"records edit"| node_history

click node_cli "https://github.com/itsdoritos/tieuluandsa/blob/main/d/qlsieuthilinked.c"
click node_add "https://github.com/itsdoritos/tieuluandsa/blob/main/d/qlsieuthilinked.c"
click node_display "https://github.com/itsdoritos/tieuluandsa/blob/main/d/qlsieuthilinked.c"
click node_delete "https://github.com/itsdoritos/tieuluandsa/blob/main/d/qlsieuthilinked.c"
click node_search "https://github.com/itsdoritos/tieuluandsa/blob/main/d/qlsieuthilinked.c"
click node_edit "https://github.com/itsdoritos/tieuluandsa/blob/main/d/qlsieuthilinked.c"
click node_sort "https://github.com/itsdoritos/tieuluandsa/blob/main/d/qlsieuthilinked.c"
click node_stats "https://github.com/itsdoritos/tieuluandsa/blob/main/d/qlsieuthilinked.c"
click node_list "https://github.com/itsdoritos/tieuluandsa/blob/main/d/qlsieuthilinked.c"
click node_fileops "https://github.com/itsdoritos/tieuluandsa/blob/main/d/qlsieuthilinked.c"
click node_products "https://github.com/itsdoritos/tieuluandsa/blob/main/d/products.txt"

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_cli,node_user toneBlue
class node_add,node_display,node_delete,node_search,node_edit,node_sort,node_stats,node_list toneAmber
class node_fileops,node_products,node_history toneMint
```

## Components

### Menu interface

- [Menu loop](https://github.com/itsdoritos/tieuluandsa/blob/main/d/qlsieuthilinked.c): `d/qlsieuthilinked.c`

### Inventory operations

- [Add product](https://github.com/itsdoritos/tieuluandsa/blob/main/d/qlsieuthilinked.c): `d/qlsieuthilinked.c`
- [Display products](https://github.com/itsdoritos/tieuluandsa/blob/main/d/qlsieuthilinked.c): `d/qlsieuthilinked.c`
- [Delete product](https://github.com/itsdoritos/tieuluandsa/blob/main/d/qlsieuthilinked.c): `d/qlsieuthilinked.c`
- [Search product](https://github.com/itsdoritos/tieuluandsa/blob/main/d/qlsieuthilinked.c): `d/qlsieuthilinked.c`
- [Edit product](https://github.com/itsdoritos/tieuluandsa/blob/main/d/qlsieuthilinked.c): `d/qlsieuthilinked.c`
- [Sort products](https://github.com/itsdoritos/tieuluandsa/blob/main/d/qlsieuthilinked.c): `d/qlsieuthilinked.c`
- [Inventory statistics](https://github.com/itsdoritos/tieuluandsa/blob/main/d/qlsieuthilinked.c): `d/qlsieuthilinked.c`
- [Linked list](https://github.com/itsdoritos/tieuluandsa/blob/main/d/qlsieuthilinked.c): `d/qlsieuthilinked.c`

### Product storage

- [File operations](https://github.com/itsdoritos/tieuluandsa/blob/main/d/qlsieuthilinked.c): `d/qlsieuthilinked.c`
- [Product data](https://github.com/itsdoritos/tieuluandsa/blob/main/d/products.txt): `d/products.txt`
- **Edit history file**

### Other components

- **User**

## Connections

- User → Menu loop: selects operation
- Menu loop → Add product: dispatches
- Menu loop → Display products: dispatches
- Menu loop → Delete product: dispatches
- Menu loop → Search product: dispatches
- Menu loop → Edit product: dispatches
- Menu loop → Sort products: dispatches
- Menu loop → Inventory statistics: dispatches
- Add product → Linked list: updates
- Display products → Linked list: reads
- Delete product → Linked list: updates
- Search product → Linked list: searches
- Edit product → Linked list: updates
- Sort products → Linked list: reorders
- Inventory statistics → Linked list: reads
- Add product → File operations: saves
- Edit product → File operations: saves
- File operations → Product data: writes
- Menu loop → File operations: loads
- File operations → Linked list: populates
- File operations → Product data: reads
- Edit product → Edit history file: records edit
