# tofsuw23/matkul-apd architecture

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

- Interactive diagram: https://gitdiagram.com/tofsuw23/matkul-apd
- Repository: https://github.com/tofsuw23/matkul-apd

## Overview

This is a small interactive beverage-stock management CLI. A user registers or logs in; admins can display and add, update, or delete drinks, while regular users can display the catalog. Accounts are held in memory in the entry script, and catalog operations share the in-memory list defined in `kodee/tambah_data.py`. The excerpts show the entry script invoking each operation and the catalog modules importing that shared list. The PDF is not represented: no product behavior involving it is evidenced.

Main entry points: [`36-PT-8.py`](https://github.com/tofsuw23/matkul-apd/blob/main/36-PT-8.py) (Menu and accounts), [`kodee/tambah_data.py`](https://github.com/tofsuw23/matkul-apd/blob/main/kodee/tambah_data.py) (Shared drink list), [`kodee/daftar_minuman.py`](https://github.com/tofsuw23/matkul-apd/blob/main/kodee/daftar_minuman.py) (Catalog display), [`kodee/baca_data.py`](https://github.com/tofsuw23/matkul-apd/blob/main/kodee/baca_data.py) (Read catalog)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["CLI and access"]
  node_app["Menu and accounts<br/>[36-PT-8.py]"]
end

subgraph group_operations["Catalog operations"]
  node_list_view["Catalog display<br/>[daftar_minuman.py]"]
  node_read["Read catalog<br/>[baca_data.py]"]
  node_add["Add drink<br/>[tambah_data.py]"]
  node_update["Update drink<br/>[update_data.py]"]
  node_delete["Delete drink<br/>[hapus_data.py]"]
end

subgraph group_state["Catalog state"]
  node_catalog[("Shared drink list<br/>[tambah_data.py]")]
end

node_user(("CLI user"))

node_user -->|"chooses and enters"| node_app
node_app -->|"calls display"| node_list_view
node_app -->|"calls read"| node_read
node_app -->|"calls add"| node_add
node_app -->|"calls update"| node_update
node_app -->|"calls delete"| node_delete
node_list_view -->|"reads"| node_catalog
node_read -->|"reads"| node_catalog
node_add -->|"appends"| node_catalog
node_update -->|"updates"| node_catalog
node_delete -->|"deletes from"| node_catalog

click node_app "https://github.com/tofsuw23/matkul-apd/blob/main/36-PT-8.py"
click node_list_view "https://github.com/tofsuw23/matkul-apd/blob/main/kodee/daftar_minuman.py"
click node_read "https://github.com/tofsuw23/matkul-apd/blob/main/kodee/baca_data.py"
click node_add "https://github.com/tofsuw23/matkul-apd/blob/main/kodee/tambah_data.py"
click node_update "https://github.com/tofsuw23/matkul-apd/blob/main/kodee/update_data.py"
click node_delete "https://github.com/tofsuw23/matkul-apd/blob/main/kodee/hapus_data.py"
click node_catalog "https://github.com/tofsuw23/matkul-apd/blob/main/kodee/tambah_data.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_app,node_user toneBlue
class node_list_view,node_read,node_add,node_update,node_delete toneAmber
class node_catalog toneMint
```

## Components

### CLI and access

- [Menu and accounts](https://github.com/tofsuw23/matkul-apd/blob/main/36-PT-8.py): `36-PT-8.py`

### Catalog operations

- [Catalog display](https://github.com/tofsuw23/matkul-apd/blob/main/kodee/daftar_minuman.py): `kodee/daftar_minuman.py`
- [Read catalog](https://github.com/tofsuw23/matkul-apd/blob/main/kodee/baca_data.py): `kodee/baca_data.py`
- [Add drink](https://github.com/tofsuw23/matkul-apd/blob/main/kodee/tambah_data.py): `kodee/tambah_data.py`
- [Update drink](https://github.com/tofsuw23/matkul-apd/blob/main/kodee/update_data.py): `kodee/update_data.py`
- [Delete drink](https://github.com/tofsuw23/matkul-apd/blob/main/kodee/hapus_data.py): `kodee/hapus_data.py`

### Catalog state

- [Shared drink list](https://github.com/tofsuw23/matkul-apd/blob/main/kodee/tambah_data.py): `kodee/tambah_data.py`

### Other components

- **CLI user**

## Connections

- CLI user → Menu and accounts: chooses and enters (evidence: `36-PT-8.py`)
- Menu and accounts → Catalog display: calls display (evidence: `36-PT-8.py`)
- Menu and accounts → Read catalog: calls read (evidence: `36-PT-8.py`)
- Menu and accounts → Add drink: calls add (evidence: `36-PT-8.py`)
- Menu and accounts → Update drink: calls update (evidence: `36-PT-8.py`)
- Menu and accounts → Delete drink: calls delete (evidence: `36-PT-8.py`)
- Catalog display → Shared drink list: reads (evidence: `kodee/daftar_minuman.py`)
- Read catalog → Shared drink list: reads (evidence: `kodee/baca_data.py`)
- Add drink → Shared drink list: appends (evidence: `kodee/tambah_data.py`)
- Update drink → Shared drink list: updates (evidence: `kodee/update_data.py`)
- Delete drink → Shared drink list: deletes from (evidence: `kodee/hapus_data.py`)
