# kareem-diaa/inventory-management-system-project architecture

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

- Interactive diagram: https://gitdiagram.com/kareem-diaa/inventory-management-system-project
- Repository: https://github.com/kareem-diaa/inventory-management-system-project

## Overview

This is a terminal-based inventory manager. Users enter through the login/register menu; authentication validates credentials and dispatches authorized sessions to user or product management. Those management flows support CRUD, search, inventory viewing and report generation. JSON files provide persistence, and reports are written as HTML. The product-management implementation was not sampled, so its internal calls are not asserted; its documented capabilities and storage are shown with README evidence.

Main entry points: [`auth.py`](https://github.com/kareem-diaa/inventory-management-system-project/blob/main/auth.py) (Authentication and Menus), [`crud_users.py`](https://github.com/kareem-diaa/inventory-management-system-project/blob/main/crud_users.py) (User Management), [`crud_products.py`](https://github.com/kareem-diaa/inventory-management-system-project/blob/main/crud_products.py) (Product Management), [`Report.py`](https://github.com/kareem-diaa/inventory-management-system-project/blob/main/Report.py) (HTML Report Generator)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and Authentication"]
  node_entry["Application Entry<br/>[main.py]"]
  node_auth["Authentication and Menus<br/>[auth.py]"]
  node_validation["Input Validation<br/>[validation.py]"]
end

subgraph group_management["Inventory Management"]
  node_users["User Management<br/>[crud_users.py]"]
  node_products["Product Management<br/>[crud_products.py]"]
end

subgraph group_data["Persistence and Reports"]
  node_userstore[("User JSON Store<br/>[users.json]")]
  node_productstore[("Product JSON Store<br/>[products.json]")]
  node_reports["HTML Report Generator<br/>[Report.py]"]
  node_reportfiles["HTML Reports"]
end

node_operator(("Operator"))

node_operator -->|"starts"| node_entry
node_entry -->|"invokes"| node_auth
node_auth -->|"validates input"| node_validation
node_auth -->|"dispatches"| node_users
node_auth -->|"dispatches"| node_products
node_users -->|"checks session"| node_auth
node_users -->|"reads and writes"| node_userstore
node_users -->|"requests report"| node_reports
node_products -.->|"persists products"| node_productstore
node_products -.->|"requests report"| node_reports
node_reports -->|"writes HTML"| node_reportfiles

click node_entry "https://github.com/kareem-diaa/inventory-management-system-project/blob/main/main.py"
click node_auth "https://github.com/kareem-diaa/inventory-management-system-project/blob/main/auth.py"
click node_validation "https://github.com/kareem-diaa/inventory-management-system-project/blob/main/validation.py"
click node_users "https://github.com/kareem-diaa/inventory-management-system-project/blob/main/crud_users.py"
click node_products "https://github.com/kareem-diaa/inventory-management-system-project/blob/main/crud_products.py"
click node_userstore "https://github.com/kareem-diaa/inventory-management-system-project/blob/main/users.json"
click node_productstore "https://github.com/kareem-diaa/inventory-management-system-project/blob/main/products.json"
click node_reports "https://github.com/kareem-diaa/inventory-management-system-project/blob/main/Report.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_auth,node_validation toneBlue
class node_users,node_products toneAmber
class node_userstore,node_productstore,node_reports,node_reportfiles toneMint
class node_operator toneIndigo
```

## Components

### Access and Authentication

- [Application Entry](https://github.com/kareem-diaa/inventory-management-system-project/blob/main/main.py): `main.py`
- [Authentication and Menus](https://github.com/kareem-diaa/inventory-management-system-project/blob/main/auth.py): `auth.py`
- [Input Validation](https://github.com/kareem-diaa/inventory-management-system-project/blob/main/validation.py): `validation.py`

### Inventory Management

- [User Management](https://github.com/kareem-diaa/inventory-management-system-project/blob/main/crud_users.py): `crud_users.py`
- [Product Management](https://github.com/kareem-diaa/inventory-management-system-project/blob/main/crud_products.py): `crud_products.py`

### Persistence and Reports

- [User JSON Store](https://github.com/kareem-diaa/inventory-management-system-project/blob/main/users.json): `users.json`
- [Product JSON Store](https://github.com/kareem-diaa/inventory-management-system-project/blob/main/products.json): `products.json`
- [HTML Report Generator](https://github.com/kareem-diaa/inventory-management-system-project/blob/main/Report.py): `Report.py`
- **HTML Reports**

### Other components

- **Operator**

## Connections

- Operator → Application Entry: starts (evidence: `Readme.md`)
- Application Entry → Authentication and Menus: invokes (evidence: `main.py`)
- Authentication and Menus → Input Validation: validates input (evidence: `auth.py`)
- Authentication and Menus → User Management: dispatches (evidence: `auth.py`)
- Authentication and Menus → Product Management: dispatches (evidence: `auth.py`)
- User Management → Authentication and Menus: checks session (evidence: `crud_users.py`)
- User Management → User JSON Store: reads and writes (evidence: `crud_users.py`)
- User Management → HTML Report Generator: requests report (evidence: `crud_users.py`)
- Product Management → Product JSON Store: persists products (evidence: `Readme.md`)
- Product Management → HTML Report Generator: requests report (evidence: `Readme.md`)
- HTML Report Generator → HTML Reports: writes HTML (evidence: `Report.py`)
