# sothpanhharupp/inventory-management-system-ooad architecture

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

## Overview

This is a Windows desktop inventory-control application. Staff and administrators sign in, then use the dashboard to manage products and categories, record stock movements, inspect inventory and reports, and preview invoices. The core domain layer validates operations and coordinates repositories; SQL Server stores operational records. The README documents the product and setup, while the graph’s detailed links follow sampled source references and excerpts; unsampled product areas are included only where supported by the README or source index.

Main entry points: [`UI/DashboardForm.cs`](https://github.com/sothpanhharupp/inventory-management-system-ooad/blob/master/UI/DashboardForm.cs) (Inventory dashboard), [`BusinessLogic/InventoryService.cs`](https://github.com/sothpanhharupp/inventory-management-system-ooad/blob/master/BusinessLogic/InventoryService.cs) (Inventory operations), [`DataAccess/DatabaseHelper.cs`](https://github.com/sothpanhharupp/inventory-management-system-ooad/blob/master/DataAccess/DatabaseHelper.cs) (ADO.NET access), [`BusinessLogic/AuthService.cs`](https://github.com/sothpanhharupp/inventory-management-system-ooad/blob/master/BusinessLogic/AuthService.cs) (Authentication and users)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_presentation["Desktop interface"]
  node_login["Login<br/>[LoginForm.cs]"]
  node_dashboard["Inventory dashboard<br/>[DashboardForm.cs]"]
  node_product_ui["Product management"]
  node_category_ui["Category management"]
  node_user_ui["User management"]
  node_stock_ui["Stock movements"]
  node_invoice["Invoice preview"]
end

subgraph group_domain["Domain services"]
  node_auth["Authentication and users<br/>[AuthService.cs]"]
  node_inventory["Inventory operations"]
end

subgraph group_persistence["Data access"]
  node_users_repo["User records<br/>[UserRepository.cs]"]
  node_products_repo["Product records"]
  node_categories_repo["Category records"]
  node_transactions_repo["Stock transactions and reports"]
  node_db_helper["ADO.NET access<br/>[DatabaseHelper.cs]"]
end

subgraph group_integrations["Supporting capabilities"]
  node_telegram["Restock alerts<br/>[TelegramService.cs]"]
  node_images["Product images<br/>[ImageService.cs]"]
end

node_staff(("Staff user"))
node_admin(("Administrator"))
node_sql[("SQL Server")]
node_telegram_service["Telegram API"]

node_staff -->|"signs in"| node_login
node_admin -->|"signs in"| node_login
node_login -->|"authenticates"| node_auth
node_auth -->|"looks up users"| node_users_repo
node_auth -->|"opens dashboard"| node_dashboard
node_staff -->|"uses"| node_dashboard
node_admin -->|"uses"| node_dashboard
node_dashboard -->|"requests operations"| node_inventory
node_dashboard -->|"opens editor"| node_product_ui
node_dashboard -->|"opens editor"| node_category_ui
node_dashboard -->|"opens editor"| node_user_ui
node_dashboard -->|"opens transaction"| node_stock_ui
node_dashboard -->|"opens preview"| node_invoice
node_product_ui -->|"manages products"| node_inventory
node_category_ui -->|"manages categories"| node_inventory
node_user_ui -->|"manages accounts"| node_auth
node_stock_ui -->|"records movement"| node_inventory
node_product_ui -->|"loads images"| node_images
node_stock_ui -->|"loads images"| node_images
node_inventory -->|"manages products"| node_products_repo
node_inventory -->|"manages categories"| node_categories_repo
node_inventory -->|"records and reports"| node_transactions_repo
node_inventory -->|"uses alert service"| node_telegram
node_telegram -->|"sends alerts"| node_telegram_service
node_users_repo -->|"executes queries"| node_db_helper
node_products_repo -->|"executes queries"| node_db_helper
node_categories_repo -->|"executes queries"| node_db_helper
node_transactions_repo -->|"executes queries"| node_db_helper
node_db_helper -->|"queries"| node_sql

click node_login "https://github.com/sothpanhharupp/inventory-management-system-ooad/blob/master/UI/LoginForm.cs"
click node_dashboard "https://github.com/sothpanhharupp/inventory-management-system-ooad/blob/master/UI/DashboardForm.cs"
click node_product_ui "https://github.com/sothpanhharupp/inventory-management-system-ooad/blob/master/UI/AddEditProductModalForm.cs"
click node_category_ui "https://github.com/sothpanhharupp/inventory-management-system-ooad/blob/master/UI/AddEditCategoryModalForm.cs"
click node_user_ui "https://github.com/sothpanhharupp/inventory-management-system-ooad/blob/master/UI/AddEditUserModalForm.cs"
click node_stock_ui "https://github.com/sothpanhharupp/inventory-management-system-ooad/blob/master/UI/StockTransactionModalForm.cs"
click node_invoice "https://github.com/sothpanhharupp/inventory-management-system-ooad/blob/master/UI/InvoicePreviewForm.cs"
click node_auth "https://github.com/sothpanhharupp/inventory-management-system-ooad/blob/master/BusinessLogic/AuthService.cs"
click node_inventory "https://github.com/sothpanhharupp/inventory-management-system-ooad/blob/master/BusinessLogic/InventoryService.cs"
click node_telegram "https://github.com/sothpanhharupp/inventory-management-system-ooad/blob/master/BusinessLogic/TelegramService.cs"
click node_images "https://github.com/sothpanhharupp/inventory-management-system-ooad/blob/master/BusinessLogic/ImageService.cs"
click node_users_repo "https://github.com/sothpanhharupp/inventory-management-system-ooad/blob/master/DataAccess/UserRepository.cs"
click node_products_repo "https://github.com/sothpanhharupp/inventory-management-system-ooad/blob/master/DataAccess/ProductRepository.cs"
click node_categories_repo "https://github.com/sothpanhharupp/inventory-management-system-ooad/blob/master/DataAccess/CategoryRepository.cs"
click node_transactions_repo "https://github.com/sothpanhharupp/inventory-management-system-ooad/blob/master/DataAccess/TransactionRepository.cs"
click node_db_helper "https://github.com/sothpanhharupp/inventory-management-system-ooad/blob/master/DataAccess/DatabaseHelper.cs"

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_login,node_dashboard,node_product_ui,node_category_ui,node_user_ui,node_stock_ui,node_invoice,node_staff toneBlue
class node_auth,node_inventory,node_sql toneAmber
class node_users_repo,node_products_repo,node_categories_repo,node_transactions_repo,node_db_helper,node_telegram_service toneMint
class node_telegram,node_images toneRose
class node_admin toneIndigo
```

## Components

### Desktop interface

- [Login](https://github.com/sothpanhharupp/inventory-management-system-ooad/blob/master/UI/LoginForm.cs): `UI/LoginForm.cs`
- [Inventory dashboard](https://github.com/sothpanhharupp/inventory-management-system-ooad/blob/master/UI/DashboardForm.cs): `UI/DashboardForm.cs`
- [Product management](https://github.com/sothpanhharupp/inventory-management-system-ooad/blob/master/UI/AddEditProductModalForm.cs): `UI/AddEditProductModalForm.cs`
- [Category management](https://github.com/sothpanhharupp/inventory-management-system-ooad/blob/master/UI/AddEditCategoryModalForm.cs): `UI/AddEditCategoryModalForm.cs`
- [User management](https://github.com/sothpanhharupp/inventory-management-system-ooad/blob/master/UI/AddEditUserModalForm.cs): `UI/AddEditUserModalForm.cs`
- [Stock movements](https://github.com/sothpanhharupp/inventory-management-system-ooad/blob/master/UI/StockTransactionModalForm.cs): `UI/StockTransactionModalForm.cs`
- [Invoice preview](https://github.com/sothpanhharupp/inventory-management-system-ooad/blob/master/UI/InvoicePreviewForm.cs): `UI/InvoicePreviewForm.cs`

### Domain services

- [Authentication and users](https://github.com/sothpanhharupp/inventory-management-system-ooad/blob/master/BusinessLogic/AuthService.cs): `BusinessLogic/AuthService.cs`
- [Inventory operations](https://github.com/sothpanhharupp/inventory-management-system-ooad/blob/master/BusinessLogic/InventoryService.cs): `BusinessLogic/InventoryService.cs`

### Data access

- [User records](https://github.com/sothpanhharupp/inventory-management-system-ooad/blob/master/DataAccess/UserRepository.cs): `DataAccess/UserRepository.cs`
- [Product records](https://github.com/sothpanhharupp/inventory-management-system-ooad/blob/master/DataAccess/ProductRepository.cs): `DataAccess/ProductRepository.cs`
- [Category records](https://github.com/sothpanhharupp/inventory-management-system-ooad/blob/master/DataAccess/CategoryRepository.cs): `DataAccess/CategoryRepository.cs`
- [Stock transactions and reports](https://github.com/sothpanhharupp/inventory-management-system-ooad/blob/master/DataAccess/TransactionRepository.cs): `DataAccess/TransactionRepository.cs`
- [ADO.NET access](https://github.com/sothpanhharupp/inventory-management-system-ooad/blob/master/DataAccess/DatabaseHelper.cs): `DataAccess/DatabaseHelper.cs`

### Supporting capabilities

- [Restock alerts](https://github.com/sothpanhharupp/inventory-management-system-ooad/blob/master/BusinessLogic/TelegramService.cs): `BusinessLogic/TelegramService.cs`
- [Product images](https://github.com/sothpanhharupp/inventory-management-system-ooad/blob/master/BusinessLogic/ImageService.cs): `BusinessLogic/ImageService.cs`

### Other components

- **Staff user**
- **Administrator**
- **SQL Server**
- **Telegram API**

## Connections

- Staff user → Login: signs in
- Administrator → Login: signs in
- Login → Authentication and users: authenticates (evidence: `UI/LoginForm.cs`)
- Authentication and users → User records: looks up users (evidence: `BusinessLogic/AuthService.cs`)
- Authentication and users → Inventory dashboard: opens dashboard (evidence: `Program.cs`)
- Staff user → Inventory dashboard: uses (evidence: `README.md`)
- Administrator → Inventory dashboard: uses (evidence: `README.md`)
- Inventory dashboard → Inventory operations: requests operations (evidence: `UI/DashboardForm.cs`)
- Inventory dashboard → Product management: opens editor (evidence: `UI/DashboardForm.cs`)
- Inventory dashboard → Category management: opens editor (evidence: `UI/DashboardForm.cs`)
- Inventory dashboard → User management: opens editor (evidence: `UI/DashboardForm.cs`)
- Inventory dashboard → Stock movements: opens transaction (evidence: `UI/DashboardForm.cs`)
- Inventory dashboard → Invoice preview: opens preview (evidence: `UI/DashboardForm.cs`)
- Product management → Inventory operations: manages products (evidence: `UI/AddEditProductModalForm.cs`)
- Category management → Inventory operations: manages categories (evidence: `UI/AddEditCategoryModalForm.cs`)
- User management → Authentication and users: manages accounts (evidence: `UI/AddEditUserModalForm.cs`)
- Stock movements → Inventory operations: records movement (evidence: `UI/StockTransactionModalForm.cs`)
- Product management → Product images: loads images (evidence: `UI/AddEditProductModalForm.cs`)
- Stock movements → Product images: loads images (evidence: `UI/StockTransactionModalForm.cs`)
- Inventory operations → Product records: manages products (evidence: `BusinessLogic/InventoryService.cs`)
- Inventory operations → Category records: manages categories (evidence: `BusinessLogic/InventoryService.cs`)
- Inventory operations → Stock transactions and reports: records and reports (evidence: `BusinessLogic/InventoryService.cs`)
- Inventory operations → Restock alerts: uses alert service (evidence: `BusinessLogic/InventoryService.cs`)
- Restock alerts → Telegram API: sends alerts (evidence: `BusinessLogic/TelegramService.cs`)
- User records → ADO.NET access: executes queries (evidence: `DataAccess/UserRepository.cs`)
- Product records → ADO.NET access: executes queries (evidence: `DataAccess/ProductRepository.cs`)
- Category records → ADO.NET access: executes queries (evidence: `DataAccess/CategoryRepository.cs`)
- Stock transactions and reports → ADO.NET access: executes queries (evidence: `DataAccess/TransactionRepository.cs`)
- ADO.NET access → SQL Server: queries (evidence: `DataAccess/DatabaseHelper.cs`)
