# srihari1773/asset-pro architecture

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

- Interactive diagram: https://gitdiagram.com/srihari1773/asset-pro
- Repository: https://github.com/srihari1773/asset-pro

## Overview

This is an Asset Pro management-system frontend: users enter through a demo login, reach the protected dashboard, and can view and filter assets; the route tree also exposes maintenance and profile pages. The repository includes task pages, user/student-related services, and reusable interface components. The login excerpt uses a local dummy token rather than the authentication API. Service modules show API operations, but sampled code does not establish which pages invoke them; task and other page wiring is therefore not inferred.

Main entry points: [`src/Routes/routes.jsx`](https://github.com/srihari1773/asset-pro/blob/main/src/Routes/routes.jsx) (Route Map), [`src/pages/Tasks/AllTasks.jsx`](https://github.com/srihari1773/asset-pro/blob/main/src/pages/Tasks/AllTasks.jsx) (All Tasks), [`src/config/apiConfig.jsx`](https://github.com/srihari1773/asset-pro/blob/main/src/config/apiConfig.jsx) (API Config), [`src/App.jsx`](https://github.com/srihari1773/asset-pro/blob/main/src/App.jsx) (Application)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["App Access"]
  node_app["Application<br/>[App.jsx]"]
  node_routes["Route Map<br/>[routes.jsx]"]
  node_public["Public Guard<br/>[PublicRoute.jsx]"]
  node_protected["Protected Guard<br/>[ProtectedRoute.jsx]"]
  node_login["Login<br/>[index.jsx]"]
  node_profile["Profile<br/>[index.jsx]"]
end

subgraph group_assets["Asset Operations"]
  node_dashboard["Dashboard<br/>[index.jsx]"]
  node_assetlist["Asset List<br/>[index.jsx]"]
  node_maintenance["Maintenance<br/>[index.jsx]"]
  node_assetdata["Asset Mock Data<br/>[assetsMockData.jsx]"]
end

subgraph group_work["Tasks And Records"]
  node_users["Users<br/>[index.jsx]"]
  node_taskpages["Task Pages<br/>[index.jsx]"]
  node_alltasks["All Tasks<br/>[AllTasks.jsx]"]
  node_tasklist["Task List<br/>[TaskList.jsx]"]
  node_taskform["Task Form<br/>[AddTask.jsx]"]
  node_taskdata["Task Mock Data<br/>[tasksMockData.jsx]"]
  node_taskapi["Task API<br/>[tasks.js]"]
  node_studentapi["Student API<br/>[students.js]"]
  node_enquiryapi["Enquiry API<br/>[enquiries.js]"]
end

subgraph group_platform["Shared Platform"]
  node_global["Global Context<br/>[GlobalProvider.jsx]"]
  node_nav["Dynamic Navigation<br/>[DynamicNav.jsx]"]
  node_topbar["Top Bar<br/>[index.jsx]"]
  node_datatable["Data Table"]
  node_authapi["Auth API<br/>[authApi.js]"]
  node_apiconfig["API Config<br/>[apiConfig.jsx]"]
end

node_user(("User"))
node_backend["Backend API"]

node_user -->|"opens"| node_app
node_app -->|"renders"| node_routes
node_app -->|"provides context"| node_global
node_routes -->|"guards login"| node_public
node_routes -->|"guards app pages"| node_protected
node_routes -->|"routes to"| node_login
node_routes -->|"routes to"| node_dashboard
node_routes -->|"routes to"| node_assetlist
node_routes -->|"routes to"| node_maintenance
node_routes -->|"routes to"| node_profile
node_login -->|"sets user"| node_global
node_login -->|"navigates"| node_user
node_assetlist -->|"reads"| node_assetdata
node_alltasks -->|"reads"| node_taskdata
node_alltasks -->|"renders"| node_datatable
node_alltasks -->|"opens"| node_taskform
node_taskpages -->|"includes"| node_alltasks
node_taskpages -->|"includes"| node_tasklist
node_authapi -->|"uses"| node_apiconfig
node_taskapi -->|"uses"| node_apiconfig
node_studentapi -->|"uses"| node_apiconfig
node_enquiryapi -->|"uses"| node_apiconfig
node_authapi -->|"requests"| node_backend
node_taskapi -->|"requests"| node_backend
node_studentapi -->|"requests"| node_backend
node_enquiryapi -->|"requests"| node_backend

click node_app "https://github.com/srihari1773/asset-pro/blob/main/src/App.jsx"
click node_routes "https://github.com/srihari1773/asset-pro/blob/main/src/Routes/routes.jsx"
click node_public "https://github.com/srihari1773/asset-pro/blob/main/src/Routes/PublicRoute.jsx"
click node_protected "https://github.com/srihari1773/asset-pro/blob/main/src/Routes/ProtectedRoute.jsx"
click node_login "https://github.com/srihari1773/asset-pro/blob/main/src/pages/Login/index.jsx"
click node_dashboard "https://github.com/srihari1773/asset-pro/blob/main/src/pages/Dashboard/index.jsx"
click node_assetlist "https://github.com/srihari1773/asset-pro/blob/main/src/pages/AssetList/index.jsx"
click node_maintenance "https://github.com/srihari1773/asset-pro/blob/main/src/pages/Maintenance/index.jsx"
click node_profile "https://github.com/srihari1773/asset-pro/blob/main/src/pages/Profile/index.jsx"
click node_users "https://github.com/srihari1773/asset-pro/blob/main/src/pages/Users/index.jsx"
click node_taskpages "https://github.com/srihari1773/asset-pro/blob/main/src/pages/Tasks/index.jsx"
click node_alltasks "https://github.com/srihari1773/asset-pro/blob/main/src/pages/Tasks/AllTasks.jsx"
click node_tasklist "https://github.com/srihari1773/asset-pro/blob/main/src/pages/Tasks/TaskList.jsx"
click node_taskform "https://github.com/srihari1773/asset-pro/blob/main/src/components/forms/AddTask.jsx"
click node_global "https://github.com/srihari1773/asset-pro/blob/main/src/context/GlobalProvider.jsx"
click node_nav "https://github.com/srihari1773/asset-pro/blob/main/src/components/Menu/DynamicNav.jsx"
click node_topbar "https://github.com/srihari1773/asset-pro/blob/main/src/components/Topbar/index.jsx"
click node_datatable "https://github.com/srihari1773/asset-pro/blob/main/src/components/core/CustomDataTable/CustomDataTable.jsx"
click node_assetdata "https://github.com/srihari1773/asset-pro/blob/main/src/data/assetsMockData.jsx"
click node_taskdata "https://github.com/srihari1773/asset-pro/blob/main/src/data/tasksMockData.jsx"
click node_authapi "https://github.com/srihari1773/asset-pro/blob/main/src/services/authApi.js"
click node_taskapi "https://github.com/srihari1773/asset-pro/blob/main/src/services/tasks.js"
click node_studentapi "https://github.com/srihari1773/asset-pro/blob/main/src/services/students.js"
click node_enquiryapi "https://github.com/srihari1773/asset-pro/blob/main/src/services/enquiries.js"
click node_apiconfig "https://github.com/srihari1773/asset-pro/blob/main/src/config/apiConfig.jsx"

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_routes,node_public,node_protected,node_login,node_profile,node_user toneBlue
class node_dashboard,node_assetlist,node_maintenance,node_assetdata toneAmber
class node_users,node_taskpages,node_alltasks,node_tasklist,node_taskform,node_taskdata,node_taskapi,node_studentapi,node_enquiryapi,node_backend toneMint
class node_global,node_nav,node_topbar,node_datatable,node_authapi,node_apiconfig toneRose
```

## Components

### App Access

- [Application](https://github.com/srihari1773/asset-pro/blob/main/src/App.jsx): `src/App.jsx`
- [Route Map](https://github.com/srihari1773/asset-pro/blob/main/src/Routes/routes.jsx): `src/Routes/routes.jsx`
- [Public Guard](https://github.com/srihari1773/asset-pro/blob/main/src/Routes/PublicRoute.jsx): `src/Routes/PublicRoute.jsx`
- [Protected Guard](https://github.com/srihari1773/asset-pro/blob/main/src/Routes/ProtectedRoute.jsx): `src/Routes/ProtectedRoute.jsx`
- [Login](https://github.com/srihari1773/asset-pro/blob/main/src/pages/Login/index.jsx): `src/pages/Login/index.jsx`
- [Profile](https://github.com/srihari1773/asset-pro/blob/main/src/pages/Profile/index.jsx): `src/pages/Profile/index.jsx`

### Asset Operations

- [Dashboard](https://github.com/srihari1773/asset-pro/blob/main/src/pages/Dashboard/index.jsx): `src/pages/Dashboard/index.jsx`
- [Asset List](https://github.com/srihari1773/asset-pro/blob/main/src/pages/AssetList/index.jsx): `src/pages/AssetList/index.jsx`
- [Maintenance](https://github.com/srihari1773/asset-pro/blob/main/src/pages/Maintenance/index.jsx): `src/pages/Maintenance/index.jsx`
- [Asset Mock Data](https://github.com/srihari1773/asset-pro/blob/main/src/data/assetsMockData.jsx): `src/data/assetsMockData.jsx`

### Tasks And Records

- [Users](https://github.com/srihari1773/asset-pro/blob/main/src/pages/Users/index.jsx): `src/pages/Users/index.jsx`
- [Task Pages](https://github.com/srihari1773/asset-pro/blob/main/src/pages/Tasks/index.jsx): `src/pages/Tasks/index.jsx`
- [All Tasks](https://github.com/srihari1773/asset-pro/blob/main/src/pages/Tasks/AllTasks.jsx): `src/pages/Tasks/AllTasks.jsx`
- [Task List](https://github.com/srihari1773/asset-pro/blob/main/src/pages/Tasks/TaskList.jsx): `src/pages/Tasks/TaskList.jsx`
- [Task Form](https://github.com/srihari1773/asset-pro/blob/main/src/components/forms/AddTask.jsx): `src/components/forms/AddTask.jsx`
- [Task Mock Data](https://github.com/srihari1773/asset-pro/blob/main/src/data/tasksMockData.jsx): `src/data/tasksMockData.jsx`
- [Task API](https://github.com/srihari1773/asset-pro/blob/main/src/services/tasks.js): `src/services/tasks.js`
- [Student API](https://github.com/srihari1773/asset-pro/blob/main/src/services/students.js): `src/services/students.js`
- [Enquiry API](https://github.com/srihari1773/asset-pro/blob/main/src/services/enquiries.js): `src/services/enquiries.js`

### Shared Platform

- [Global Context](https://github.com/srihari1773/asset-pro/blob/main/src/context/GlobalProvider.jsx): `src/context/GlobalProvider.jsx`
- [Dynamic Navigation](https://github.com/srihari1773/asset-pro/blob/main/src/components/Menu/DynamicNav.jsx): `src/components/Menu/DynamicNav.jsx`
- [Top Bar](https://github.com/srihari1773/asset-pro/blob/main/src/components/Topbar/index.jsx): `src/components/Topbar/index.jsx`
- [Data Table](https://github.com/srihari1773/asset-pro/blob/main/src/components/core/CustomDataTable/CustomDataTable.jsx): `src/components/core/CustomDataTable/CustomDataTable.jsx`
- [Auth API](https://github.com/srihari1773/asset-pro/blob/main/src/services/authApi.js): `src/services/authApi.js`
- [API Config](https://github.com/srihari1773/asset-pro/blob/main/src/config/apiConfig.jsx): `src/config/apiConfig.jsx`

### Other components

- **User**
- **Backend API**

## Connections

- User → Application: opens
- Application → Route Map: renders
- Application → Global Context: provides context
- Route Map → Public Guard: guards login
- Route Map → Protected Guard: guards app pages
- Route Map → Login: routes to
- Route Map → Dashboard: routes to
- Route Map → Asset List: routes to
- Route Map → Maintenance: routes to
- Route Map → Profile: routes to
- Login → Global Context: sets user
- Login → User: navigates
- Asset List → Asset Mock Data: reads
- All Tasks → Task Mock Data: reads
- All Tasks → Data Table: renders
- All Tasks → Task Form: opens
- Task Pages → All Tasks: includes
- Task Pages → Task List: includes
- Auth API → API Config: uses
- Task API → API Config: uses
- Student API → API Config: uses
- Enquiry API → API Config: uses
- Auth API → Backend API: requests
- Task API → Backend API: requests
- Student API → Backend API: requests
- Enquiry API → Backend API: requests
