# shanmugavelarumugam/ims architecture

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

- Interactive diagram: https://gitdiagram.com/shanmugavelarumugam/ims
- Repository: https://github.com/shanmugavelarumugam/ims

## Overview

This is a browser-based business and inventory management application, with tenant sign-in and a separate platform-admin area. Users enter through the public or authentication routes, then use the tenant dashboard and operational pages for products, stock, purchasing, sales, customers, suppliers, and reports. The frontend is organized around routed pages, shared layouts, and feature modules, with API service modules using a common HTTP client. The source index documents major routes and feature areas, but unsampled implementations and several page-to-service connections cannot be verified, so those links are omitted.

Main entry points: [`src/App.tsx`](https://github.com/shanmugavelarumugam/ims/blob/main/src/App.tsx) (Route Application), [`src/core/api/client.ts`](https://github.com/shanmugavelarumugam/ims/blob/main/src/core/api/client.ts) (HTTP Client), [`src/app/layouts/RootLayout.tsx`](https://github.com/shanmugavelarumugam/ims/blob/main/src/app/layouts/RootLayout.tsx) (Tenant Layout), [`src/modules/admin/pages/AdminDashboardPage.tsx`](https://github.com/shanmugavelarumugam/ims/blob/main/src/modules/admin/pages/AdminDashboardPage.tsx) (Platform Admin)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["App Entry"]
  node_app["Route Application<br/>[App.tsx]"]
  node_public["Landing &amp; Auth<br/>[LandingPage.tsx]"]
end

subgraph group_access["Access &amp; Platform"]
  node_tenant_shell["Tenant Layout<br/>[RootLayout.tsx]"]
  node_admin_shell["Admin Layout<br/>[AdminLayout.tsx]"]
  node_auth["Authentication<br/>[LoginPage.tsx]"]
  node_admin["Platform Admin"]
end

subgraph group_operations["Business Operations"]
  node_dashboard["Business Dashboard<br/>[DashboardPage.tsx]"]
  node_products["Products &amp; Categories<br/>[ProductsPage.tsx]"]
  node_inventory["Inventory &amp; Transfers<br/>[InventoryPage.tsx]"]
  node_purchases["Purchasing<br/>[PurchasesPage.tsx]"]
  node_sales["Sales<br/>[SalesPage.tsx]"]
  node_suppliers["Supplier Management<br/>[SuppliersPage.tsx]"]
  node_customers["Customer Management<br/>[CustomersPage.tsx]"]
  node_reports["Reports<br/>[ReportsPage.tsx]"]
  node_branches["Branches<br/>[BranchesPage.tsx]"]
  node_settings["Settings &amp; Profile<br/>[SettingsPage.tsx]"]
end

subgraph group_services["API Services"]
  node_auth_api["Auth API<br/>[auth.ts]"]
  node_business_api["Business API<br/>[business.ts]"]
  node_supplier_api["Supplier API<br/>[suppliers.ts]"]
  node_platform_api["Platform API<br/>[platform.ts]"]
  node_http_client["HTTP Client<br/>[client.ts]"]
end

node_user(("Business User"))
node_backend{{"API Server"}}

node_user -->|"opens"| node_app
node_app -->|"routes to"| node_public
node_app -->|"routes to"| node_auth
node_app -->|"routes to"| node_tenant_shell
node_app -->|"routes to"| node_admin_shell
node_app -->|"routes to"| node_admin
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_inventory
node_app -->|"routes to"| node_products
node_app -->|"routes to"| node_purchases
node_app -->|"routes to"| node_sales
node_app -->|"routes to"| node_suppliers
node_app -->|"routes to"| node_customers
node_app -->|"routes to"| node_reports
node_app -->|"routes to"| node_branches
node_app -->|"routes to"| node_settings
node_tenant_shell -->|"loads profile"| node_auth_api
node_auth_api -->|"uses"| node_http_client
node_business_api -->|"uses"| node_http_client
node_supplier_api -->|"uses"| node_http_client
node_platform_api -->|"uses"| node_http_client
node_admin -->|"calls"| node_platform_api
node_dashboard -->|"loads business"| node_business_api
node_suppliers -->|"calls"| node_supplier_api
node_http_client -->|"HTTP requests"| node_backend

click node_app "https://github.com/shanmugavelarumugam/ims/blob/main/src/App.tsx"
click node_public "https://github.com/shanmugavelarumugam/ims/blob/main/src/modules/landing/pages/LandingPage.tsx"
click node_tenant_shell "https://github.com/shanmugavelarumugam/ims/blob/main/src/app/layouts/RootLayout.tsx"
click node_admin_shell "https://github.com/shanmugavelarumugam/ims/blob/main/src/app/layouts/AdminLayout.tsx"
click node_auth "https://github.com/shanmugavelarumugam/ims/blob/main/src/modules/auth/pages/LoginPage.tsx"
click node_admin "https://github.com/shanmugavelarumugam/ims/blob/main/src/modules/admin/pages/AdminDashboardPage.tsx"
click node_dashboard "https://github.com/shanmugavelarumugam/ims/blob/main/src/modules/dashboard/pages/DashboardPage.tsx"
click node_products "https://github.com/shanmugavelarumugam/ims/blob/main/src/modules/products/pages/ProductsPage.tsx"
click node_inventory "https://github.com/shanmugavelarumugam/ims/blob/main/src/modules/inventory/pages/InventoryPage.tsx"
click node_purchases "https://github.com/shanmugavelarumugam/ims/blob/main/src/modules/purchases/pages/PurchasesPage.tsx"
click node_sales "https://github.com/shanmugavelarumugam/ims/blob/main/src/modules/sales/pages/SalesPage.tsx"
click node_suppliers "https://github.com/shanmugavelarumugam/ims/blob/main/src/modules/suppliers/pages/SuppliersPage.tsx"
click node_customers "https://github.com/shanmugavelarumugam/ims/blob/main/src/modules/customers/pages/CustomersPage.tsx"
click node_reports "https://github.com/shanmugavelarumugam/ims/blob/main/src/modules/reports/pages/ReportsPage.tsx"
click node_branches "https://github.com/shanmugavelarumugam/ims/blob/main/src/modules/branches/pages/BranchesPage.tsx"
click node_settings "https://github.com/shanmugavelarumugam/ims/blob/main/src/modules/settings/pages/SettingsPage.tsx"
click node_auth_api "https://github.com/shanmugavelarumugam/ims/blob/main/src/core/api/auth.ts"
click node_business_api "https://github.com/shanmugavelarumugam/ims/blob/main/src/core/api/business.ts"
click node_supplier_api "https://github.com/shanmugavelarumugam/ims/blob/main/src/core/api/suppliers.ts"
click node_platform_api "https://github.com/shanmugavelarumugam/ims/blob/main/src/core/api/platform.ts"
click node_http_client "https://github.com/shanmugavelarumugam/ims/blob/main/src/core/api/client.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_public,node_user toneBlue
class node_tenant_shell,node_admin_shell,node_auth,node_admin toneAmber
class node_dashboard,node_products,node_inventory,node_purchases,node_sales,node_suppliers,node_customers,node_reports,node_branches,node_settings,node_backend toneMint
class node_auth_api,node_business_api,node_supplier_api,node_platform_api,node_http_client toneRose
```

## Components

### App Entry

- [Route Application](https://github.com/shanmugavelarumugam/ims/blob/main/src/App.tsx): `src/App.tsx`
- [Landing & Auth](https://github.com/shanmugavelarumugam/ims/blob/main/src/modules/landing/pages/LandingPage.tsx): `src/modules/landing/pages/LandingPage.tsx`

### Access & Platform

- [Tenant Layout](https://github.com/shanmugavelarumugam/ims/blob/main/src/app/layouts/RootLayout.tsx): `src/app/layouts/RootLayout.tsx`
- [Admin Layout](https://github.com/shanmugavelarumugam/ims/blob/main/src/app/layouts/AdminLayout.tsx): `src/app/layouts/AdminLayout.tsx`
- [Authentication](https://github.com/shanmugavelarumugam/ims/blob/main/src/modules/auth/pages/LoginPage.tsx): `src/modules/auth/pages/LoginPage.tsx`
- [Platform Admin](https://github.com/shanmugavelarumugam/ims/blob/main/src/modules/admin/pages/AdminDashboardPage.tsx): `src/modules/admin/pages/AdminDashboardPage.tsx`

### Business Operations

- [Business Dashboard](https://github.com/shanmugavelarumugam/ims/blob/main/src/modules/dashboard/pages/DashboardPage.tsx): `src/modules/dashboard/pages/DashboardPage.tsx`
- [Products & Categories](https://github.com/shanmugavelarumugam/ims/blob/main/src/modules/products/pages/ProductsPage.tsx): `src/modules/products/pages/ProductsPage.tsx`
- [Inventory & Transfers](https://github.com/shanmugavelarumugam/ims/blob/main/src/modules/inventory/pages/InventoryPage.tsx): `src/modules/inventory/pages/InventoryPage.tsx`
- [Purchasing](https://github.com/shanmugavelarumugam/ims/blob/main/src/modules/purchases/pages/PurchasesPage.tsx): `src/modules/purchases/pages/PurchasesPage.tsx`
- [Sales](https://github.com/shanmugavelarumugam/ims/blob/main/src/modules/sales/pages/SalesPage.tsx): `src/modules/sales/pages/SalesPage.tsx`
- [Supplier Management](https://github.com/shanmugavelarumugam/ims/blob/main/src/modules/suppliers/pages/SuppliersPage.tsx): `src/modules/suppliers/pages/SuppliersPage.tsx`
- [Customer Management](https://github.com/shanmugavelarumugam/ims/blob/main/src/modules/customers/pages/CustomersPage.tsx): `src/modules/customers/pages/CustomersPage.tsx`
- [Reports](https://github.com/shanmugavelarumugam/ims/blob/main/src/modules/reports/pages/ReportsPage.tsx): `src/modules/reports/pages/ReportsPage.tsx`
- [Branches](https://github.com/shanmugavelarumugam/ims/blob/main/src/modules/branches/pages/BranchesPage.tsx): `src/modules/branches/pages/BranchesPage.tsx`
- [Settings & Profile](https://github.com/shanmugavelarumugam/ims/blob/main/src/modules/settings/pages/SettingsPage.tsx): `src/modules/settings/pages/SettingsPage.tsx`

### API Services

- [Auth API](https://github.com/shanmugavelarumugam/ims/blob/main/src/core/api/auth.ts): `src/core/api/auth.ts`
- [Business API](https://github.com/shanmugavelarumugam/ims/blob/main/src/core/api/business.ts): `src/core/api/business.ts`
- [Supplier API](https://github.com/shanmugavelarumugam/ims/blob/main/src/core/api/suppliers.ts): `src/core/api/suppliers.ts`
- [Platform API](https://github.com/shanmugavelarumugam/ims/blob/main/src/core/api/platform.ts): `src/core/api/platform.ts`
- [HTTP Client](https://github.com/shanmugavelarumugam/ims/blob/main/src/core/api/client.ts): `src/core/api/client.ts`

### Other components

- **Business User**
- **API Server**

## Connections

- Business User → Route Application: opens
- Route Application → Landing & Auth: routes to (evidence: `src/App.tsx`)
- Route Application → Authentication: routes to (evidence: `src/App.tsx`)
- Route Application → Tenant Layout: routes to (evidence: `src/App.tsx`)
- Route Application → Admin Layout: routes to (evidence: `src/App.tsx`)
- Route Application → Platform Admin: routes to (evidence: `src/App.tsx`)
- Route Application → Business Dashboard: routes to (evidence: `src/App.tsx`)
- Route Application → Inventory & Transfers: routes to (evidence: `src/App.tsx`)
- Route Application → Products & Categories: routes to (evidence: `src/App.tsx`)
- Route Application → Purchasing: routes to (evidence: `src/App.tsx`)
- Route Application → Sales: routes to (evidence: `src/App.tsx`)
- Route Application → Supplier Management: routes to (evidence: `src/App.tsx`)
- Route Application → Customer Management: routes to (evidence: `src/App.tsx`)
- Route Application → Reports: routes to (evidence: `src/App.tsx`)
- Route Application → Branches: routes to (evidence: `src/App.tsx`)
- Route Application → Settings & Profile: routes to (evidence: `src/App.tsx`)
- Tenant Layout → Auth API: loads profile (evidence: `src/app/layouts/RootLayout.tsx`)
- Auth API → HTTP Client: uses (evidence: `src/core/api/auth.ts`)
- Business API → HTTP Client: uses (evidence: `src/core/api/business.ts`)
- Supplier API → HTTP Client: uses
- Platform API → HTTP Client: uses (evidence: `src/core/api/platform.ts`)
- Platform Admin → Platform API: calls (evidence: `src/modules/admin/pages/AdminDashboardPage.tsx`)
- Business Dashboard → Business API: loads business (evidence: `src/modules/dashboard/pages/DashboardPage.tsx`)
- Supplier Management → Supplier API: calls (evidence: `src/modules/suppliers/pages/SuppliersPage.tsx`)
- HTTP Client → API Server: HTTP requests (evidence: `src/core/api/client.ts`)
