# gmalanowski/warehouse-simulator architecture

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

- Interactive diagram: https://gitdiagram.com/gmalanowski/warehouse-simulator
- Repository: https://github.com/gmalanowski/warehouse-simulator

## Overview

Warehouse-simulator is a Qt warehouse-management simulator. Users configure warehouses, products, cycle count and event seed through the GUI or the command-line configuration flow; the simulation then generates and processes timed events that change inventory, and produces warehouse and sales reports. The graph captures those documented capabilities and the calls visible in sampled source. GUI-to-simulation wiring and some event-generation details are not fully shown, so uncertain connections are omitted.

Main entry points: [`src/Simulation/Simulation.cpp`](https://github.com/gmalanowski/warehouse-simulator/blob/main/src/Simulation/Simulation.cpp) (Simulation loop), [`src/main.cpp`](https://github.com/gmalanowski/warehouse-simulator/blob/main/src/main.cpp) (Application entry), [`src/gui/gui.cpp`](https://github.com/gmalanowski/warehouse-simulator/blob/main/src/gui/gui.cpp) (Configuration GUI), [`src/Warehouse/Warehouse.cpp`](https://github.com/gmalanowski/warehouse-simulator/blob/main/src/Warehouse/Warehouse.cpp) (Warehouse inventory)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry and UI"]
  node_main["Application entry<br/>[main.cpp]"]
  node_gui["Configuration GUI<br/>[gui.cpp]"]
end

subgraph group_simulation["Simulation"]
  node_sim["Simulation loop<br/>[Simulation.cpp]"]
  node_event["Timed events<br/>[Event.cpp]"]
end

subgraph group_domain["Warehouse domain"]
  node_warehouse["Warehouse inventory<br/>[Warehouse.cpp]"]
  node_product["Product records<br/>[Product.cpp]"]
  node_storage["Capacity status<br/>[Storage.cpp]"]
end

subgraph group_reporting["Reporting"]
  node_report["Report summary<br/>[Report.cpp]"]
  node_warehouse_report["Warehouse report"]
  node_sales_report["Sales report<br/>[SalesReport.cpp]"]
end

node_user(("User"))
node_settings["Settings CSV"]
node_output["Simulation report CSV"]

node_user -->|"starts"| node_main
node_user -->|"configures"| node_gui
node_main -->|"shows"| node_gui
node_main -->|"runs headless"| node_sim
node_main -->|"creates or copies"| node_settings
node_gui -->|"reads and writes"| node_settings
node_gui -->|"reads and exports"| node_output
node_sim -->|"reads"| node_settings
node_sim -->|"generates events"| node_event
node_sim -->|"processes inventory"| node_warehouse
node_warehouse -->|"updates and sells"| node_product
node_warehouse -->|"checks capacity"| node_storage
node_sim -->|"generates"| node_warehouse_report
node_sim -->|"generates"| node_sales_report
node_warehouse_report -->|"uses summary"| node_report
node_sales_report -->|"uses summary"| node_report
node_sim -->|"appends reports"| node_output

click node_main "https://github.com/gmalanowski/warehouse-simulator/blob/main/src/main.cpp"
click node_gui "https://github.com/gmalanowski/warehouse-simulator/blob/main/src/gui/gui.cpp"
click node_sim "https://github.com/gmalanowski/warehouse-simulator/blob/main/src/Simulation/Simulation.cpp"
click node_event "https://github.com/gmalanowski/warehouse-simulator/blob/main/src/Event/Event.cpp"
click node_warehouse "https://github.com/gmalanowski/warehouse-simulator/blob/main/src/Warehouse/Warehouse.cpp"
click node_product "https://github.com/gmalanowski/warehouse-simulator/blob/main/src/Product/Product.cpp"
click node_storage "https://github.com/gmalanowski/warehouse-simulator/blob/main/src/Storage/Storage.cpp"
click node_report "https://github.com/gmalanowski/warehouse-simulator/blob/main/src/Report/Report.cpp"
click node_warehouse_report "https://github.com/gmalanowski/warehouse-simulator/blob/main/src/WarehouseReport/WarehouseReport.cpp"
click node_sales_report "https://github.com/gmalanowski/warehouse-simulator/blob/main/src/SalesReport/SalesReport.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_main,node_gui,node_user toneBlue
class node_sim,node_event toneAmber
class node_warehouse,node_product,node_storage toneMint
class node_report,node_warehouse_report,node_sales_report toneRose
class node_settings,node_output toneIndigo
```

## Components

### Entry and UI

- [Application entry](https://github.com/gmalanowski/warehouse-simulator/blob/main/src/main.cpp): `src/main.cpp`
- [Configuration GUI](https://github.com/gmalanowski/warehouse-simulator/blob/main/src/gui/gui.cpp): `src/gui/gui.cpp`

### Simulation

- [Simulation loop](https://github.com/gmalanowski/warehouse-simulator/blob/main/src/Simulation/Simulation.cpp): `src/Simulation/Simulation.cpp`
- [Timed events](https://github.com/gmalanowski/warehouse-simulator/blob/main/src/Event/Event.cpp): `src/Event/Event.cpp`

### Warehouse domain

- [Warehouse inventory](https://github.com/gmalanowski/warehouse-simulator/blob/main/src/Warehouse/Warehouse.cpp): `src/Warehouse/Warehouse.cpp`
- [Product records](https://github.com/gmalanowski/warehouse-simulator/blob/main/src/Product/Product.cpp): `src/Product/Product.cpp`
- [Capacity status](https://github.com/gmalanowski/warehouse-simulator/blob/main/src/Storage/Storage.cpp): `src/Storage/Storage.cpp`

### Reporting

- [Report summary](https://github.com/gmalanowski/warehouse-simulator/blob/main/src/Report/Report.cpp): `src/Report/Report.cpp`
- [Warehouse report](https://github.com/gmalanowski/warehouse-simulator/blob/main/src/WarehouseReport/WarehouseReport.cpp): `src/WarehouseReport/WarehouseReport.cpp`
- [Sales report](https://github.com/gmalanowski/warehouse-simulator/blob/main/src/SalesReport/SalesReport.cpp): `src/SalesReport/SalesReport.cpp`

### Other components

- **User**
- **Settings CSV**
- **Simulation report CSV**

## Connections

- User → Application entry: starts
- User → Configuration GUI: configures
- Application entry → Configuration GUI: shows
- Application entry → Simulation loop: runs headless
- Application entry → Settings CSV: creates or copies
- Configuration GUI → Settings CSV: reads and writes
- Configuration GUI → Simulation report CSV: reads and exports
- Simulation loop → Settings CSV: reads
- Simulation loop → Timed events: generates events
- Simulation loop → Warehouse inventory: processes inventory
- Warehouse inventory → Product records: updates and sells
- Warehouse inventory → Capacity status: checks capacity
- Simulation loop → Warehouse report: generates
- Simulation loop → Sales report: generates
- Warehouse report → Report summary: uses summary
- Sales report → Report summary: uses summary
- Simulation loop → Simulation report CSV: appends reports
