# saumik-shrestha/inventory-management-system architecture

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

- Interactive diagram: https://gitdiagram.com/saumik-shrestha/inventory-management-system
- Repository: https://github.com/saumik-shrestha/inventory-management-system

## Overview

This repository is an inventory-management web application: users enter through a React interface to manage equipment, stock movements, assignments, reference data, users, and inventory reporting. The frontend routes protected pages and includes an API service; the ASP.NET Core API exposes corresponding controllers and uses Entity Framework Core with PostgreSQL. The sampled controllers confirm database-backed CRUD and stock/assignment quantity updates. The tree identifies dashboard and ABC-analysis capabilities, but their implementation details and exact API wiring were not sampled.

Main entry points: [`InventoryManagement.Web/src/App.jsx`](https://github.com/saumik-shrestha/inventory-management-system/blob/main/InventoryManagement.Web/src/App.jsx) (React app), [`InventoryManagement.Api/Program.cs`](https://github.com/saumik-shrestha/inventory-management-system/blob/main/InventoryManagement.Api/Program.cs) (API host), [`InventoryManagement.Web/src/services/api.js`](https://github.com/saumik-shrestha/inventory-management-system/blob/main/InventoryManagement.Web/src/services/api.js) (API client), [`InventoryManagement.Api/Data/ApplicationDbContext.cs`](https://github.com/saumik-shrestha/inventory-management-system/blob/main/InventoryManagement.Api/Data/ApplicationDbContext.cs) (EF data context)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interface"]
  node_app["React app<br/>[App.jsx]"]
  node_login["Sign in<br/>[login.jsx]"]
  node_dashboard["Dashboard<br/>[Dashboard.jsx]"]
  node_equipmentui["Equipment<br/>[Equipment.jsx]"]
  node_transactionsui["Transactions<br/>[Transactions.jsx]"]
  node_assignmentsui["Assignments<br/>[Assignments.jsx]"]
  node_referenceui["Reference data<br/>[Categories.jsx]"]
  node_suppliersui["Suppliers<br/>[Suppliers.jsx]"]
  node_abcui["ABC analysis<br/>[ABCAnalysis.jsx]"]
  node_usersui["User administration<br/>[Users.jsx]"]
  node_apiclient["API client<br/>[api.js]"]
end

subgraph group_api["API and access"]
  node_program["API host<br/>[Program.cs]"]
  node_auth["Authentication<br/>[AuthController.cs]"]
  node_jwt["JWT service<br/>[JwtService.cs]"]
end

subgraph group_inventory["Inventory operations"]
  node_equipmentapi["Equipment API"]
  node_transactionsapi["Stock transactions"]
  node_assignmentsapi["Equipment assignments"]
  node_categoriesapi["Categories API"]
  node_suppliersapi["Suppliers API"]
  node_usersapi["Users API<br/>[UsersController.cs]"]
  node_reportsapi["Reporting APIs<br/>[Controllers]"]
end

subgraph group_data["Persistence"]
  node_context["EF data context"]
  node_database[("PostgreSQL")]
end

node_operator(("Inventory user"))

node_operator -->|"uses"| node_app
node_app -->|"routes to"| node_login
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_equipmentui
node_app -->|"routes to"| node_transactionsui
node_app -->|"routes to"| node_assignmentsui
node_app -->|"routes to"| node_referenceui
node_app -->|"routes to"| node_suppliersui
node_app -->|"routes to"| node_abcui
node_app -->|"routes to"| node_usersui
node_equipmentui -->|"uses"| node_apiclient
node_transactionsui -->|"uses"| node_apiclient
node_assignmentsui -->|"uses"| node_apiclient
node_referenceui -->|"uses"| node_apiclient
node_suppliersui -->|"uses"| node_apiclient
node_abcui -->|"uses"| node_apiclient
node_usersui -->|"uses"| node_apiclient
node_apiclient -->|"HTTP requests"| node_program
node_program -->|"dispatches"| node_auth
node_program -->|"dispatches"| node_equipmentapi
node_program -->|"dispatches"| node_transactionsapi
node_program -->|"dispatches"| node_assignmentsapi
node_program -->|"dispatches"| node_categoriesapi
node_program -->|"dispatches"| node_suppliersapi
node_program -->|"dispatches"| node_usersapi
node_program -->|"dispatches"| node_reportsapi
node_auth -->|"generates token"| node_jwt
node_equipmentapi -->|"queries and saves"| node_context
node_transactionsapi -->|"queries and saves"| node_context
node_assignmentsapi -->|"queries and saves"| node_context
node_categoriesapi -->|"queries and saves"| node_context
node_suppliersapi -->|"queries and saves"| node_context
node_usersapi -->|"queries and saves"| node_context
node_context -->|"reads and writes"| node_database

click node_app "https://github.com/saumik-shrestha/inventory-management-system/blob/main/InventoryManagement.Web/src/App.jsx"
click node_login "https://github.com/saumik-shrestha/inventory-management-system/blob/main/InventoryManagement.Web/src/pages/login.jsx"
click node_dashboard "https://github.com/saumik-shrestha/inventory-management-system/blob/main/InventoryManagement.Web/src/pages/Dashboard.jsx"
click node_equipmentui "https://github.com/saumik-shrestha/inventory-management-system/blob/main/InventoryManagement.Web/src/pages/Equipment.jsx"
click node_transactionsui "https://github.com/saumik-shrestha/inventory-management-system/blob/main/InventoryManagement.Web/src/pages/Transactions.jsx"
click node_assignmentsui "https://github.com/saumik-shrestha/inventory-management-system/blob/main/InventoryManagement.Web/src/pages/Assignments.jsx"
click node_referenceui "https://github.com/saumik-shrestha/inventory-management-system/blob/main/InventoryManagement.Web/src/pages/Categories.jsx"
click node_suppliersui "https://github.com/saumik-shrestha/inventory-management-system/blob/main/InventoryManagement.Web/src/pages/Suppliers.jsx"
click node_abcui "https://github.com/saumik-shrestha/inventory-management-system/blob/main/InventoryManagement.Web/src/pages/ABCAnalysis.jsx"
click node_usersui "https://github.com/saumik-shrestha/inventory-management-system/blob/main/InventoryManagement.Web/src/pages/Users.jsx"
click node_apiclient "https://github.com/saumik-shrestha/inventory-management-system/blob/main/InventoryManagement.Web/src/services/api.js"
click node_program "https://github.com/saumik-shrestha/inventory-management-system/blob/main/InventoryManagement.Api/Program.cs"
click node_auth "https://github.com/saumik-shrestha/inventory-management-system/blob/main/InventoryManagement.Api/Controllers/AuthController.cs"
click node_jwt "https://github.com/saumik-shrestha/inventory-management-system/blob/main/InventoryManagement.Api/Services/JwtService.cs"
click node_equipmentapi "https://github.com/saumik-shrestha/inventory-management-system/blob/main/InventoryManagement.Api/Controllers/Equipmentcontroller.cs"
click node_transactionsapi "https://github.com/saumik-shrestha/inventory-management-system/blob/main/InventoryManagement.Api/Controllers/StockTransactionsController.cs"
click node_assignmentsapi "https://github.com/saumik-shrestha/inventory-management-system/blob/main/InventoryManagement.Api/Controllers/EquipmentAssignmentsController.cs"
click node_categoriesapi "https://github.com/saumik-shrestha/inventory-management-system/blob/main/InventoryManagement.Api/Controllers/CategoriesController.cs"
click node_suppliersapi "https://github.com/saumik-shrestha/inventory-management-system/blob/main/InventoryManagement.Api/Controllers/SuppliersController.cs"
click node_usersapi "https://github.com/saumik-shrestha/inventory-management-system/blob/main/InventoryManagement.Api/Controllers/UsersController.cs"
click node_reportsapi "https://github.com/saumik-shrestha/inventory-management-system/tree/main/InventoryManagement.Api/Controllers"
click node_context "https://github.com/saumik-shrestha/inventory-management-system/blob/main/InventoryManagement.Api/Data/ApplicationDbContext.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_app,node_login,node_dashboard,node_equipmentui,node_transactionsui,node_assignmentsui,node_referenceui,node_suppliersui,node_abcui,node_usersui,node_apiclient,node_operator toneBlue
class node_program,node_auth,node_jwt toneAmber
class node_equipmentapi,node_transactionsapi,node_assignmentsapi,node_categoriesapi,node_suppliersapi,node_usersapi,node_reportsapi toneMint
class node_context,node_database toneRose
```

## Components

### Web interface

- [React app](https://github.com/saumik-shrestha/inventory-management-system/blob/main/InventoryManagement.Web/src/App.jsx): `InventoryManagement.Web/src/App.jsx`
- [Sign in](https://github.com/saumik-shrestha/inventory-management-system/blob/main/InventoryManagement.Web/src/pages/login.jsx): `InventoryManagement.Web/src/pages/login.jsx`
- [Dashboard](https://github.com/saumik-shrestha/inventory-management-system/blob/main/InventoryManagement.Web/src/pages/Dashboard.jsx): `InventoryManagement.Web/src/pages/Dashboard.jsx`
- [Equipment](https://github.com/saumik-shrestha/inventory-management-system/blob/main/InventoryManagement.Web/src/pages/Equipment.jsx): `InventoryManagement.Web/src/pages/Equipment.jsx`
- [Transactions](https://github.com/saumik-shrestha/inventory-management-system/blob/main/InventoryManagement.Web/src/pages/Transactions.jsx): `InventoryManagement.Web/src/pages/Transactions.jsx`
- [Assignments](https://github.com/saumik-shrestha/inventory-management-system/blob/main/InventoryManagement.Web/src/pages/Assignments.jsx): `InventoryManagement.Web/src/pages/Assignments.jsx`
- [Reference data](https://github.com/saumik-shrestha/inventory-management-system/blob/main/InventoryManagement.Web/src/pages/Categories.jsx): `InventoryManagement.Web/src/pages/Categories.jsx`
- [Suppliers](https://github.com/saumik-shrestha/inventory-management-system/blob/main/InventoryManagement.Web/src/pages/Suppliers.jsx): `InventoryManagement.Web/src/pages/Suppliers.jsx`
- [ABC analysis](https://github.com/saumik-shrestha/inventory-management-system/blob/main/InventoryManagement.Web/src/pages/ABCAnalysis.jsx): `InventoryManagement.Web/src/pages/ABCAnalysis.jsx`
- [User administration](https://github.com/saumik-shrestha/inventory-management-system/blob/main/InventoryManagement.Web/src/pages/Users.jsx): `InventoryManagement.Web/src/pages/Users.jsx`
- [API client](https://github.com/saumik-shrestha/inventory-management-system/blob/main/InventoryManagement.Web/src/services/api.js): `InventoryManagement.Web/src/services/api.js`

### API and access

- [API host](https://github.com/saumik-shrestha/inventory-management-system/blob/main/InventoryManagement.Api/Program.cs): `InventoryManagement.Api/Program.cs`
- [Authentication](https://github.com/saumik-shrestha/inventory-management-system/blob/main/InventoryManagement.Api/Controllers/AuthController.cs): `InventoryManagement.Api/Controllers/AuthController.cs`
- [JWT service](https://github.com/saumik-shrestha/inventory-management-system/blob/main/InventoryManagement.Api/Services/JwtService.cs): `InventoryManagement.Api/Services/JwtService.cs`

### Inventory operations

- [Equipment API](https://github.com/saumik-shrestha/inventory-management-system/blob/main/InventoryManagement.Api/Controllers/Equipmentcontroller.cs): `InventoryManagement.Api/Controllers/Equipmentcontroller.cs`
- [Stock transactions](https://github.com/saumik-shrestha/inventory-management-system/blob/main/InventoryManagement.Api/Controllers/StockTransactionsController.cs): `InventoryManagement.Api/Controllers/StockTransactionsController.cs`
- [Equipment assignments](https://github.com/saumik-shrestha/inventory-management-system/blob/main/InventoryManagement.Api/Controllers/EquipmentAssignmentsController.cs): `InventoryManagement.Api/Controllers/EquipmentAssignmentsController.cs`
- [Categories API](https://github.com/saumik-shrestha/inventory-management-system/blob/main/InventoryManagement.Api/Controllers/CategoriesController.cs): `InventoryManagement.Api/Controllers/CategoriesController.cs`
- [Suppliers API](https://github.com/saumik-shrestha/inventory-management-system/blob/main/InventoryManagement.Api/Controllers/SuppliersController.cs): `InventoryManagement.Api/Controllers/SuppliersController.cs`
- [Users API](https://github.com/saumik-shrestha/inventory-management-system/blob/main/InventoryManagement.Api/Controllers/UsersController.cs): `InventoryManagement.Api/Controllers/UsersController.cs`
- [Reporting APIs](https://github.com/saumik-shrestha/inventory-management-system/tree/main/InventoryManagement.Api/Controllers): `InventoryManagement.Api/Controllers`

### Persistence

- [EF data context](https://github.com/saumik-shrestha/inventory-management-system/blob/main/InventoryManagement.Api/Data/ApplicationDbContext.cs): `InventoryManagement.Api/Data/ApplicationDbContext.cs`
- **PostgreSQL**

### Other components

- **Inventory user**

## Connections

- Inventory user → React app: uses
- React app → Sign in: routes to
- React app → Dashboard: routes to
- React app → Equipment: routes to
- React app → Transactions: routes to
- React app → Assignments: routes to
- React app → Reference data: routes to
- React app → Suppliers: routes to
- React app → ABC analysis: routes to
- React app → User administration: routes to
- Equipment → API client: uses
- Transactions → API client: uses
- Assignments → API client: uses
- Reference data → API client: uses
- Suppliers → API client: uses
- ABC analysis → API client: uses
- User administration → API client: uses
- API client → API host: HTTP requests
- API host → Authentication: dispatches
- API host → Equipment API: dispatches
- API host → Stock transactions: dispatches
- API host → Equipment assignments: dispatches
- API host → Categories API: dispatches
- API host → Suppliers API: dispatches
- API host → Users API: dispatches
- API host → Reporting APIs: dispatches
- Authentication → JWT service: generates token
- Equipment API → EF data context: queries and saves
- Stock transactions → EF data context: queries and saves
- Equipment assignments → EF data context: queries and saves
- Categories API → EF data context: queries and saves
- Suppliers API → EF data context: queries and saves
- Users API → EF data context: queries and saves
- EF data context → PostgreSQL: reads and writes
