# isurusandaruwan97/inventory-management-dashboard architecture

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

- Interactive diagram: https://gitdiagram.com/isurusandaruwan97/inventory-management-dashboard
- Repository: https://github.com/isurusandaruwan97/inventory-management-dashboard

## Overview

This React dashboard supports inventory operations from sign-in through role-filtered navigation to stock, production, store, delivery, configuration, and user-management screens. The clearest evidenced flow is login submission to the authentication service, followed by route selection and page rendering. The README documents a NestJS API and inventory monitoring capabilities; several feature screens and service implementations are unsampled, so their detailed interactions are not inferred.

Main entry points: [`src/configs/routes.tsx`](https://github.com/isurusandaruwan97/inventory-management-dashboard/blob/master/src/configs/routes.tsx) (Role Routes), [`src/App.tsx`](https://github.com/isurusandaruwan97/inventory-management-dashboard/blob/master/src/App.tsx) (App Router), [`src/features/stock`](https://github.com/isurusandaruwan97/inventory-management-dashboard/tree/master/src/features/stock) (Stock and Inventory), [`src/features/configurations/categories`](https://github.com/isurusandaruwan97/inventory-management-dashboard/tree/master/src/features/configurations/categories) (Product Categories)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shell["Application Shell"]
  node_app["App Router<br/>[App.tsx]"]
  node_route_config["Role Routes<br/>[routes.tsx]"]
end

subgraph group_identity["Identity and Access"]
  node_login["Sign In<br/>[login.tsx]"]
  node_auth_service["Authentication Service<br/>[auth.service.ts]"]
  node_pin["PIN and Session Gate<br/>[App.tsx]"]
end

subgraph group_operations["Inventory Operations"]
  node_dashboard["Dashboard"]
  node_stock["Stock and Inventory"]
  node_production["Production"]
  node_store["Store and Returns"]
  node_delivery["Delivery"]
  node_stock_expand["Inventory Details<br/>[ExpandCotent.tsx]"]
end

subgraph group_admin["Administration"]
  node_categories["Product Categories"]
  node_category_form["Category Form"]
  node_items["Item Configuration"]
  node_item_service["Item API Service<br/>[index.ts]"]
  node_users["User Management<br/>[index.tsx]"]
  node_user_form["User Form<br/>[UserForm.tsx]"]
  node_user_service["User API Service<br/>[index.ts]"]
end

node_operator(("Dashboard User"))
node_api[("NestJS API")]

node_operator -->|"opens"| node_app
node_app -->|"routes sign-in"| node_login
node_app -->|"renders routes"| node_route_config
node_route_config -->|"selects screen"| node_dashboard
node_route_config -->|"selects screen"| node_stock
node_route_config -->|"selects screen"| node_production
node_route_config -->|"selects screen"| node_store
node_route_config -->|"selects screen"| node_delivery
node_route_config -->|"selects screen"| node_categories
node_route_config -->|"selects screen"| node_items
node_route_config -->|"selects screen"| node_users
node_login -->|"submits credentials"| node_auth_service
node_auth_service -->|"sends login request"| node_api
node_app -->|"gates protected pages"| node_pin
node_stock -->|"renders details"| node_stock_expand
node_categories -->|"opens form"| node_category_form
node_items -->|"fetches item data"| node_item_service
node_item_service -->|"requests item data"| node_api
node_users -->|"opens form"| node_user_form
node_users -->|"fetches users"| node_user_service
node_user_service -.->|"requests user data"| node_api
node_categories -.->|"uses API"| node_api
node_stock -.->|"uses API"| node_api
node_production -.->|"uses API"| node_api
node_store -.->|"uses API"| node_api
node_delivery -.->|"uses API"| node_api

click node_app "https://github.com/isurusandaruwan97/inventory-management-dashboard/blob/master/src/App.tsx"
click node_route_config "https://github.com/isurusandaruwan97/inventory-management-dashboard/blob/master/src/configs/routes.tsx"
click node_dashboard "https://github.com/isurusandaruwan97/inventory-management-dashboard/tree/master/src/features/dashboard"
click node_stock "https://github.com/isurusandaruwan97/inventory-management-dashboard/tree/master/src/features/stock"
click node_production "https://github.com/isurusandaruwan97/inventory-management-dashboard/tree/master/src/features/production"
click node_store "https://github.com/isurusandaruwan97/inventory-management-dashboard/tree/master/src/features/store"
click node_delivery "https://github.com/isurusandaruwan97/inventory-management-dashboard/tree/master/src/features/delivery"
click node_stock_expand "https://github.com/isurusandaruwan97/inventory-management-dashboard/blob/master/src/features/stock/components/ExpandCotent.tsx"
click node_login "https://github.com/isurusandaruwan97/inventory-management-dashboard/blob/master/src/features/auth/login.tsx"
click node_auth_service "https://github.com/isurusandaruwan97/inventory-management-dashboard/blob/master/src/features/auth/services/auth.service.ts"
click node_pin "https://github.com/isurusandaruwan97/inventory-management-dashboard/blob/master/src/App.tsx"
click node_categories "https://github.com/isurusandaruwan97/inventory-management-dashboard/tree/master/src/features/configurations/categories"
click node_category_form "https://github.com/isurusandaruwan97/inventory-management-dashboard/blob/master/src/features/configurations/categories/components/ProductCategoriesForm.tsx"
click node_items "https://github.com/isurusandaruwan97/inventory-management-dashboard/tree/master/src/features/configurations/items"
click node_item_service "https://github.com/isurusandaruwan97/inventory-management-dashboard/blob/master/src/features/configurations/items/services/index.ts"
click node_users "https://github.com/isurusandaruwan97/inventory-management-dashboard/blob/master/src/features/users/index.tsx"
click node_user_form "https://github.com/isurusandaruwan97/inventory-management-dashboard/blob/master/src/features/users/components/UserForm.tsx"
click node_user_service "https://github.com/isurusandaruwan97/inventory-management-dashboard/blob/master/src/features/users/services/index.ts"

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_route_config,node_operator toneBlue
class node_login,node_auth_service,node_pin,node_api toneAmber
class node_dashboard,node_stock,node_production,node_store,node_delivery,node_stock_expand toneMint
class node_categories,node_category_form,node_items,node_item_service,node_users,node_user_form,node_user_service toneRose
```

## Components

### Application Shell

- [App Router](https://github.com/isurusandaruwan97/inventory-management-dashboard/blob/master/src/App.tsx): `src/App.tsx`
- [Role Routes](https://github.com/isurusandaruwan97/inventory-management-dashboard/blob/master/src/configs/routes.tsx): `src/configs/routes.tsx`

### Identity and Access

- [Sign In](https://github.com/isurusandaruwan97/inventory-management-dashboard/blob/master/src/features/auth/login.tsx): `src/features/auth/login.tsx`
- [Authentication Service](https://github.com/isurusandaruwan97/inventory-management-dashboard/blob/master/src/features/auth/services/auth.service.ts): `src/features/auth/services/auth.service.ts`
- [PIN and Session Gate](https://github.com/isurusandaruwan97/inventory-management-dashboard/blob/master/src/App.tsx): `src/App.tsx`

### Inventory Operations

- [Dashboard](https://github.com/isurusandaruwan97/inventory-management-dashboard/tree/master/src/features/dashboard): `src/features/dashboard`
- [Stock and Inventory](https://github.com/isurusandaruwan97/inventory-management-dashboard/tree/master/src/features/stock): `src/features/stock`
- [Production](https://github.com/isurusandaruwan97/inventory-management-dashboard/tree/master/src/features/production): `src/features/production`
- [Store and Returns](https://github.com/isurusandaruwan97/inventory-management-dashboard/tree/master/src/features/store): `src/features/store`
- [Delivery](https://github.com/isurusandaruwan97/inventory-management-dashboard/tree/master/src/features/delivery): `src/features/delivery`
- [Inventory Details](https://github.com/isurusandaruwan97/inventory-management-dashboard/blob/master/src/features/stock/components/ExpandCotent.tsx): `src/features/stock/components/ExpandCotent.tsx`

### Administration

- [Product Categories](https://github.com/isurusandaruwan97/inventory-management-dashboard/tree/master/src/features/configurations/categories): `src/features/configurations/categories`
- [Category Form](https://github.com/isurusandaruwan97/inventory-management-dashboard/blob/master/src/features/configurations/categories/components/ProductCategoriesForm.tsx): `src/features/configurations/categories/components/ProductCategoriesForm.tsx`
- [Item Configuration](https://github.com/isurusandaruwan97/inventory-management-dashboard/tree/master/src/features/configurations/items): `src/features/configurations/items`
- [Item API Service](https://github.com/isurusandaruwan97/inventory-management-dashboard/blob/master/src/features/configurations/items/services/index.ts): `src/features/configurations/items/services/index.ts`
- [User Management](https://github.com/isurusandaruwan97/inventory-management-dashboard/blob/master/src/features/users/index.tsx): `src/features/users/index.tsx`
- [User Form](https://github.com/isurusandaruwan97/inventory-management-dashboard/blob/master/src/features/users/components/UserForm.tsx): `src/features/users/components/UserForm.tsx`
- [User API Service](https://github.com/isurusandaruwan97/inventory-management-dashboard/blob/master/src/features/users/services/index.ts): `src/features/users/services/index.ts`

### Other components

- **Dashboard User**
- **NestJS API**

## Connections

- Dashboard User → App Router: opens (evidence: `src/App.tsx`)
- App Router → Sign In: routes sign-in (evidence: `src/App.tsx`)
- App Router → Role Routes: renders routes (evidence: `src/App.tsx`)
- Role Routes → Dashboard: selects screen (evidence: `src/configs/routes.tsx`)
- Role Routes → Stock and Inventory: selects screen (evidence: `src/configs/routes.tsx`)
- Role Routes → Production: selects screen (evidence: `src/configs/routes.tsx`)
- Role Routes → Store and Returns: selects screen (evidence: `src/configs/routes.tsx`)
- Role Routes → Delivery: selects screen (evidence: `src/configs/routes.tsx`)
- Role Routes → Product Categories: selects screen (evidence: `src/configs/routes.tsx`)
- Role Routes → Item Configuration: selects screen (evidence: `src/configs/routes.tsx`)
- Role Routes → User Management: selects screen (evidence: `src/configs/routes.tsx`)
- Sign In → Authentication Service: submits credentials (evidence: `src/features/auth/login.tsx`)
- Authentication Service → NestJS API: sends login request (evidence: `src/features/auth/services/auth.service.ts`)
- App Router → PIN and Session Gate: gates protected pages (evidence: `src/App.tsx`)
- Stock and Inventory → Inventory Details: renders details (evidence: `src/features/stock/Inventory.tsx`)
- Product Categories → Category Form: opens form (evidence: `src/features/configurations/categories/index.tsx`)
- Item Configuration → Item API Service: fetches item data (evidence: `src/features/configurations/items/index.tsx`)
- Item API Service → NestJS API: requests item data (evidence: `src/features/configurations/items/services/index.ts`)
- User Management → User Form: opens form (evidence: `src/features/users/index.tsx`)
- User Management → User API Service: fetches users (evidence: `src/features/users/index.tsx`)
- User API Service → NestJS API: requests user data
- Product Categories → NestJS API: uses API
- Stock and Inventory → NestJS API: uses API
- Production → NestJS API: uses API
- Store and Returns → NestJS API: uses API
- Delivery → NestJS API: uses API
