# yinch10/ldcw6123-shopee-voucher-system architecture

> Architecture diagram of the GitHub repository yinch10/ldcw6123-shopee-voucher-system, 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/yinch10/ldcw6123-shopee-voucher-system
- Repository: https://github.com/yinch10/ldcw6123-shopee-voucher-system

## Overview

A small interactive C++ voucher CLI: users can list vouchers, filter by category, and claim by ID. `main.cpp` seeds an in-memory voucher collection and dispatches menu choices to these operations; claiming updates the voucher’s claimed status. All behavior is implemented in the single sampled source file.

Main entry points: [`main.cpp`](https://github.com/yinch10/ldcw6123-shopee-voucher-system/blob/main/main.cpp) (Menu loop)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_user(("CLI user"))
node_main_loop["Menu loop<br/>[main.cpp]"]
node_voucher_collection["Voucher collection<br/>[main.cpp]"]
node_menu_display["Menu display<br/>[main.cpp]"]
node_list_vouchers["List vouchers<br/>[main.cpp]"]
node_category_filter["Category filter<br/>[main.cpp]"]
node_claim_voucher["Claim voucher<br/>[main.cpp]"]

node_user -->|"enters choices"| node_main_loop
node_main_loop -->|"prompts and reports"| node_user
node_main_loop -->|"initializes"| node_voucher_collection
node_main_loop -->|"calls"| node_menu_display
node_main_loop -->|"dispatches"| node_list_vouchers
node_main_loop -->|"dispatches"| node_category_filter
node_main_loop -->|"dispatches"| node_claim_voucher
node_list_vouchers -->|"reads"| node_voucher_collection
node_category_filter -->|"filters"| node_voucher_collection
node_claim_voucher -->|"reads and updates"| node_voucher_collection

click node_main_loop "https://github.com/yinch10/ldcw6123-shopee-voucher-system/blob/main/main.cpp"
click node_voucher_collection "https://github.com/yinch10/ldcw6123-shopee-voucher-system/blob/main/main.cpp"
click node_menu_display "https://github.com/yinch10/ldcw6123-shopee-voucher-system/blob/main/main.cpp"
click node_list_vouchers "https://github.com/yinch10/ldcw6123-shopee-voucher-system/blob/main/main.cpp"
click node_category_filter "https://github.com/yinch10/ldcw6123-shopee-voucher-system/blob/main/main.cpp"
click node_claim_voucher "https://github.com/yinch10/ldcw6123-shopee-voucher-system/blob/main/main.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_user toneBlue
class node_main_loop,node_voucher_collection,node_menu_display,node_list_vouchers,node_category_filter,node_claim_voucher toneTeal
```

## Components

### Other components

- **CLI user**
- [Menu loop](https://github.com/yinch10/ldcw6123-shopee-voucher-system/blob/main/main.cpp): `main.cpp`
- [Voucher collection](https://github.com/yinch10/ldcw6123-shopee-voucher-system/blob/main/main.cpp): `main.cpp`
- [Menu display](https://github.com/yinch10/ldcw6123-shopee-voucher-system/blob/main/main.cpp): `main.cpp`
- [List vouchers](https://github.com/yinch10/ldcw6123-shopee-voucher-system/blob/main/main.cpp): `main.cpp`
- [Category filter](https://github.com/yinch10/ldcw6123-shopee-voucher-system/blob/main/main.cpp): `main.cpp`
- [Claim voucher](https://github.com/yinch10/ldcw6123-shopee-voucher-system/blob/main/main.cpp): `main.cpp`

## Connections

- CLI user → Menu loop: enters choices
- Menu loop → CLI user: prompts and reports
- Menu loop → Voucher collection: initializes
- Menu loop → Menu display: calls
- Menu loop → List vouchers: dispatches
- Menu loop → Category filter: dispatches
- Menu loop → Claim voucher: dispatches
- List vouchers → Voucher collection: reads
- Category filter → Voucher collection: filters
- Claim voucher → Voucher collection: reads and updates
