# ade-nugraha306/inventory-barang architecture

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

- Interactive diagram: https://gitdiagram.com/ade-nugraha306/inventory-barang
- Repository: https://github.com/ade-nugraha306/inventory-barang

## Overview

This is a Tkinter desktop inventory application backed by MySQL. Users open product, stock, pricing, purchasing, sales, and reporting screens from the menu; the app delegates screen actions to feature modules, which query or update the database. Reports can export CSV files. The excerpts show the app’s startup and menu wiring, and several feature implementations; links from other feature modules to the database are supported by the source index, but their internal transaction details were not sampled.

Main entry points: [`appFunc.py`](https://github.com/ade-nugraha306/inventory-barang/blob/main/appFunc.py) (App coordinator), [`configDB.py`](https://github.com/ade-nugraha306/inventory-barang/blob/main/configDB.py) (Inventory database), [`laporanFunc.py`](https://github.com/ade-nugraha306/inventory-barang/blob/main/laporanFunc.py) (Reports), [`exportToCsv.py`](https://github.com/ade-nugraha306/inventory-barang/blob/main/exportToCsv.py) (CSV export)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Desktop interface"]
  node_entry["Application entry<br/>[ProUAS5D2008.py]"]
  node_app["App coordinator<br/>[appFunc.py]"]
  node_menu["Navigation menu<br/>[menuFunc.py]"]
end

subgraph group_operations["Inventory operations"]
  node_catalog["Product catalog<br/>[barangFunc.py]"]
  node_stock["Stock management<br/>[stockFunc.py]"]
  node_pricing["Sales pricing<br/>[hargaFunc.py]"]
  node_purchases["Purchase transactions<br/>[pembelianFunc.py]"]
  node_sales["Sales transactions<br/>[penjualanFunc.py]"]
end

subgraph group_reporting["Reports and export"]
  node_reports["Reports<br/>[laporanFunc.py]"]
  node_csv["CSV export<br/>[exportToCsv.py]"]
end

subgraph group_persistence["Data persistence"]
  node_database[("Inventory database<br/>[configDB.py]")]
end

node_user(("User"))
node_mysql[("MySQL server")]
node_csvfile["CSV file"]

node_user -->|"starts"| node_entry
node_entry -->|"creates"| node_app
node_app -->|"initializes"| node_database
node_app -->|"sets up"| node_menu
node_menu -->|"dispatches actions"| node_app
node_app -->|"delegates to"| node_catalog
node_app -->|"delegates to"| node_stock
node_app -->|"delegates to"| node_pricing
node_app -->|"delegates to"| node_purchases
node_app -->|"delegates to"| node_sales
node_app -->|"delegates to"| node_reports
node_app -->|"delegates to"| node_csv
node_catalog -->|"saves product"| node_database
node_stock -->|"queries stock"| node_database
node_pricing -->|"reads and writes"| node_database
node_purchases -->|"records purchases"| node_database
node_sales -->|"records sales"| node_database
node_reports -->|"queries reports"| node_database
node_reports -->|"uses exporter"| node_csv
node_csv -->|"writes export"| node_csvfile
node_database -->|"connects to"| node_mysql

click node_entry "https://github.com/ade-nugraha306/inventory-barang/blob/main/ProUAS5D2008.py"
click node_app "https://github.com/ade-nugraha306/inventory-barang/blob/main/appFunc.py"
click node_menu "https://github.com/ade-nugraha306/inventory-barang/blob/main/menuFunc.py"
click node_catalog "https://github.com/ade-nugraha306/inventory-barang/blob/main/barangFunc.py"
click node_stock "https://github.com/ade-nugraha306/inventory-barang/blob/main/stockFunc.py"
click node_pricing "https://github.com/ade-nugraha306/inventory-barang/blob/main/hargaFunc.py"
click node_purchases "https://github.com/ade-nugraha306/inventory-barang/blob/main/pembelianFunc.py"
click node_sales "https://github.com/ade-nugraha306/inventory-barang/blob/main/penjualanFunc.py"
click node_reports "https://github.com/ade-nugraha306/inventory-barang/blob/main/laporanFunc.py"
click node_csv "https://github.com/ade-nugraha306/inventory-barang/blob/main/exportToCsv.py"
click node_database "https://github.com/ade-nugraha306/inventory-barang/blob/main/configDB.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_entry,node_app,node_menu,node_user toneBlue
class node_catalog,node_stock,node_pricing,node_purchases,node_sales,node_mysql toneAmber
class node_reports,node_csv toneMint
class node_database toneRose
class node_csvfile toneIndigo
```

## Components

### Desktop interface

- [Application entry](https://github.com/ade-nugraha306/inventory-barang/blob/main/ProUAS5D2008.py): `ProUAS5D2008.py`
- [App coordinator](https://github.com/ade-nugraha306/inventory-barang/blob/main/appFunc.py): `appFunc.py`
- [Navigation menu](https://github.com/ade-nugraha306/inventory-barang/blob/main/menuFunc.py): `menuFunc.py`

### Inventory operations

- [Product catalog](https://github.com/ade-nugraha306/inventory-barang/blob/main/barangFunc.py): `barangFunc.py`
- [Stock management](https://github.com/ade-nugraha306/inventory-barang/blob/main/stockFunc.py): `stockFunc.py`
- [Sales pricing](https://github.com/ade-nugraha306/inventory-barang/blob/main/hargaFunc.py): `hargaFunc.py`
- [Purchase transactions](https://github.com/ade-nugraha306/inventory-barang/blob/main/pembelianFunc.py): `pembelianFunc.py`
- [Sales transactions](https://github.com/ade-nugraha306/inventory-barang/blob/main/penjualanFunc.py): `penjualanFunc.py`

### Reports and export

- [Reports](https://github.com/ade-nugraha306/inventory-barang/blob/main/laporanFunc.py): `laporanFunc.py`
- [CSV export](https://github.com/ade-nugraha306/inventory-barang/blob/main/exportToCsv.py): `exportToCsv.py`

### Data persistence

- [Inventory database](https://github.com/ade-nugraha306/inventory-barang/blob/main/configDB.py): `configDB.py`

### Other components

- **User**
- **MySQL server**
- **CSV file**

## Connections

- User → Application entry: starts (evidence: `ProUAS5D2008.py`)
- Application entry → App coordinator: creates (evidence: `ProUAS5D2008.py`)
- App coordinator → Inventory database: initializes (evidence: `appFunc.py`)
- App coordinator → Navigation menu: sets up (evidence: `appFunc.py`)
- Navigation menu → App coordinator: dispatches actions (evidence: `menuFunc.py`)
- App coordinator → Product catalog: delegates to (evidence: `appFunc.py`)
- App coordinator → Stock management: delegates to (evidence: `appFunc.py`)
- App coordinator → Sales pricing: delegates to (evidence: `appFunc.py`)
- App coordinator → Purchase transactions: delegates to (evidence: `appFunc.py`)
- App coordinator → Sales transactions: delegates to (evidence: `appFunc.py`)
- App coordinator → Reports: delegates to (evidence: `appFunc.py`)
- App coordinator → CSV export: delegates to (evidence: `appFunc.py`)
- Product catalog → Inventory database: saves product (evidence: `barangFunc.py`)
- Stock management → Inventory database: queries stock (evidence: `stockFunc.py`)
- Sales pricing → Inventory database: reads and writes (evidence: `hargaFunc.py`)
- Purchase transactions → Inventory database: records purchases (evidence: `pembelianFunc.py`)
- Sales transactions → Inventory database: records sales (evidence: `penjualanFunc.py`)
- Reports → Inventory database: queries reports (evidence: `laporanFunc.py`)
- Reports → CSV export: uses exporter (evidence: `laporanFunc.py`)
- CSV export → CSV file: writes export (evidence: `exportToCsv.py`)
- Inventory database → MySQL server: connects to (evidence: `configDB.py`)
