# qingtian1927/prf192_assignment architecture

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

- Interactive diagram: https://gitdiagram.com/qingtian1927/prf192_assignment
- Repository: https://github.com/qingtian1927/prf192_assignment

## Overview

Masterchef Management Software is a command-line chef roster manager. Its workflow loads an optional chef file, presents interactive options, edits and searches the in-memory roster, displays results, and saves changes. The manager coordinates UI, list operations, chef records, and file persistence; date and string utilities support validation and normalization. README capabilities also include sorting and total-salary calculation. The excerpts establish several direct calls; some manager-to-subsystem paths are documented or inferred from the indexed imports, so uncertain links are dashed.

Main entry points: [`masterchefManager.c`](https://github.com/qingtian1927/prf192_assignment/blob/master/masterchefManager.c) (Manager), [`libs/chefobject/chefobject.c`](https://github.com/qingtian1927/prf192_assignment/blob/master/libs/chefobject/chefobject.c) (Chef Records), [`libs/cheflist/cheflist.c`](https://github.com/qingtian1927/prf192_assignment/blob/master/libs/cheflist/cheflist.c) (Chef Lists), [`libs/database/database.c`](https://github.com/qingtian1927/prf192_assignment/blob/master/libs/database/database.c) (Chef File I/O)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Manager Workflow"]
  node_manager["Manager"]
end

subgraph group_roster["Roster Domain"]
  node_records["Chef Records<br/>[chefobject.c]"]
  node_lists["Chef Lists<br/>[cheflist.c]"]
end

subgraph group_persistence["File Persistence"]
  node_database[("Chef File I/O<br/>[database.c]")]
end

subgraph group_presentation["Terminal Interface"]
  node_ui["Terminal UI<br/>[userinterface.c]"]
end

subgraph group_utilities["Validation Utilities"]
  node_dates["Date Validation<br/>[dateparser.c]"]
  node_strings["String Formatting<br/>[stringformat.c]"]
end

node_user(("Operator"))

node_user -->|"chooses options"| node_manager
node_manager -.->|"loads roster"| node_database
node_database -->|"builds roster"| node_lists
node_database -->|"parses records"| node_records
node_manager -.->|"prompts and displays"| node_ui
node_ui -->|"renders roster"| node_lists
node_manager -.->|"manages roster"| node_lists
node_lists -->|"reads properties"| node_records
node_manager -.->|"creates and edits"| node_records
node_records -->|"validates dates"| node_dates
node_records -->|"normalizes fields"| node_strings
node_manager -.->|"saves roster"| node_database
node_manager -.->|"searches and sorts"| node_lists
node_lists -->|"calculates salary total"| node_records

click node_manager "https://github.com/qingtian1927/prf192_assignment/blob/master/masterchefManager.c"
click node_records "https://github.com/qingtian1927/prf192_assignment/blob/master/libs/chefobject/chefobject.c"
click node_lists "https://github.com/qingtian1927/prf192_assignment/blob/master/libs/cheflist/cheflist.c"
click node_database "https://github.com/qingtian1927/prf192_assignment/blob/master/libs/database/database.c"
click node_ui "https://github.com/qingtian1927/prf192_assignment/blob/master/libs/userinterface/userinterface.c"
click node_dates "https://github.com/qingtian1927/prf192_assignment/blob/master/libs/dateparser/dateparser.c"
click node_strings "https://github.com/qingtian1927/prf192_assignment/blob/master/libs/stringformat/stringformat.c"

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_manager toneBlue
class node_records,node_lists toneAmber
class node_database toneMint
class node_ui toneRose
class node_dates,node_strings,node_user toneIndigo
```

## Components

### Manager Workflow

- [Manager](https://github.com/qingtian1927/prf192_assignment/blob/master/masterchefManager.c): `masterchefManager.c`

### Roster Domain

- [Chef Records](https://github.com/qingtian1927/prf192_assignment/blob/master/libs/chefobject/chefobject.c): `libs/chefobject/chefobject.c`
- [Chef Lists](https://github.com/qingtian1927/prf192_assignment/blob/master/libs/cheflist/cheflist.c): `libs/cheflist/cheflist.c`

### File Persistence

- [Chef File I/O](https://github.com/qingtian1927/prf192_assignment/blob/master/libs/database/database.c): `libs/database/database.c`

### Terminal Interface

- [Terminal UI](https://github.com/qingtian1927/prf192_assignment/blob/master/libs/userinterface/userinterface.c): `libs/userinterface/userinterface.c`

### Validation Utilities

- [Date Validation](https://github.com/qingtian1927/prf192_assignment/blob/master/libs/dateparser/dateparser.c): `libs/dateparser/dateparser.c`
- [String Formatting](https://github.com/qingtian1927/prf192_assignment/blob/master/libs/stringformat/stringformat.c): `libs/stringformat/stringformat.c`

### Other components

- **Operator**

## Connections

- Operator → Manager: chooses options (evidence: `README.md`)
- Manager → Chef File I/O: loads roster
- Chef File I/O → Chef Lists: builds roster
- Chef File I/O → Chef Records: parses records (evidence: `libs/database/database.c`)
- Manager → Terminal UI: prompts and displays
- Terminal UI → Chef Lists: renders roster (evidence: `libs/userinterface/userinterface.c`)
- Manager → Chef Lists: manages roster
- Chef Lists → Chef Records: reads properties (evidence: `libs/cheflist/cheflist.c`)
- Manager → Chef Records: creates and edits
- Chef Records → Date Validation: validates dates
- Chef Records → String Formatting: normalizes fields
- Manager → Chef File I/O: saves roster
- Manager → Chef Lists: searches and sorts
- Chef Lists → Chef Records: calculates salary total (evidence: `libs/cheflist/cheflist.c`)
