# vicchz/inf1103_labs architecture

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

- Interactive diagram: https://gitdiagram.com/vicchz/inf1103_labs
- Repository: https://github.com/vicchz/inf1103_labs

## Overview

This repository is a collection of weekly Python lab exercises, not one integrated application. The clearest product workflow is the later inventory CLI: load product records, let a user list, add, search, or update them, then save the inventory. The product model branches into physical and digital products; Week 10 also adds supplier and order concepts. Separate auditor and inventory-manager exercises are represented as independent branches. Some Week 10 modules are indexed but not excerpted, so their internal behavior and connections are not inferred.

Main entry points: [`Week_10lab/Main.py`](https://github.com/vicchz/inf1103_labs/blob/master/Week_10lab/Main.py) (Inventory Menu), [`Week_10lab/product_class.py`](https://github.com/vicchz/inf1103_labs/blob/master/Week_10lab/product_class.py) (Product Base), [`Week_10lab/Physical_product.py`](https://github.com/vicchz/inf1103_labs/blob/master/Week_10lab/Physical_product.py) (Physical Product), [`Week_8lab/main.py`](https://github.com/vicchz/inf1103_labs/blob/master/Week_8lab/main.py) (Earlier Inventory CLI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_inventory["Inventory CLI"]
  node_cli["Inventory Menu<br/>[Main.py]"]
  node_inventory_records["Inventory Records<br/>[inventory.json]"]
  node_inventory["Inventory<br/>[inventory.py]"]
  node_legacy_cli["Earlier Inventory CLI<br/>[main.py]"]
  node_legacy_inventory["Earlier Inventory<br/>[iventory.py]"]
end

subgraph group_products["Product Domain"]
  node_base_product["Product Base<br/>[product_class.py]"]
  node_physical["Physical Product"]
  node_digital["Digital Product<br/>[Digital_product.py]"]
  node_shipping["Shipping Contract<br/>[can_be_ship.py]"]
  node_supplier["Supplier<br/>[supplier.py]"]
  node_legacy_product["Earlier Product<br/>[retry.py]"]
end

subgraph group_orders["Orders"]
  node_orders["Order<br/>[order.py]"]
  node_order_line["Order Line<br/>[order_line.py]"]
end

subgraph group_auditing["Audit Exercises"]
  node_auditor["Auditor<br/>[auditor.py]"]
  node_modular_auditor["Modular Auditor<br/>[modular_auditor.py]"]
  node_persistent_auditor["Persistent Auditor"]
  node_inventory_manager["Inventory Manager"]
end

node_user(("User"))

node_user -->|"uses"| node_cli
node_cli -->|"loads and saves"| node_inventory_records
node_cli -->|"manages"| node_inventory
node_cli -->|"creates"| node_physical
node_cli -->|"creates"| node_digital
node_inventory -->|"uses product interface"| node_base_product
node_physical -->|"extends"| node_base_product
node_physical -->|"implements"| node_shipping
node_physical -->|"uses"| node_supplier
node_digital -->|"extends"| node_base_product
node_orders -->|"uses"| node_order_line
node_orders -->|"references"| node_base_product
node_order_line -->|"references"| node_base_product
node_user -->|"uses"| node_legacy_cli
node_legacy_cli -->|"manages"| node_legacy_inventory
node_legacy_cli -->|"creates"| node_legacy_product

click node_cli "https://github.com/vicchz/inf1103_labs/blob/master/Week_10lab/Main.py"
click node_inventory_records "https://github.com/vicchz/inf1103_labs/blob/master/Week_10lab/inventory.json"
click node_inventory "https://github.com/vicchz/inf1103_labs/blob/master/Week_10lab/inventory.py"
click node_base_product "https://github.com/vicchz/inf1103_labs/blob/master/Week_10lab/product_class.py"
click node_physical "https://github.com/vicchz/inf1103_labs/blob/master/Week_10lab/Physical_product.py"
click node_digital "https://github.com/vicchz/inf1103_labs/blob/master/Week_10lab/Digital_product.py"
click node_shipping "https://github.com/vicchz/inf1103_labs/blob/master/Week_10lab/can_be_ship.py"
click node_supplier "https://github.com/vicchz/inf1103_labs/blob/master/Week_10lab/supplier.py"
click node_orders "https://github.com/vicchz/inf1103_labs/blob/master/Week_10lab/order.py"
click node_order_line "https://github.com/vicchz/inf1103_labs/blob/master/Week_10lab/order_line.py"
click node_auditor "https://github.com/vicchz/inf1103_labs/blob/master/Week_2lab/auditor.py"
click node_modular_auditor "https://github.com/vicchz/inf1103_labs/blob/master/Week_3lab/modular_auditor.py"
click node_persistent_auditor "https://github.com/vicchz/inf1103_labs/blob/master/Week_4lab/persistent_auditor.py"
click node_inventory_manager "https://github.com/vicchz/inf1103_labs/blob/master/Week_5lab/inventory_manager.py"
click node_legacy_cli "https://github.com/vicchz/inf1103_labs/blob/master/Week_8lab/main.py"
click node_legacy_inventory "https://github.com/vicchz/inf1103_labs/blob/master/Week_8lab/iventory.py"
click node_legacy_product "https://github.com/vicchz/inf1103_labs/blob/master/Week_8lab/retry.py"

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_inventory_records,node_inventory,node_legacy_cli,node_legacy_inventory,node_user toneBlue
class node_base_product,node_physical,node_digital,node_shipping,node_supplier,node_legacy_product toneAmber
class node_orders,node_order_line toneMint
class node_auditor,node_modular_auditor,node_persistent_auditor,node_inventory_manager toneRose
```

## Components

### Inventory CLI

- [Inventory Menu](https://github.com/vicchz/inf1103_labs/blob/master/Week_10lab/Main.py): `Week_10lab/Main.py`
- [Inventory Records](https://github.com/vicchz/inf1103_labs/blob/master/Week_10lab/inventory.json): `Week_10lab/inventory.json`
- [Inventory](https://github.com/vicchz/inf1103_labs/blob/master/Week_10lab/inventory.py): `Week_10lab/inventory.py`
- [Earlier Inventory CLI](https://github.com/vicchz/inf1103_labs/blob/master/Week_8lab/main.py): `Week_8lab/main.py`
- [Earlier Inventory](https://github.com/vicchz/inf1103_labs/blob/master/Week_8lab/iventory.py): `Week_8lab/iventory.py`

### Product Domain

- [Product Base](https://github.com/vicchz/inf1103_labs/blob/master/Week_10lab/product_class.py): `Week_10lab/product_class.py`
- [Physical Product](https://github.com/vicchz/inf1103_labs/blob/master/Week_10lab/Physical_product.py): `Week_10lab/Physical_product.py`
- [Digital Product](https://github.com/vicchz/inf1103_labs/blob/master/Week_10lab/Digital_product.py): `Week_10lab/Digital_product.py`
- [Shipping Contract](https://github.com/vicchz/inf1103_labs/blob/master/Week_10lab/can_be_ship.py): `Week_10lab/can_be_ship.py`
- [Supplier](https://github.com/vicchz/inf1103_labs/blob/master/Week_10lab/supplier.py): `Week_10lab/supplier.py`
- [Earlier Product](https://github.com/vicchz/inf1103_labs/blob/master/Week_8lab/retry.py): `Week_8lab/retry.py`

### Orders

- [Order](https://github.com/vicchz/inf1103_labs/blob/master/Week_10lab/order.py): `Week_10lab/order.py`
- [Order Line](https://github.com/vicchz/inf1103_labs/blob/master/Week_10lab/order_line.py): `Week_10lab/order_line.py`

### Audit Exercises

- [Auditor](https://github.com/vicchz/inf1103_labs/blob/master/Week_2lab/auditor.py): `Week_2lab/auditor.py`
- [Modular Auditor](https://github.com/vicchz/inf1103_labs/blob/master/Week_3lab/modular_auditor.py): `Week_3lab/modular_auditor.py`
- [Persistent Auditor](https://github.com/vicchz/inf1103_labs/blob/master/Week_4lab/persistent_auditor.py): `Week_4lab/persistent_auditor.py`
- [Inventory Manager](https://github.com/vicchz/inf1103_labs/blob/master/Week_5lab/inventory_manager.py): `Week_5lab/inventory_manager.py`

### Other components

- **User**

## Connections

- User → Inventory Menu: uses (evidence: `Week_10lab/Main.py`)
- Inventory Menu → Inventory Records: loads and saves (evidence: `Week_10lab/Main.py`)
- Inventory Menu → Inventory: manages (evidence: `Week_10lab/Main.py`)
- Inventory Menu → Physical Product: creates (evidence: `Week_10lab/Main.py`)
- Inventory Menu → Digital Product: creates (evidence: `Week_10lab/Main.py`)
- Inventory → Product Base: uses product interface (evidence: `Week_10lab/inventory.py`)
- Physical Product → Product Base: extends (evidence: `Week_10lab/Physical_product.py`)
- Physical Product → Shipping Contract: implements (evidence: `Week_10lab/Physical_product.py`)
- Physical Product → Supplier: uses (evidence: `Week_10lab/Physical_product.py`)
- Digital Product → Product Base: extends (evidence: `Week_10lab/Digital_product.py`)
- Order → Order Line: uses (evidence: `Week_10lab/order.py`)
- Order → Product Base: references (evidence: `Week_10lab/order.py`)
- Order Line → Product Base: references (evidence: `Week_10lab/order_line.py`)
- User → Earlier Inventory CLI: uses (evidence: `Week_8lab/main.py`)
- Earlier Inventory CLI → Earlier Inventory: manages (evidence: `Week_8lab/main.py`)
- Earlier Inventory CLI → Earlier Product: creates (evidence: `Week_8lab/main.py`)
