# imranjk02/inventory-management-system architecture

> Architecture diagram of the GitHub repository imranjk02/inventory-management-system, 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/imranjk02/inventory-management-system
- Repository: https://github.com/imranjk02/inventory-management-system

## Overview

NetTech is a Flask-based course inventory and sales system backed by MySQL. An administrator logs in, manages courses and trainers, records sales, and reviews reports; course barcodes support scanning. The README also describes inventory summaries, low-stock alerts, and responsive/dark-mode UI. The excerpts show database access and selected route behavior; unsampled routes and templates are represented only where documented, so some links rely on the README rather than inspected implementation.

Main entry points: [`database.py`](https://github.com/imranjk02/inventory-management-system/blob/main/database.py) (Database Access), [`templates`](https://github.com/imranjk02/inventory-management-system/tree/main/templates) (Web Interface), [`app.py`](https://github.com/imranjk02/inventory-management-system/blob/main/app.py) (Dashboard), [`static/script.js`](https://github.com/imranjk02/inventory-management-system/blob/main/static/script.js) (UI Behaviors)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and UI"]
  node_webui["Web Interface"]
  node_login["Login<br/>[app.py]"]
  node_ui_behavior["UI Behaviors<br/>[script.js]"]
  node_dashboard["Dashboard<br/>[app.py]"]
end

subgraph group_catalog["Course Catalog"]
  node_course_management["Course Management<br/>[app.py]"]
  node_trainer_management["Trainer Management<br/>[app.py]"]
  node_barcode_scan["Barcode Generation and Scan<br/>[app.py]"]
end

subgraph group_transactions["Sales and Reporting"]
  node_sales_management["Sales Management<br/>[app.py]"]
  node_sales_reports["Sales Reports<br/>[app.py]"]
end

subgraph group_platform["Persistence and Integrations"]
  node_database_access["Database Access<br/>[database.py]"]
  node_mysql[("MySQL Database")]
  node_barcode_library["Barcode Library"]
end

node_admin(("Administrator"))

node_admin -->|"uses"| node_webui
node_webui -->|"submits credentials"| node_login
node_login -->|"queries admins"| node_database_access
node_dashboard -->|"reads summaries"| node_database_access
node_course_management -->|"reads and writes"| node_database_access
node_trainer_management -->|"reads and writes"| node_database_access
node_sales_management -->|"reads and writes"| node_database_access
node_sales_reports -->|"reads sales"| node_database_access
node_barcode_scan -->|"looks up courses"| node_database_access
node_barcode_scan -->|"generates codes"| node_barcode_library
node_database_access -->|"connects"| node_mysql
node_webui -.->|"supports UI"| node_ui_behavior
node_dashboard -.->|"renders dashboard"| node_webui
node_course_management -->|"renders course views"| node_webui
node_sales_management -.->|"renders sales views"| node_webui
node_sales_reports -.->|"presents reports"| node_webui
node_admin -.->|"views overview"| node_dashboard
node_admin -.->|"manages courses"| node_course_management
node_admin -.->|"manages trainers"| node_trainer_management
node_admin -.->|"records sales"| node_sales_management
node_admin -.->|"reviews reports"| node_sales_reports

click node_webui "https://github.com/imranjk02/inventory-management-system/tree/main/templates"
click node_login "https://github.com/imranjk02/inventory-management-system/blob/main/app.py"
click node_ui_behavior "https://github.com/imranjk02/inventory-management-system/blob/main/static/script.js"
click node_dashboard "https://github.com/imranjk02/inventory-management-system/blob/main/app.py"
click node_course_management "https://github.com/imranjk02/inventory-management-system/blob/main/app.py"
click node_trainer_management "https://github.com/imranjk02/inventory-management-system/blob/main/app.py"
click node_barcode_scan "https://github.com/imranjk02/inventory-management-system/blob/main/app.py"
click node_sales_management "https://github.com/imranjk02/inventory-management-system/blob/main/app.py"
click node_sales_reports "https://github.com/imranjk02/inventory-management-system/blob/main/app.py"
click node_database_access "https://github.com/imranjk02/inventory-management-system/blob/main/database.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_webui,node_login,node_ui_behavior,node_dashboard toneBlue
class node_course_management,node_trainer_management,node_barcode_scan toneAmber
class node_sales_management,node_sales_reports toneMint
class node_database_access,node_mysql,node_barcode_library toneRose
class node_admin toneIndigo
```

## Components

### Access and UI

- [Web Interface](https://github.com/imranjk02/inventory-management-system/tree/main/templates): `templates`
- [Login](https://github.com/imranjk02/inventory-management-system/blob/main/app.py): `app.py`
- [UI Behaviors](https://github.com/imranjk02/inventory-management-system/blob/main/static/script.js): `static/script.js`
- [Dashboard](https://github.com/imranjk02/inventory-management-system/blob/main/app.py): `app.py`

### Course Catalog

- [Course Management](https://github.com/imranjk02/inventory-management-system/blob/main/app.py): `app.py`
- [Trainer Management](https://github.com/imranjk02/inventory-management-system/blob/main/app.py): `app.py`
- [Barcode Generation and Scan](https://github.com/imranjk02/inventory-management-system/blob/main/app.py): `app.py`

### Sales and Reporting

- [Sales Management](https://github.com/imranjk02/inventory-management-system/blob/main/app.py): `app.py`
- [Sales Reports](https://github.com/imranjk02/inventory-management-system/blob/main/app.py): `app.py`

### Persistence and Integrations

- [Database Access](https://github.com/imranjk02/inventory-management-system/blob/main/database.py): `database.py`
- **MySQL Database**
- **Barcode Library**

### Other components

- **Administrator**

## Connections

- Administrator → Web Interface: uses (evidence: `README.md`)
- Web Interface → Login: submits credentials (evidence: `app.py`)
- Login → Database Access: queries admins (evidence: `app.py`)
- Dashboard → Database Access: reads summaries (evidence: `app.py`)
- Course Management → Database Access: reads and writes (evidence: `app.py`)
- Trainer Management → Database Access: reads and writes (evidence: `app.py`)
- Sales Management → Database Access: reads and writes (evidence: `app.py`)
- Sales Reports → Database Access: reads sales (evidence: `app.py`)
- Barcode Generation and Scan → Database Access: looks up courses (evidence: `app.py`)
- Barcode Generation and Scan → Barcode Library: generates codes (evidence: `app.py`)
- Database Access → MySQL Database: connects (evidence: `database.py`)
- Web Interface → UI Behaviors: supports UI
- Dashboard → Web Interface: renders dashboard (evidence: `README.md`)
- Course Management → Web Interface: renders course views (evidence: `app.py`)
- Sales Management → Web Interface: renders sales views (evidence: `README.md`)
- Sales Reports → Web Interface: presents reports (evidence: `README.md`)
- Administrator → Dashboard: views overview (evidence: `README.md`)
- Administrator → Course Management: manages courses (evidence: `README.md`)
- Administrator → Trainer Management: manages trainers (evidence: `README.md`)
- Administrator → Sales Management: records sales (evidence: `README.md`)
- Administrator → Sales Reports: reviews reports (evidence: `README.md`)
